Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
70 Views

inAppBrowser get a value from a site

Jump to solution

hi
i have an app that opens a website with inAppBrowser and i need to get a value from that site
how can i achive that?

Tags (2)
0 Kudos

Accepted Solutions
Highlighted
70 Views

You cannot access Cordova plugin APIs from within the inAppBrowser. Please see the plugin documentation > https://github.com/apache/cordova-plugin-inappbrowser#cordova-plugin-inappbrowser <

Since your mobile app is not part of your website (it is not a page served up by your website), you have to treat access to data on your website as if you were coming from another domain. So you may have to use an oauth technique or an API published by your web server to do what you want. There is not way to encapsulate all the things you can do on a website into a mobile app, they are two independent entities.

To learn how to do what you want to do I recommend you seach StackOverflow for solutions, search under the PhoneGap and Cordova tags. The XDK creates a standard Cordova app.

View solution in original post

0 Kudos
3 Replies
Highlighted
70 Views

Sorry, but your question is too vague. Try to be more specific.

0 Kudos
Highlighted
Beginner
70 Views

Paul F. (Intel) wrote:

Sorry, but your question is too vague. Try to be more specific.

 

so i opened my website in my app with inappbrowser and i logged in, when the login is done i want to get a value (id) from the website to the app because i need to identify the user. i need this identification because im trying to implement push notifications that are different depending on the user

this line of code: 

window.plugins.OneSignal.sendTag(key, value);
is were i will put the id to send it to one signal

 

0 Kudos
Highlighted
71 Views

You cannot access Cordova plugin APIs from within the inAppBrowser. Please see the plugin documentation > https://github.com/apache/cordova-plugin-inappbrowser#cordova-plugin-inappbrowser <

Since your mobile app is not part of your website (it is not a page served up by your website), you have to treat access to data on your website as if you were coming from another domain. So you may have to use an oauth technique or an API published by your web server to do what you want. There is not way to encapsulate all the things you can do on a website into a mobile app, they are two independent entities.

To learn how to do what you want to do I recommend you seach StackOverflow for solutions, search under the PhoneGap and Cordova tags. The XDK creates a standard Cordova app.

View solution in original post

0 Kudos