I hope someone can help me,
i made an textbased app for android. I want user to push on a button and the text above will be copied and used on the clipboard of the phone.
I now have this:
<button onclick="copyToClipboard('Text that i want to copy on the phone');">Copy text button</button>
The device plugin is loaded but the button doesn't work.. I need the buttons on every page so the users can copy my text.
I do not believe the copyToClipboard() function will work in a webview. Your app does not run inside a browser, it runs in a special runtime environement known as a webview. While it appears like a browser, it is not. I suspect you need to find a Cordova plugin that will allow you to copy data into the platform-specific clipboard.