AquaMail Forum
English - Android => Bug reports => Topic started by: Kenarude on January 22, 2016, 05:34:35 pm
-
Hello,
I have a NFC tag with an NDEF EMAIL message stored in it. When I use my smartphone (Samsung Android 4.4.2) with it the "e-mail application" listing do not propose AquaMail (there is no default application assigned, GMAIL and EMAIL are listed only). What can I do to add AquaMail to this list.
Thanks in advance.
-
Re: I have a NFC tag with an NDEF EMAIL message stored in it.
Umm, what the hell are those *things*? :)
I found this in stock Email app's AndroidManifest.xml:
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="mailto" />
</intent-filter>
Assuming I copy/paste this into AquaMail's AndroidManifest, what else do I need to do (if anything) in the "message compose" code?
And please bear in mind that I have absolutely no idea what "NFC tag with an NDEF EMAIL message stored in it" is, so if you could explain it would be great.
( and did you really mean "EMAIL message" or "an email *address*" ? )
-
PS:
Would this be necessary too?
This is from stock Email app:
<uses-permission android:name="android.permission.NFC"/>
Adding permissions is not good, users immediately start assuming that "this developer wants to spy on us" or "wants to destroy my phone".
-
Oh and one other thing:
How could I test this?
-
Hi,
Thank you for your quick answer. Sorry but I'm not very good in Android to make a very precise answer.
NFC is an acronym for Near Field Communication, it's a contactless communication between 2 devices (distant of few centimeters max). In Android the NFC stack is deployed under Android Beam and allow to read NFC tags or exchange data between phones (vcard, picture email, bluetooth pairing...). Of course you need a smartphone with NFC capability and an NFC tag (or another smartphone with NFC) to play (or test) with it. (exemple on youtube, search "How to use NFC on Android").
The NDEF message is a format for the exchanged information between 2 NFC devices, this is automatically managed by Android beam. (This format is defined by the NFC Forum, and implemented in android)
I think that you only need to add
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="mailto" />
</intent-filter>
I don't think you need to add permission to NFC as your application is not driving the NFC but as I said I'm not good enough in Android to be sure.
I tried to open a .eml file also (previously saved from thunderbird) but my phone listed only GMAIL and EMAIL. I don't know if there is a generic way to declare the application as a mail client for android.
-
I will try adding the intent filter, please look for it in the next -dev version and let me know.
Re: EML -- AquaMail shows .eml attachments "inline" right inside the "parent" message, and its attachments too.
-
I made a special version with that NFC "stanza" in the manifest, please let me know if it works:
https://www.aqua-mail.com/download/AquaMail-market-1.6.1.0-dev3-nfc.apk
If it does, then I'll include the change in subsequent -dev builds.
-
Hi,
I tested it on 3 different phones and this is working with NFC email.
Thank you.
For eml files I tested it by openning it via a file manager, but it seems not to be as simple as it because I don't have the same reaction with the Samsung File Manager and ES Explorer.
-
Hi,
No, I didn't test it with another e-mail reader. This is not an issue for me, it was just a test because I thought that on Android the action to open an e-mail was generic. My intention was just to mention that the action to open a .eml file is not registered for AquaMail.
For the NFC e-mail, the "intent" is working correctly to propose AquaMail in the default action list to open e-mail from NFC, but the content is not extracted and displayed in the e-mail. I think that it needs more action in the code than the "intent".
Now that I understand better this part of Android, I think that this request should be moved to "features request". But I think they need to be parts of an e-mail client anyway (as GMAIL or EMAIL).
I would like to thank you for the great work you accomplish for this awesome application which replace completely the pre-installed ones.
-
Not sure, AquaMail would have to "accept" eml files data scheme in manifest and parse it itself.
-
Re: NDEF
How can I test this? I don't happen to own any NFC tags.
I also searched Gmail / stock Email code for "NFC" and "NDEF" and came up with nothing other than what's there in the manifest.
I could add this hypothetical additional code -- if I could just find out what it's supposed to be.
-
Hi,
Re: NDEF
How can I test this? I don't happen to own any NFC tags.
To test it, you'll need 2 smartphones with NFC, activate the NFC and Android Beam in the settings (Android 4.4.2 or higher is needed). On the 1st smartphone open an email and fill it (without sending it), hold the 2 devices back to back then if the 2 NFC antenna's are in the field, the 2 smartphones should vibrate and display a message ("tap to send over NFC", or something like that). If you tap on the first with the email, it should be loaded to the second one.
it also works with pictures, contact, ... .
-
Re: If you tap on the first with the email, it should be loaded to the second one.
Whoa.
You're saying that somehow a message -- in the process of being composed -- should be transferred / copied from phone to phone?
Sounds like *a lot* more than what we originally discussed -- triggering on mailto: links coming from NFC tags (I presume)?
-
Hi, found this thread so remove my message and write here.
This url
mailto:aaaa@ukr.net?subject=Hi&body=Test
Typed in Firefox browser composes new message in AquaMail.
But when android reads this line from nfc tag he cannot find what AquaMail can understand this link. And propose just gmail and standard mail apps.
As I understand any data from nfc tags or paired devices are urls or mime+data.
-
Please see the discussion above:
I don't know how I can test this ( don't own any NFC smart tags or whatever they're called, http://www.sonymobile.com/global-en/products/accessories/smarttags-nt3 ).
What @Kenarude described above seems to be for something else.
If you could explain how to test this scenario, I would take a look. So far this is the blocker.