shaque wrote:Yes, this is the same feature. I haven't looked into it, but I can imagine that getting a URL schema registered in Android may be as simple as adding some field in the "app description file". It would be cool if it were possible to register Gospel Library as an opener for
http://scriptures.lds.org/*, but I suppose that such a field probably can't handle patterns.
Yeah, it's actually pretty easy to do that. You just create an activity with an intent filter that handles
http://lds.org/scriptures URLs and then in that intent you get the entire URL and you parse it out and adapt it to the format that is used internally in GLA. You can also handle this by throwing the intent filter on the ScriptureView activity and then look for it on the onCreate method - but I think it's a lot cleaner to just have another activity set up to handle the intent and adapt the URLs to the internal format than to have a really long onCreate method.
When you have this implemented and you tap on a
http://lds.org/scriptures/* link in the browser it brings up a window asking you what app you want to use to get that link - you have a choice of either Browser or GLA. You can tell it to always remember your selection and pick GLA and then from then on it wont prompt you - it will just open GLA.
I've implemented this and it works fine on my device. I'm working on getting it to apply the transient highlight (i.e. it shows the verses you requested with a highlight or some other visual indicator around them but doesn't store it in the database) but haven't been able to figure out how to get it to work (perhaps once I clean up the patch and post it somewhere a person more familiar with the inner workings of the app can figure it out)
https://tech.lds.org/forum/showthread.p ... ptures-url
I'm not an iPhone / iOS expert - but this should be significantly easier to implement on android simply because you can use http links to do so.
Here's an example of doing it in android in another app to give you an idea of how easy it is.
http://stackoverflow.com/questions/1609 ... ndroid-app