• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.)
 
reply
    Bookmark Topic Watch Topic
  • New Topic