Is there a default email app?

Post your questions and help other users.

Moderator: Martin

Post Reply
Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Is there a default email app?

Post by Econdoc » 24 Feb 2018 19:26

I am probably asking the wrong questions above. Let me see if I can communicate my question.

If I want to send an SMS, whatever texting app I have installed can be made the "default." It is then possible to send an SMS with a system app...com.android.messaging. I would like to write a flow that does the same kind of thing, but for email. It would not matter what email client I was using; as long as it was the "default" client I could send an email with it. I could not find anything resembling that. There is a gmail app, and apps for other installed email clients, but nothing "default."

Am I making any sense?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Is there a default email app?

Post by Desmanto » 25 Feb 2018 04:40

I still don't get it. Do you mean the action in email, equivalent to send sms? Such as "Send email"? Or do you mean the default email app in your phone?

If equivalent to send sms, there is no similar action in Automagic. We only have Mail with Gmail. For other email, you can use Start Activity, choose example, compose email. You can fill in the subject, text and address to send in the extra.

If default email app, that should belong to your system, how it handles default email. Everytime you install email-related app, the default will be reset, nothing you can do about it, you have reselect the default one. If you mean, you want to redirect some intent to certain email app, there is a way you can share the data to automagic intent share receiver first, parse the info and use Start Activity to pass it to another email app.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: Is there a default email app?

Post by Econdoc » 25 Feb 2018 14:01

I can't blame you for not getting it. :D I don't get it either. :lol:

I thought that there was a default (generic) SMS app that was part of the operating system. On my phone, I found com.android.messaging as the Package name and a corresponding ConversationListActivity class name. When run, all the fields of the "default" app were available to be filled in. I thought that this would be available on any android phone so that a flow that I wrote on my phone would also work on someone else's phone. I just discovered that is not true. So now I am back to square one.

Ideally what i would like to do is write a flow to send an email and/or an SMS that will work on any android phone without knowing the email client or the SMS client on that phone. I think my hopes are too high.

For either SMS or email, I need to find the contact I want to send to, and insert a message. The Send SMS action requires that the phone number be filled in. Finding the phone number from the contact_list is beyond my effort level. I also looked at the Intent stuff (which I still do not understand). If I choose an Intent will it open the appropriate app for me to fill in the fields that I need? And, finally, I looked at Start Activity as you suggested, but got lost.

I hope I have not confused you even more.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Is there a default email app?

Post by Desmanto » 25 Feb 2018 17:17

That is quite difficult and not reliable. We don't know the target phone is using standard sms/email or custom sms/email. Even if they don't root/modify the ROM, the vendor can put non-standard sms/email app in the phone (or the user simply choose custom sms/email app), thus making all of our flow fail. You can trigger the activity to start the sms/email app, but there is no guarantee you can pass the same uri/extras, since they can use another parameter. That's why most Automation Apps' projects are very phone-specific.

But if you know the target phone and they never change from the original one, you can be sure the same flow will works in all similar phones.

For phone number or contact, You can use Init Variables Contact Info, this should be standard in all android. You can query based upon name or number. But if you need custom field, or more detail, you need to use query content provider. There are examples to query for phone number. Similar to my other post in other forum (hopes google translate help) : https://www.kaskus.co.id/post/5a43311a1 ... ea4d8b4568

But remember, people save the contact using different name. Some phones even save the phone number by attaching "-" (hyphen) or " " (space), so need to be double-checked.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply