F
F
Forge01002016-01-08 23:13:22
phonegap
Forge0100, 2016-01-08 23:13:22

How to use plugins in PhoneGap Desktop?

I can't figure out how to use plugins with PhoneGap Desktop and PhoneGap App (Android).
In general, I figured out how to install plugins, first I install the plugin itself through the console, example:
phonegap local plugin add cordova-sms-plugin,
and then I write it in config.xml like this:
<gap:plugin name="com.cordova.plugins.sms"/>,
I write in the js file like this:

sms.send('+380937777777', 'Hi, Man!', {},
        function() {
            alert('Good');
        },
        function() {
            alert('Bad');
        });

but nothing happens.
I also tried to use the Device plugin, namely the command, and it
alert(device.model);
also does not work.
Basically, I don't want to use the Android Studio + PhoneGap bundle because of the very long compilation.
What am I doing wrong? Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question