Following this post
http://www.b4x.com/forum/basic4android-updates-questions/11535-there-way-read-emails-gmail-app.html#post64568
It seems that it is impossible retrieve the content of an email from Gmail.
Is that true?
Because there are apps such as Cloud Print, that do it, even in the case of files, getting the full file name.
My Manifest editor
and so my AndroidManifest.xml
From this intent
I get this error
I do not give up, for now. Can you help me translate this?
This is what I have so far :
UriString = content://gmail-ls/messages/mymail@gmail.com/542/attachments/0.1/SIMPLE/false
Last question
It is possible to know the mimetype of the intent?
Thanks for your help
http://www.b4x.com/forum/basic4android-updates-questions/11535-there-way-read-emails-gmail-app.html#post64568
It seems that it is impossible retrieve the content of an email from Gmail.
Is that true?
Because there are apps such as Cloud Print, that do it, even in the case of files, getting the full file name.
My Manifest editor
B4X:
AddPermission (com.google.android.gm.permission.READ_GMAIL)
and so my AndroidManifest.xml
B4X:
<uses-permission android:name="com.google.android.gm.permission.READ_GMAIL"/>
From this intent
B4X:
(Intent) Intent { act=android.intent.action.VIEW dat=content://gmail-ls/messages/mymail@gmail.com/542/attachments/0.1/SIMPLE/false typ=image/jpeg flg=0x3880001 cmp=mlc.calendar/.main }
I get this error
B4X:
java.lang.SecurityException: Permission Denial: reading com.google.android.gm.provider.MailProvider uri content://gmail-ls/messages/mymail@gmail.com/542/attachments/0.1/SIMPLE/false from pid=6324, uid=10089 requires com.google.android.gm.permission.READ_GMAIL
I do not give up, for now. Can you help me translate this?
B4X:
InputStream is = context.getContentResolver().openInputStream(uri);
This is what I have so far :
UriString = content://gmail-ls/messages/mymail@gmail.com/542/attachments/0.1/SIMPLE/false
B4X:
Dim Ins As InputStream
Dim r As Reflector
Dim Uri As Object
Uri = r.RunStaticMethod("android.net.Uri", "parse", _
Array As Object(UriString), _
Array As String("java.lang.String"))
r.Target = r.GetContext
r.Target = r.RunMethod("getContentResolver")
Last question
It is possible to know the mimetype of the intent?
Thanks for your help