Reputation: 441
Sending Email in Android using JavaMail API without using the default/built-in app
the above solution to that question works perfect on the emulator but doesnt work on my ICS device. any reason for this or update fix that might have been introduced for ICS and up?
update: i got it to work by running the latest android os 4.1.2 and changing the manifest to min sdk version 7. i really cant explain why it started working that way. i tried both actual device and avd running build target 4.0.3 and it failed to send with no errors. changed it to the latest 4.1.2 and still nothing. gave up on that so went back to working on another activity but i couldnt run it on my device. i just changed the min sdk to 7 leaving the build target and before finishing for the day tried it again, it somehow worked. also, another change i did to the whole build was adding to the manifest. not sure if that or the minsdk was what fixed it but thought id include the changes.
Upvotes: 2
Views: 1025
Reputation: 47
Although it solved but I had the same problem that solved by using this part of the mentioned solution
I mean using AsyncTask
which allows you to perform asynchronous work on your user interface. An AsyncTask will perform the blocking operations in a worker thread and will publish the results on the UI thread, without requiring you to handle threads and/or handlers yourself.
Upvotes: 0
Reputation: 320
I had the same issue on my android version 4.0.3. Changing the min sdk version to 7 did the trick.
<uses-sdk android:minSdkVersion="7" />
Upvotes: 2