I have the following method to call a browser intent
Using java Syntax Highlighting
- private void callBrowser(String srcDir,String filename) {
- Intent browserIntent = new Intent(Intent.ACTION_VIEW);
- browserIntent.addCategory(Intent.CATEGORY_BROWSABLE);
- browserIntent.setData(Uri.fromFile(new File(srcDir+File.separator+filename)));
- browserIntent.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
- startActivity(browserIntent);
- }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
and am calling this method using
Using java Syntax Highlighting
- callBrowser(destination, "index.html?session_id="+session_id);
Parsed in 0.029 seconds, using GeSHi 1.0.8.4
By using this code i am trying to open a html file (which is there inside sdcard) in browser.
This method is working fine for all urls. But in emulator only. when i test it in device there am getting encoding problem. Means the characters in url which i am passing to browser activity is getting encoded(here i.e from ? to %3f).
at line number 4 in above code, browserintent has been set to encoded data. so the intent object is set to url with encoded characters.
Please help me to avoid url encoding.
Thanks
Shailaja


