Page 1 of 1

use getintent

Posted: Sat May 23, 2015 3:02 am
by Gaurav Shiralkar

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?


use getintent

Posted: Sat May 23, 2015 3:35 pm
by Evgene Karachevtsev

Hello Gaurav,

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:
http://stackoverflow.com/questions/10...
http://stackoverflow.com/questions/34...


use getintent

Posted: Sat May 23, 2015 8:04 pm
by Gaurav Shiralkar

Thanks Evgene,

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)

I tried writing this code in JavaScript of pageload event on f start screen but it's giving me an error. Is it the right place to write this code snippet ? I have to write this code snippet in the activity..


use getintent

Posted: Tue May 26, 2015 1:36 am
by Yurii Orishchuk

Hello,

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...

Regards.


use getintent

Posted: Tue May 26, 2015 7:47 pm
by Gaurav Shiralkar

Hi,

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
com.borismus.webintent
in it create new folder
www
and put in it
webintent.js
2) in res/xml/config.xml add

feature name="WebIntent"
param name="android-package" value="com.borismus.webintent.WebIntent"
feature

^ its in html tags

3) in the Android/projectName/src/com/
create a folder
borismus
and in it
webintent
and add the file WebIntent.java in it

Please let me know as soon as possible.
Thank You

-Gaurav


use getintent

Posted: Mon Jun 01, 2015 1:30 pm
by Alena Prykhodko

Hello Gaurav,

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).