6 Replies Latest reply on Apr 23, 2014 7:55 AM by Fernando Coelho da Silva

    Using Intent for share Text

    Fernando Coelho da Silva

      Hi,

       

      I'm trying to use the API Rhodes 4.1 to share a text with other applications on my device.

       

      I'm trying to use the Android API:

       

      http://developer.android.com/training/sharing/send.html

       

       

      SendIntent intent = new Intent ();

      sendIntent.setAction (Intent.ACTION_SEND);

      sendIntent.putExtra (Intent.EXTRA_TEXT, "This is my text to send.");

      sendIntent.setType ("text / plain");

      startActivity (Intent.createChooser (sendIntent, getResources () getText (R.string.send_to)).);

       

       

      How can I do this in Rhodes 4.1?

       

       

      Using Javascript:

       

       

      SendTEXT function () {

      var intentParams = {action: "android.intent.action.SEND"

      intentType: Rho.Intent.START_ACTIVITY,

               uri: "My Text?"};

       

       

      Rho.Intent.send (intentParams);

      }