use getintent

This forum contains topics that were moved from Get Satisfaction
Gaurav Shiralkar
Posts: 0
Joined: Sat May 23, 2015 3:02 am

use getintent

Post 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?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

use getintent

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

Gaurav Shiralkar
Posts: 0
Joined: Sat May 23, 2015 3:02 am

use getintent

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

use getintent

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

Gaurav Shiralkar
Posts: 0
Joined: Sat May 23, 2015 3:02 am

use getintent

Post 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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

use getintent

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

Post Reply