support intent to jump
ahmedre opened this issue · comments
Ahmed El-Helw commented
support an intent to allow people outside to jump to a certain page, sura, or sura/ayah combo.
Ahmed El-Helw commented
support added for Intent.ACTION_VIEW with data of quran://sura/ayah.
example:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("quran://3/100");
PackageManager pm = getPackageManager();
if (pm.queryIntentActivities(i, 0).size() == 0){
i.setData(Uri.parse("http://quran.com/3/100"));
}
startActivity(i);
this code will see if quran android (or any other app) can handle a view intent with a quran:// url. if no such app is installed, it falls back to launching the ayah in a web browser.