Android Question Mail.GetIntent damaged?

chrjak

Active Member
Licensed User
Longtime User
Hey guys,

When I use Mail.GetIntent some crazy intents like Dropbox or Bluetooth appear. Is this normal? When I open them they cannot handle the mail...

If it's normal: Is there a way to remove single apps from the intent list to remove Dropbox and Bluetooth manually?

Regards
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
because Cursor doesn't become initialized
then i suggest to get this first running
B4X:
    Dim Proj() As String
    Proj = Array As String("_data")
    Dim Cursor As Cursor
    Dim r As Reflector
    Dim Uri As Object
    Uri = r.RunStaticMethod("android.net.Uri", "parse", _
      Array As Object(File.Combine(File.DirDefaultExternal, "file")), _
      Array As String("java.lang.String"))
    r.Target = r.GetContext
    r.Target = r.RunMethod("getContentResolver")
    Cursor = r.RunMethod4("query", _
    Array As Object(Uri, Proj, Null, Null, Null), _
    Array As String("android.net.Uri", _
      "[Ljava.lang.String;", "java.lang.String", _
      "[Ljava.lang.String;", "java.lang.String"))
    Cursor.Position = 0
    Dim res As String
    res = Cursor.GetString("_data")
    Cursor.Close

and then, if running, you can use
B4X:
in.PutExtra("android.intent.EXTRA_STREAM", res)
and try if it works. BUT you need the part with contentesolver running first.
 
Upvote 0
Top