Wednesday, August 31, 2011

[android-developers] javascript call from intent browser

Need a help on Android .Hope you can help us on this .

From our application we are opening the browser using intent.

Here is the code


Uri uri = Uri
.parse("http://
www.google.com");

Intent internetIntent
= new Intent(Intent.ACTION_VIEW, uri);

internetIntent.setComponent(new ComponentName(

"com.android.browser",

"com.android.browser.BrowserActivity"));


internetIntent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);


startActivity(internetIntent);


We are setting the flag FLAG_ACTIVITY_BROUGHT_TO_FRONT in the Intent
so that next time if we open the browser from our application then it
should bring the same tab in front instead of creating another
instance as the application id is the same and it is working fine

Issue is we need to call the JavaScript function defined in the
webpage .How can we call the javascript function using the intent
browser
From webview you can do that but we are not able to use the webview as
it doesn't fully support the html 5

Thanks
-ag


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment