I iCAB Well-Known Member Licensed User Longtime User Sep 20, 2017 #1 Hi All I was using ahaShare & the code below for app sharing Code: Copy Share.Initialize(Me, "Share") Share.Share("test", "Share Text") At a certain point it was working fine, but now I am getting the following error: java.lang.NullPointerException: Attempt to read from field 'java.lang.ref.WeakReference anywheresoftware.b4a.BA$SharedProcessBA.activityBA' on a null object reference I am also getting the same error with the sample project. 1. I was wondering if there is a solution to fix the above problem 2. Is there a way to call the standard system share as in the link below: https://developer.android.com/training/sharing/shareaction.html Thanks in advance Last edited: Sep 20, 2017
Hi All I was using ahaShare & the code below for app sharing Code: Copy Share.Initialize(Me, "Share") Share.Share("test", "Share Text") At a certain point it was working fine, but now I am getting the following error: java.lang.NullPointerException: Attempt to read from field 'java.lang.ref.WeakReference anywheresoftware.b4a.BA$SharedProcessBA.activityBA' on a null object reference I am also getting the same error with the sample project. 1. I was wondering if there is a solution to fix the above problem 2. Is there a way to call the standard system share as in the link below: https://developer.android.com/training/sharing/shareaction.html Thanks in advance
Almora Well-Known Member Licensed User Longtime User Sep 21, 2017 #2 use this.. https://www.b4x.com/android/forum/t...intents-and-anothers-important-intents.68229/ Upvote 0
S sorex Expert Licensed User Longtime User Sep 21, 2017 #3 you can use this to get a pop-up where they can select the app to share it with Code: Copy Dim i As Intent i.Initialize(i.ACTION_SEND, "") i.SetType("text/plain") i.PutExtra("android.intent.extra.TEXT", "my text") i.WrapAsIntentChooser("some info text") StartActivity(i) Upvote 0
you can use this to get a pop-up where they can select the app to share it with Code: Copy Dim i As Intent i.Initialize(i.ACTION_SEND, "") i.SetType("text/plain") i.PutExtra("android.intent.extra.TEXT", "my text") i.WrapAsIntentChooser("some info text") StartActivity(i)
I iCAB Well-Known Member Licensed User Longtime User Sep 21, 2017 #4 Almora said: use this.. https://www.b4x.com/android/forum/t...intents-and-anothers-important-intents.68229/ Click to expand... Hi Almora Thanks for your reply. I did look into this before and yes it is extremely powerful. But the difficulty I had with it: is how to check for available options and create a popup with the standard icons as in the solution by suggested Sorex Upvote 0
Almora said: use this.. https://www.b4x.com/android/forum/t...intents-and-anothers-important-intents.68229/ Click to expand... Hi Almora Thanks for your reply. I did look into this before and yes it is extremely powerful. But the difficulty I had with it: is how to check for available options and create a popup with the standard icons as in the solution by suggested Sorex
I iCAB Well-Known Member Licensed User Longtime User Sep 21, 2017 #5 sorex said: you can use this to get a pop-up where they can select the app to share it with Code: Copy Dim i As Intent i.Initialize(i.ACTION_SEND, "") i.SetType("text/plain") i.PutExtra("android.intent.extra.TEXT", "my text") i.WrapAsIntentChooser("some info text") StartActivity(i) Click to expand... Hi Sorex This is exactly what I was looking for. Now I just have to figure out how to attach and image/icon and I'm done. Thanks for your help. Upvote 0
sorex said: you can use this to get a pop-up where they can select the app to share it with Code: Copy Dim i As Intent i.Initialize(i.ACTION_SEND, "") i.SetType("text/plain") i.PutExtra("android.intent.extra.TEXT", "my text") i.WrapAsIntentChooser("some info text") StartActivity(i) Click to expand... Hi Sorex This is exactly what I was looking for. Now I just have to figure out how to attach and image/icon and I'm done. Thanks for your help.