1 Replies - 453 Views - Last Post: 12 July 2012 - 03:49 PM

#1 liftthis  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 56
  • Joined: 08-May 05

Trying to receive generated link (data) from one App.

Posted 12 July 2012 - 12:33 PM

I am trying to receive a generated link from one app to my text messaging app. This works if I use the default messaging application or even gmail, however I designed my own and I get null data from the intent. Do you have any idea, how to do this.

my manifest is as follow:

This is my manifest:
<activity android:name=".SmsSend" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>



inside my SmsSend create method:


Intent intent = getIntent();
Uri returned_uri = intent.getData();

if (returned_uri == null) 
{
    Toast.makeText(getApplicationContext(), "Uri is Null",
    Toast.LENGTH_LONG).show();
}
else
{
   Toast.makeText(getApplicationContext(), "Uri is full",
   Toast.LENGTH_LONG).show();
}





I have also tried the following code and still get null data:

Intent intent = getIntent();
String data = intent.getDataString();
Toast.makeText(getBaseContext(),data,Toast.LENGTH_SHORT).show();




Is This A Good Question/Topic? 0
  • +

Replies To: Trying to receive generated link (data) from one App.

#2 liftthis  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 56
  • Joined: 08-May 05

Re: Trying to receive generated link (data) from one App.

Posted 12 July 2012 - 03:49 PM

solved by using
http://developer.and...ng/receive.html
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1