I had to add an "Send feedback" an my app, there are lots of examples in the forum to do this, but, all of them are wrong.
The main problem is that they dont create a TRUE email intent, so, many other apps (NO mail clients) are shown on the IntentChooser, like Google drive, Telegram, etc.
Its is bad if you put a "Send email" button aon your app and the user is taken to his Google Drive.
Wrong Code:
Correct Code:
Using this metod, will show only mail apps in the IntentChooser.
The main problem is that they dont create a TRUE email intent, so, many other apps (NO mail clients) are shown on the IntentChooser, like Google drive, Telegram, etc.
Its is bad if you put a "Send email" button aon your app and the user is taken to his Google Drive.
Wrong Code:
B4X:
Dim Message As Email
Dim intent1 As Intent
Message.To.Add("example@outlook.com")
Message.Subject = "Feedback"
intent1 = Message.GetIntent
StartActivity(intent1)
Correct Code:
B4X:
Dim intent1 As Intent
intent1.Initialize("android.intent.action.SENDTO", "mailto:example@outlook.com")
intent1.putExtra("android.intent.extra.SUBJECT", "This is the subject")
intent1.putExtra("android.intent.extra.TEXT", "This is the message body")
intent1.WrapAsIntentChooser("Send feedback")
StartActivity(intent1)
Using this metod, will show only mail apps in the IntentChooser.
Please like it this was helpfull to you
Last edited: