简体   繁体   中英

cordova.exec() is breaking my app code

I am developing an Ipad app with HTML5, Javascript/JQuery Mobile and Cordova/Phonegap. One of its features is to build and send an email, I am doing this using EmailComposer , the problem is that after the emailcomposer's screen runs and I return to the app, many of the list views (generated by Jquery Mobile) stop working.

Debugging I found that this happens when the function cordova.exec() runs. I tried to pass empty args, thought that maybe something were conflicting but the problem persists.

cordova.exec(null, null, "EmailComposer", "showEmailComposer", [args]);

Any idea of what could be causing this?

I don't think the issue is to do specifically with cordova.exec - that is just the method call for any native functionality.

Sounds more like part of your view is being redrawn and not getting enhanced by jQuery Mobile. You can trigger the create or refresh events on jQuery Mobile when you return to your app.

See the section on updating lists at the bottom of this page http://jquerymobile.com/test/docs/lists/docs-lists.html

I also faced the same problem, but now I solved it:

In "cordova.plist" write Key:EmailComposer and value:EmailComposer .

That's it!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM