As a developer, I would like to be able to determine if the user has a target app installed on their device without opening that target app. I might do so to provide a fallback, prompt the user to install the app (like the way Google does with their integrated suite of apps on iOS where the UI provides Install buttons for apps that are detected to be missing).
iOS supports Ti.Platform.canOpenURL() to provide this functionality. On Android, I have to call Ti.Platform.openURL() and detect the returned boolean -- but that opens the target app.
The code at
http://bencoding.com/2013/02/18/determine-if-intent-receiver-exists-on-android-using-titanium/ might provide a starting point.
This should be marked as Parity instead of a new feature.
We don't have a Parity-type and since it's not a bug, it's a feature :) I've prefixed the title though.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10881
Attached [^OpenUrlTableTest.js] to fully test
canOpenURL()
andopenURL()
support. This test code is intended to be used as the "app.js" for a Titanium Classic "Default Project" template since it depends on its tab PNGs.FR Passed. Waiting on Jenkins build.
merged to master
Verified the fix on SDK 8.1.0.v20190606063903. Verified that Ti.Platform.canOpenURL() is supported .