I want to use Uri data = getIntent().getData(); in my application to extract some parameters from the calling URI. Where should I place this code so that it is executed when the application is called?
Could you please clarify how do you want to call your app? Should it be called somehow unusual? Otherwise you may try use this call on pageload event of the start page. Also please look at these links, they may be useful for you:
I am calling the mobile app from web app. The link in web app is myappname://para1/para2. So when user clicks on it, myappname mobile app gets called. I have updated the manifest file. Now I am trying to extract the para1 and para2 using uri as
Uri data = getIntent().getData();
Code: Select all
List params = data.getPathSegments(); String first = params.get(0); String second=params.get(1)
getIntent - is native code. And could be used only there. Appery.io is phonegap-based app. Thus you can not access this information with this code.
But you can add Webintent phonegap plugin to access this information.
See details here: http://stackoverflow.com/questions/18...
And here is how to use plugin in Appery.io : https://devcenter.appery.io/documenta...
I incorporated the webintent phonegap plugin following the instructions n your docs.
When I fire alert(window.plugins.webintent); on device ready, it returns undefined.
Can you please help me, how to check if the plugin is configured correctly??
I am using https://github.com/Initsogar/cordova-...
and done the following:
1) in the Android/projectName/assets/www/files/resources/lib/plugins/
create a folder
in it create new folder
and put in it
2) in res/xml/config.xml add
param name="android-package" value="com.borismus.webintent.WebIntent"
^ its in html tags
3) in the Android/projectName/src/com/
create a folder
and in it
and add the file WebIntent.java in it
Please let me know as soon as possible.
Sorry for delayed reply here.
Unfortunately this is something outside the scope of standard Appery.io platform support. You may consider purchasing Advisory Pack to get more in-depth help on this question. Here is more information about Advisory Pack (http://appery.io/services/#Advisory_Pack).