SMS plug-in

29 posts, 0 answers
  1. Павел
    Павел avatar
    2 posts
    Member since:
    Jun 2012

    Posted 12 Aug 2012 Link to this post

    Is here any ways to get SMS functions of Android?
  2. sdobrev
    sdobrev avatar
    54 posts
    Member since:
    Sep 2012

    Posted 14 Aug 2012 Link to this post

    Hi Павка,

    SMS for Android can be achieved via this PhoneGap plugin. Plugins are the current most requested feature on our feedback portal and they are very high in our backlog.

    Hope this helps.
  3. Benjamin
    Benjamin avatar
    1 posts
    Member since:
    Nov 2012

    Posted 03 Dec 2012 Link to this post

    Hi, I just want to know, how I must include this plug-in in Icenium ? What are the main steps ?
  4. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 04 Dec 2012 Link to this post

    Hi Benjamin,

    This plugin is not supported in Icenium yet. What you can do is to go to our feedback portal and vote for it so we can prioritize it in our backlog according to the votes its get. 

    -sdobrev

    Share feedback and vote for features on our Feedback Portal.
    Want some Kendo UI online training - head over to Pluralsight.
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 05 Jul 2013 Link to this post

    Hi guys,

    This is just a follow up in case you have missed the Icenium 1.6 release, where we've added the ability to add Plugman-compatible Apache Cordova plugins to your Icenium project. For more information, see Working with Custom Plugins help article.

    If it is not compatible, you would have to make the necessary modifications in order to be able to use it, see Requirements for Custom Apache Cordova Plugins and Plugman specifications.

    For the full list of shiny goodies that made it in the 1.6 release, please refer to the Icenium 1.6 Release Notes.

    Regards,
    Steve
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Missed our first webinar, watch it here.
    Share feedback and vote for features on our Feedback Portal.
  6. Nahid
    Nahid avatar
    10 posts
    Member since:
    Aug 2013

    Posted 13 Sep 2013 Link to this post

    Is there any example app with this SMS plug-in? My problem is: when I run my application, it says window.plugins.sms is undefiened, though I followed settiings like the pushnotification plugin-in.
  7. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 18 Sep 2013 Link to this post

    Hello Nahid,

    The plugin from the link my colleague has posted is compatible with 1.5.0 version of Cordova, which is not supported in Icenium. We have found a newer 2.7.0 compatible SmsPlugin. Before using it you should make it plugman compatible. More information could be found here.

    We have attached a sample project that seems to be working. We have hard coded the number and the text message so feel free to modify them appropriately.

    Regards,
    Steve
    Telerik

    Big news for mobile app and .NET developers! Hear about it at our Release Keynote. Thursday, September 26th, 11AM EDT
    Do you enjoy Icenium? Vote for it in Windows IT Pro Community Choice Awards as Best Cloud Computing Product or Service (Category 5).
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  8. Nahid
    Nahid avatar
    10 posts
    Member since:
    Aug 2013

    Posted 18 Sep 2013 Link to this post

    Hi Steve,
    Many thanks for your help. I downloaded your sample project, and could run it without changing anything. Now my another question is: if I try to modify the plugin.xml of any plugins, the plugin doesn't work at all. Suppose if I want to add option for ios, which way I should modify the plugin.xml file.  Is there any online software what can validate the plugin.xml for plugman? When I modify a plugin.xml file, I cannot compile the code anymore. Though I check the plugman specification when I modify the plugin.xml.

    Thanks in advace.

    Nahid
  9. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 20 Sep 2013 Link to this post

    Hello Nahid,

    Can you please paste the contents of your plugin.xml here in the forum thread? We will look into and point you to any issues we find out. You can also send us the error you are getting back from Icenium.

     

    Regards,
    Stefan Dobrev
    Telerik

    Big news for mobile app and .NET developers! Hear about it at our Release Keynote. Thursday, September 26th, 11AM EDT
    Do you enjoy Icenium? Vote for it in Windows IT Pro Community Choice Awards as Best Cloud Computing Product or Service (Category 5).
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  10. Nahid
    Nahid avatar
    10 posts
    Member since:
    Aug 2013

    Posted 20 Sep 2013 Link to this post

    Hi Stefan,
    Actually I need an application which can send sms to both android and ios. SmsPluglin only works for android, so I tried to add SMSComposer plugin with SmsPlugin. At first I  used smsplugin.js and SMSComposer.js file separately. Later I moved functionality  from SMSComposer.js to smsplugin.js to use only one js file call. I created a folder ios beside android and copied SMSComposer .h and .m files. 

    Below is the copy of plugin.xml when I used smsplugin.js and SMSComposer.js file separately. Many thanks for your kind help.

    Regards,

    Nahid


    <?xml version="1.0" encoding="UTF-8"?>

    <plugin xmlns="http://cordova.apache.org/ns/plugins/1.0" id="com.phonegap.plugins.smsplugin"
    version="0.1.0">   

    <!-- android -->
    <platform name="android">
         <asset src="www/smsplugin.js" target="Plugins/SMSPlugin/smsplugin.js" />
    <config-file target="AndroidManifest.xml" parent="/manifest">
    <uses-permission android:name="android.permission.SEND_SMS" />
    </config-file>
    <config-file target="res/xml/plugins.xml" parent="/plugins">
    <plugin name="SmsPlugin"
    value="com.phonegap.plugins.smsplugin.SmsPlugin"/>
    </config-file>
    <config-file target="res/xml/config.xml" parent="plugins">
    <plugin name="SmsPlugin"
    value="com.phonegap.plugins.smsplugin.SmsPlugin"/>
    </config-file>

    <source-file src="src/android/SmsPlugin.java" target-dir="src/com/phonegap/plugins/smsplugin" />
    </platform>
    <!-- ios -->
        <platform name="ios">
        <asset src="www/SMSComposer.js" target="Plugins/SMSPlugin/SMSComposer.js" /> 

        <plugins-plist key="SMSComposer" string="SMSComposer" />
    <config-file target="res/xml/plugins.xml" parent="/plugins">
            <feature name="SMSComposer">
                    <param name="ios-package" value="com.phonegap.plugins.smsplugin.SMSComposer"/>
                    <param name="onload" value="true" />
                </feature>
            </config-file>    
         <source-file src="src/android/SMSComposer.h"/>
         <source-file src="src/android/SMSComposer.m"/>   
        </platform>
    </plugin>

  11. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 25 Sep 2013 Link to this post

    Hello Nahid,

    It seems that the values you have used for iOS in the plugin.xml are incorrect. For example the value of the ios-package parameter under feature should be the name of the native class in Objective-C - SMSComposer. For header files you should use the header-file element, not source-file. Also it would be better if iOS source files are in directory named ios, not android. Plugins-plist element is also not necessary, because it is a legacy one for old Cordova versions. Here you can find an example of a plugin.xml configuration for iOS.

    As a side note will an SMS URL scheme link work for your case. Here is a blog post that illustrates its usage.
     

    Regards,
    Stefan Dobrev
    Telerik

    Big news for mobile app and .NET developers! Hear about it at our Release Keynote. Thursday, September 26th, 11AM EDT
    Do you enjoy Icenium? Vote for it in Windows IT Pro Community Choice Awards as Best Cloud Computing Product or Service (Category 5).
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  12. Audrey
    Audrey avatar
    52 posts
    Member since:
    Jan 2013

    Posted 07 Oct 2013 Link to this post

    Hello,
    I try to send sms via plugin. On Android I used the plugin you linked and it works perfectly but for iOS I tried 3 plugins and no one worked... I think it comes from the plugin.xml file but I don't knoxw how to really code it !
    Best regards
  13. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 09 Oct 2013 Link to this post

    Hi Audrey,

    This plugin is not plugman compatible and is build against older Cordova version. You can learn how to make a plugin, plugman compatible by referring to our documentation: Make a Custom Plugin Plugman-Compatible.

    I've found a more recent plugin for sending SMS for iOS here and it is already plugman compatible. Try using it instead in your Icenium app (see Import Custom Plugins) and let us know how it goes.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  14. Audrey
    Audrey avatar
    52 posts
    Member since:
    Jan 2013

    Posted 11 Oct 2013 Link to this post

    Hi, thanks for your reply. I tried the plugin you linked but it doesn't work anymore...
  15. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 15 Oct 2013 Link to this post

    Hello Audrey,

    I've modified the referenced plugin to work with Cordova 3.0 and it runs successfully in Icenium app. For your convenience I've attached a sample app that utilizes the modified plugin.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  16. Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2013 Link to this post


    Anyway to also release the compatible Android SMS plugin -- Need it so bad :[
  17. Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 16 Oct 2013 Link to this post

    According to this page, SMS is 'completed' - but I couldn't find any information about how to send SMS for both Android and iOS
  18. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 18 Oct 2013 Link to this post

    Hello Idan,

    The project I've attached in the post from 18-Sep-2013 works with Cordova 2.7, so you only need to apply the modifications to plugin.xml that are listed here in order to get it running under Cordova 3.0. Plugin.xml should look like this (not tested):

    <?xml version="1.0" encoding="UTF-8"?>
     
    <plugin xmlns="http://cordova.apache.org/ns/plugins/1.0" id="com.phonegap.plugins.smsplugin"
            version="0.1.0">
     
      <js-module src="www/smsplugin.js" name="plugins.smsPlugin">
        <clobbers target="plugins.smsPlugin" />
      </js-module>
     
      <!-- android -->
      <platform name="android">
        <config-file target="AndroidManifest.xml" parent="/manifest">
          <uses-permission android:name="android.permission.SEND_SMS" />
          <uses-permission android:name="android.permission.WRITE_SMS" />
        </config-file>
        <config-file target="res/xml/config.xml" parent="/*">
          <feature name="SmsPlugin">
            <param name="android-package" value="com.phonegap.plugins.smsplugin.SmsPlugin" />
          </feature>
        </config-file>
     
        <source-file src="src/android/SmsPlugin.java" target-dir="src/com/phonegap/plugins/smsplugin" />
      </platform>
    </plugin>


    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  19. Nitesh
    Nitesh avatar
    8 posts
    Member since:
    Oct 2013

    Posted 16 Jan 2014 Link to this post

    Hello Steve  i used this in my app in icenium , i referred the js file in head section wrote  the code but when i build it gives one error.
  20. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 17 Jan 2014 Link to this post

    Hello Nitesh,

    There is no need to register the js file manually as it is already registered by the js-module. I've provided working plugins for both iOS and Android in my replies below, so please try with any of the attachments.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  21. Nitesh
    Nitesh avatar
    3 posts
    Member since:
    Dec 2013

    Posted 09 Feb 2014 in reply to Steve Link to this post

    Hello Steve i tried android plugin but when i build that project it gives one error.
  22. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 12 Feb 2014 Link to this post

    Hi Nitesh,

    As per the exception details you've provided in your other post, the problem is that the plugin should be updated to be Cordova 3.0 compatible. You will need to remove "api" from the import statement:

    Was:

    import org.apache.cordova.api.Plugin; 
    import org.apache.cordova.api.PluginResult;

    Should be:

    import org.apache.cordova.CordovaPlugin; 
    import org.apache.cordova.PluginResult;

    For more information: Cordova 3.0 – Stuff You Should Know.

    Regards,
    Steve
    Telerik
    Icenium is now Telerik AppBuilder, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
  23. Nitesh
    Nitesh avatar
    8 posts
    Member since:
    Oct 2013

    Posted 15 Feb 2014 in reply to Steve Link to this post

    Hii Steve. yes after removing api it is not giving error . but when i run my app on device it's not working it means it's not sending the message. i have enabled the wifi as well.
    i have given the snapshot please check and let me know why its not working
  24. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 20 Feb 2014 Link to this post

    Hello Nitesh,

    Indeed this plugin no longer works in Cordova 3.2 and we would have to look at it and see what is wrong. For the time being, you can find another Cordova plugin that works on Android and Cordova 3.x, there are quite a few results here.

    Regards,
    Steve
    Telerik
    Icenium is now Telerik AppBuilder, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
  25. Kabir
    Kabir avatar
    2 posts
    Member since:
    Aug 2013

    Posted 14 Apr 2014 Link to this post

    I integrate the SmsPlugin with Icenium app after install apk on device it gives me TypeError:cannot read property 'smsPlugin' of undefined..
    any help..
  26. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 17 Apr 2014 Link to this post

    Hello Kabir,

    I suppose, you are trying to integrate this sms plugin. Please, correct me if I am wrong.

    I managed to import it in an AppBuilder project, by:
    1. Downloading the Zip from here;
    2. Creating a new blank project inside AppBuilder;
    3. Importing the archived plugin, as described here;
    4. And finally, I added an initialization check on DeviceReady;

    This resulted with success when deployed on Android device. I have attached my project for your guidance.

    However, I also tried this plugin, as it supports both the iOS and the Android platforms. It also worked, after executing the above provided steps.

    I hope this helps.

    Regards,
    Kaloyan
    Telerik
     

    Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

     
  27. Kabir
    Kabir avatar
    2 posts
    Member since:
    Aug 2013

    Posted 29 Apr 2014 in reply to Kaloyan Link to this post

    thanks Kaloyan sir...now its working well....
  28. nosniw
    nosniw avatar
    1 posts
    Member since:
    Sep 2014

    Posted 01 Sep 2014 in reply to Kaloyan Link to this post

    hai kaloyan,

    the latest code example that you given is not working on my newest telerik version, 

    there is some alert of 'SMS plugin NOT initialized!'

    can i ask you for some help?

    thanks
  29. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 04 Sep 2014 Link to this post

    Hello nosniw,

    I just tested the above provided sample and it works as expected on actual devices and native emulators. Please, note that the sample won't work in the AppBuilder simulator, as there custom plugins are disabled. Also, if you are building and deploying the application via any of our Companion Apps, it is expected the custom plugin to be undefined. This is a known limitation of our Comapnion Apps.

    Further, if the above assumptions are not the issue on your side, please provide a bit more details on the matter you are experiencing. For example, on what device you are reproducing it and what is its operating system. Having the needed information, I will be happy to help you out.

    Regards,
    Kaloyan
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top