VersoSolutions / CordovaClipboard

Clipboard management plugin for Cordova/PhoneGap
MIT License
144 stars 257 forks source link

[android] remove MIMETYPE_TEXT_PLAIN check #13

Open jonmaim opened 9 years ago

jonmaim commented 9 years ago

This is more like a question instead of a PR.

Can we safely remove this check?

Indeed, it makes copy/pasting from HTML emails to work.

bradrlaw commented 8 years ago

I just did this myself to fix the same issue. However, I think we should make a call to coerceToText() instead of getText() although it does work with just toString().

rodrigograca31 commented 8 years ago

Hi!

I don't know what those lines do but maybe they could be removed... Because it crashes on Amazon Kindle Fire HDX 7 (2013)

(Note: I'm not a Java/Android developer so I don't know if they are necessary....)

logcat:

07-29 15:40:21.434 10679 10728 E PluginManager: Uncaught exception from plugin
07-29 15:40:21.434 10679 10728 E PluginManager: java.lang.NullPointerException
07-29 15:40:21.434 10679 10728 E PluginManager:     at com.verso.cordova.clipboard.Clipboard.execute(Clipboard.java:40)
07-29 15:40:21.434 10679 10728 E PluginManager:     at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
07-29 15:40:21.434 10679 10728 E PluginManager:     at org.apache.cordova.PluginManager.exec(PluginManager.java:133)
07-29 15:40:21.434 10679 10728 E PluginManager:     at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
07-29 15:40:21.434 10679 10728 E PluginManager:     at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
07-29 15:40:21.434 10679 10728 E PluginManager:     at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
07-29 15:40:21.434 10679 10728 E PluginManager:     at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:24)
07-29 15:40:21.434 10679 10728 E PluginManager:     at android.os.Handler.dispatchMessage(Handler.java:102)
07-29 15:40:21.434 10679 10728 E PluginManager:     at android.os.Looper.loop(Looper.java:145)
07-29 15:40:21.434 10679 10728 E PluginManager:     at android.os.HandlerThread.run(HandlerThread.java:61)
07-29 15:40:21.434 10679 10728 D IntentPlugin: IntentPlugin called with options: []

I've found this issue testing through the Amazon Device farm...