Ken Vernaillen
Ken Vernaillen

Reputation: 859

IBM Worklight 6.1 - How to get Intent data in Javascript?

I have made an application where an activity is browsable. I followed the same code as here.

In Android code I can easily can get the URL from where it was redirected.

Uri data = getIntent().getData();
String scheme = data.getScheme(); // "http"
String host = data.getHost(); // "twitter.com"
List<String> params = data.getPathSegments();
String first = params.get(0); // "status"
String second = params.get(1); // "1234"

How can I get this Intent data to JavaScript? Is there an easy way?
I am working with Worklight 6.1, that works with Cordova 3.1.

Upvotes: 0

Views: 404

Answers (1)

Idan Adar
Idan Adar

Reputation: 44516

I think this training module will be beneficial:

The training module, and sample, show how to transfer data from Hybrid to Native and back.

Upvotes: 2

Related Questions