Android Question problem with share file, open self app

scsjc

Well-Known Member
Licensed User
Longtime User
Hello,

1º that for receive images on my app, shared from another apps... work perfectly:

manifest:
B4X:
AddActivityText(main,
    <intent-filter>
        <action android:name="android.intent.action.SEND" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="image/*" />
    </intent-filter>
)

main activity:
B4X:
Dim Intent1 As Intent = Activity.GetStartingIntent
    If  Intent1.HasExtra("android.intent.extra.STREAM") Then
        subject = Intent1.GetExtra("android.intent.extra.SUBJECT")
        Dim in As JavaObject = Activity.GetStartingIntent
        file = in.RunMethod("getParcelableExtra", Array("android.intent.extra.STREAM"))
   end if


2º that i use to send images to anothers apps with the library INTENTID:
B4X:
Private INTENT As INTENTID
    INTENT.Initialize
    INTENT.ShareImage(File.DirDefaultExternal,"imagen.jpg")



when join two codes (1 and 2) on a same project...
when i send image.... auto open my main... self app....
can't selected another app to share image

Thanks !!!
 
Last edited:

scsjc

Well-Known Member
Licensed User
Longtime User
Hello Erel,
i rewrite my answer (sorry for my english...)

.. my app is similar a whatsapp. ..
-i need a send images to another apps with share option (i'm use INTENTID library)
-i need a receive images via share from another apps (i'm use android.intent.extra.STREAM)

that work perfectly separate (can i send via share, and receive)
but in moment join on one project... the problem is:

"when i send image from this project to another app (via share).... >>> reopen my project and entry the image via android.intent.extra.STREAM"

can't select the app i want a send shared image

thanks !!!
 
Last edited:
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User

That it, work perfect.. thanks !!!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…