Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25873] Android: Intent - getData(), getAction() always equal to null

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-04-02T16:43:57.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.2.0
ComponentsAndroid
Labelsescalation
ReporterMotiur Rahman
AssigneeGary Mathews
Created2018-03-16T03:16:50.000+0000
Updated2018-08-06T17:49:21.000+0000

Description

*Issue:* When I use the deep link for my project and try to access the Ti.Android.currentActivity.getIntent().getData() it always returns null for Ti SDK 6.2.0 and above but If I downgrade the SDK to 6.1.2 then it works fine. It cannot read data from incoming intents. *Steps to Reproduce* 1. Create a new alloy App and use the following test code 2. Install the app on any android device. 2. Goto the browser and browse to https://uktvplay.uktv.co.uk site. 3. Click on any episodes 4. It will open up the app but getData() is always null but it should return a URL *Test code:* - https://gist.github.com/MotiurRahman/ca8cd6c8b2745c870836602dfb6875fe *Expected Result:* It should return the URL when the App is opened from the deep link. Thanks!

Comments

  1. Gary Mathews 2018-03-21

    [~mrahman] Try this:
       var win = Ti.UI.createWindow({ backgroundColor: 'gray' });
       
       Ti.Android.currentActivity.addEventListener('newintent', function (e) {
           var data = e.intent.getData();
       
           alert(data: ${data});
       });
       
       win.open();
       
    Everything looks great, but they should be using the newintent event.
  2. Eric Merriman 2018-08-06

    Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.

JSON Source