I have use URL Scheme with parameter in android app. If this application not open when it call from the other application it work perfecter
In app.js
//APP START if (osname == "android") { var full_path = Ti.Android.currentActivity.intent.data; alert("THIS WORK!!! first time start with other application : "+Ti.Android.currentActivity.intent.data); //DO SOMETHING....I can do that value from other app correct } //RESUME if(osname == "android"){ Ti.Android.currentActivity.addEventListener('resume', function() { alert("THIS NOT WORK!!! resume android : "+Ti.Android.currentActivity.intent.data); //DO SOMETHING.....but I can not do that because value from other app alway null }); }
this is tiapp.xml
<android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <!-- keep any custom attributes for application --> <application> <activity android:alwaysRetainTaskState="true" android:configChanges="keyboardHidden|orientation" android:label="XXXXXX" android:launchMode="singleTask" android:name=".XXXXXX" android:theme="@style/Theme.Titanium"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <intent-filter> <data android:scheme="myappscheme"/> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.BROWSABLE"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </activity> </application> </manifest> </android>I have been add android:alwaysRetainTaskState="true" and android:launchMode="singleTask" same this tutorial http://fokkezb.nl/2013/08/26/url-schemes-for-ios-and-android-1/
But not work for me, App not restart when other app call and resume value alway null
My test in Android Device and Titanium SDK 3.1.3 GA
Please help.