Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14460] Android: Add Ti.Platform.canOpenURL() support

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2019-06-10T21:52:53.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.1.0
ComponentsAndroid
Labelsandroid, openUrl, parity, url
ReporterTim Poulsen
AssigneeJoshua Quick
Created2013-07-02T15:46:22.000+0000
Updated2019-06-10T21:52:53.000+0000

Description

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.

Attachments

FileDateSize
OpenUrlTableTest.js2019-05-10T21:46:25.000+00003039

Comments

  1. Rene Pot 2015-09-11

    This should be marked as Parity instead of a new feature.
  2. Fokke Zandbergen 2015-09-16

    We don't have a Parity-type and since it's not a bug, it's a feature :) I've prefixed the title though.
  3. Joshua Quick 2019-05-10

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10881
  4. Joshua Quick 2019-05-10

    Attached [^OpenUrlTableTest.js] to fully test canOpenURL() and openURL() 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.
  5. Samir Mohammed 2019-05-22

    FR Passed. Waiting on Jenkins build.
  6. Christopher Williams 2019-05-31

    merged to master
  7. Keerthi Mahalingam 2019-06-10

    Verified the fix on SDK 8.1.0.v20190606063903. Verified that Ti.Platform.canOpenURL() is supported .
       Operating System
         Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 = 8.2.0.v20190606063615
       

JSON Source