Tuesday, November 27, 2012

[android-developers] Android 4.1 / 4.2 - How to get real file path for local files in shouldInterceptRequest method

Hi there,

I have an PhoneGap hybrid app that works fine in Android 2, 3 and 4.0. For dealing with query string parameters I use the shouldInterceptRequest method to load local web pages manually. In the previously mentioned Android versions this method receives an url like 'file:///android_asset/www/mylocalwebpage.html?key=val'Easy to handle. However, in Android 4.1 I get something like 'http://127.0.0.1:40582/[somerandomstringidentifier]'. Does anybody have a clue where this string identifier comes from or how to resolve this uri to the actual file path? Any help is greatly appreciated.

Best regards
Chris

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