incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Bowser (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-1379) Data URIs do not work on Android
Date Thu, 06 Sep 2012 19:21:08 GMT

     [ https://issues.apache.org/jira/browse/CB-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Joe Bowser resolved CB-1379.
----------------------------

    Resolution: Fixed

Easy addition, we don't want to override the URL loading on this one, so we simply detect
DATA URIs and return false.
                
> Data URIs do not work on Android
> --------------------------------
>
>                 Key: CB-1379
>                 URL: https://issues.apache.org/jira/browse/CB-1379
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.1.0
>            Reporter: Andrew Grieve
>            Assignee: Joe Bowser
>             Fix For: 2.2.0
>
>
> The following code should create an iframe that says "asdf":
> var frame = document.createElement('iframe');
> frame.style.background = 'red';
> frame.src = 'data:text/html;charset=utf-8,%3C%21DOCTYPE%20HTML%3E%3Chtml%3E%3Cbody%3Easdf%3C%2Fbody%3E%3C%2Fhtml%3E'
> document.body.appendChild(frame);
> Instead, it gets blocked and a log message shows up:
> 08-31 20:12:37.873: E/Cordova(13151): Error loading url data:text/html;charset=utf-8,%3C%21DOCTYPE%20HTML%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3Easdf%3C%2Fbody%3E%3C%2Fhtml%3E
> 08-31 20:12:37.873: E/Cordova(13151): android.content.ActivityNotFoundException: No Activity
found to handle Intent { act=android.intent.action.VIEW dat=data:text/html;charset=utf-8,%3C%21DOCTYPE%20HTML%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3Easdf%3C%2Fbody%3E%3C%2Fhtml%3E
}
> 08-31 20:12:37.873: E/Cordova(13151): 	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
> 08-31 20:12:37.873: E/Cordova(13151): 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
> 08-31 20:12:37.873: E/Cordova(13151): 	at android.app.Activity.startActivityForResult(Activity.java:2827)
> 08-31 20:12:37.873: E/Cordova(13151): 	at android.app.Activity.startActivity(Activity.java:2933)
> 08-31 20:12:37.873: E/Cordova(13151): 	at org.apache.cordova.CordovaWebViewClient.shouldOverrideUrlLoading(CordovaWebViewClient.java:222)
> 08-31 20:12:37.873: E/Cordova(13151): 	at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:216)
> 08-31 20:12:37.873: E/Cordova(13151): 	at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:323)
> 08-31 20:12:37.873: E/Cordova(13151): 	at android.os.Handler.dispatchMessage(Handler.java:99)
> 08-31 20:12:37.873: E/Cordova(13151): 	at android.os.Looper.loop(Looper.java:130)
> 08-31 20:12:37.873: E/Cordova(13151): 	at android.app.ActivityThread.main(ActivityThread.java:3683)
> 08-31 20:12:37.873: E/Cordova(13151): 	at java.lang.reflect.Method.invokeNative(Native
Method)
> 08-31 20:12:37.873: E/Cordova(13151): 	at java.lang.reflect.Method.invoke(Method.java:507)
> 08-31 20:12:37.873: E/Cordova(13151): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
> 08-31 20:12:37.873: E/Cordova(13151): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
> 08-31 20:12:37.873: E/Cordova(13151): 	at dalvik.system.NativeStart.main(Native Method)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message