• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to send or Receive Binary Content from one app to another app

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am following this article
http://developer.android.com/training/sharing/send.html#send-binary-content
and this
http://developer.android.com/training/sharing/receive.html

so far I have made two application one is sending a Image and Other is receiving an Image
first comes to sending Image application this is my code


I have set this event on my button click.
Image is my drawable folder


On other activity I have code like this .I have an ImageView their on second activity.
second activity onCreate()


and here is my handleSendImage(intent) method.



this is my AndroidManifest.xml file in secondApp

<activity
android:name="com.example.datareceivingsimpletext.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>


<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>

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


Where am I wrong?

Although i can get simple text easily from one application to another but not Image.


Thanks
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What makes you think that anything is going wrong? Remember that we have no idea what's happening on your device. Also be sure to post any exceptions from the logcat, or mention the fact that there aren't any.
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not getting any Image Display on my ImageView.

About Logcat their is not any Logcat Because I have Install that on my app both app.

 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is *always* a logcat.

Because I have Install that on my app both app.

I don't understand what you're trying to say with this.

Precisely which lines of code that you posted in the 2nd and 3rd code snippet above is being executed? if you don't know, start by finding out. What are the values of the 3 variables? (Not what you *think* they are, what they *actually* are.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic