Skip to content
This repository

support intent to jump #183

Closed
ahmedre opened this Issue August 12, 2012 · 1 comment

1 participant

Owner

support an intent to allow people outside to jump to a certain page, sura, or sura/ayah combo.

Owner

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.

ahmedre closed this October 04, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.