I am trying to send email using Android app which I build with Mandrill API and this API. And I have registered my app in Mandrill and I got API key from the Mandrill web site and I put it in my app, but the app crashed.
My device (emulator) is already connected with the internet.
This is my API key status:
This is my method and code
public void sendEmail(){
MandrillMessage allMessage = new MandrillMessage("545b0acfc446e44f6734be###########");
// create your message
EmailMessage message = new EmailMessage();
message.setFromEmail("info#mydocapp.net");
message.setFromName("buddy");
message.setHtml("<p>Your appointment added was successfully</p>");
message.setText("Your appointment date was fixed to 2018");
message.setSubject("Your appointment added was successfully");
// add recipients
Recipient recipient = new Recipient();
List<Recipient> recipients = new ArrayList<Recipient>();
recipient.setEmail("sahanpasindu07#gmail.com");
recipient.setName("Sahan");
recipients.add(recipient);
// add attachment if you want
// Attachment attachment = new Attachment();
// List<Attachment> attachments = new ArrayList<Attachment>();
//
// attachment.setType("image/png");
// attachment.setName("Image name");
// attachment.setContent(" set your base64 encode of your file");
// attachments.add(attachment);
message.setTo(recipients);
// message.setImages(attachments);
allMessage.setMessage(message);
allMessage.send();
}
And my logcat was
> 10-06 17:22:06.231 3871-4223/com.me.doctor.doctor_me E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: com.me.doctor.doctor_me, PID: 3871
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.SecurityException: Permission denied (missing INTERNET permission?)
at java.net.InetAddress.lookupHostByName(InetAddress.java:451)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getAllByName(InetAddress.java:215)
at com.android.okhttp.HostResolver$1.getAllByName(HostResolver.java:29)
at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:232)
at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:124)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:272)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:25)
at net.soroushjavdan.androidmandrillinterface.MandrillMessage$1.doInBackground(MandrillMessage.java:96)
at net.soroushjavdan.androidmandrillinterface.MandrillMessage$1.doInBackground(MandrillMessage.java:88)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
at libcore.io.Posix.android_getaddrinfo(Native Method)
at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
at java.net.InetAddress.lookupHostByName(InetAddress.java:438)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getAllByName(InetAddress.java:215)
at com.android.okhttp.HostResolver$1.getAllByName(HostResolver.java:29)
at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:232)
at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:124)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:272)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:25)
at net.soroushjavdan.androidmandrillinterface.MandrillMessage$1.doInBackground(MandrillMessage.java:96)
at net.soroushjavdan.androidmandrillinterface.MandrillMessage$1.doInBackground(MandrillMessage.java:88)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: android_getaddrinfo failed: EACCES (Permission denied)
at libcore.io.Posix.android_getaddrinfo(Native Method)
at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
at java.net.InetAddress.lookupHostByName(InetAddress.java:438)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getAllByName(InetAddress.java:215)
at com.android.okhttp.HostResolver$1.getAllByName(HostResolver.java:29)
at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:232)
at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:124)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:272)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:25)
at net.soroushjavdan.androidmandrillinterface.MandrillMessage$1.doInBackground(MandrillMessage.java:96)
at net.soroushjavdan.androidmandrillinterface.MandrillMessage$1.doInBackground(MandrillMessage.java:88)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
I know there are some ways to achieve my process, but I was thought Mandrill will be easier than Java Mail API. But in Java mail api I had notice some error and also need some changes in mail setting, which is why I choose Mandrill. I am open to better ways of doing this.
This line tells you the cause of the problem.
Caused by: java.lang.SecurityException: Permission denied (missing INTERNET permission?)
Add the line <uses-permission android:name="android.permission.INTERNET" /> to your manifest at the top.
Related
When use premium SDK for android,I cannot init the mapFragment.Flowing is the error message
java.lang.Throwable
at com.nokia.maps.aw.a(EngineError.java:27)
at com.nokia.maps.MapsEngine$h.a(MapsEngine.java:856)
at com.nokia.maps.MapsEngine$h.a(MapsEngine.java:732)
at com.nokia.maps.MapsEngine$h.doInBackground(MapsEngine.java:716)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker
.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
There is my fault,I used a wrong apptoken.
I have tried to send the Accelerometer data to Kaa sandbox and do some data analytics
so I have created and activity to get the accelerometer sensor readings and I also created a Kaa manager to start the kaa client
but I got this error
03-06 17:10:42.117 2945-2978/org.kaaproject.kaa.demo.testAcc I/*ultOperationTcpChannel: Can't sync. Channel [default_operation_tcp_channel] is waiting for CONNACK message + KAASYNC message
03-06 17:10:42.163 2945-2983/org.kaaproject.kaa.demo.testAcc I/AbstractHttpChannel: Processing sync all for channel default_bootstrap_channel
03-06 17:10:42.178 2945-2980/org.kaaproject.kaa.demo.testAcc D/libc: [NET] android_getaddrinfofornetcontext+,hn 9(0x6c6f63616c686f),sn(),hints(known),family 0,flags 1024, proc=org.kaaproject.kaa.demo.testAcc
03-06 17:10:42.184 2945-2980/org.kaaproject.kaa.demo.testAcc E/DefaultBootstrapChannel: Failed to receive operation servers list {}
org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9889 refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:193)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:379)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:470)
at org.kaaproject.kaa.client.transport.AndroidHttpClient.executeHttpRequest(AndroidHttpClient.java:112)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.processTypes(DefaultBootstrapChannel.java:56)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.access$200(DefaultBootstrapChannel.java:32)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel$BootstrapRunnable.run(DefaultBootstrapChannel.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.net.ConnectException: Permission denied
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:379)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:470)
at org.kaaproject.kaa.client.transport.AndroidHttpClient.executeHttpRequest(AndroidHttpClient.java:112)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.processTypes(DefaultBootstrapChannel.java:56)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.access$200(DefaultBootstrapChannel.java:32)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel$BootstrapRunnable.run(DefaultBootstrapChannel.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.net.SocketException: Permission denied
at java.net.Socket.createImpl(Socket.java:454)
at java.net.Socket.connect(Socket.java:584)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:136)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:149)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:379)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:470)
at org.kaaproject.kaa.client.transport.AndroidHttpClient.executeHttpRequest(AndroidHttpClient.java:112)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.processTypes(DefaultBootstrapChannel.java:56)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.access$200(DefaultBootstrapChannel.java:32)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel$BootstrapRunnable.run(DefaultBootstrapChannel.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
03-06 17:10:42.185 2945-2980/org.kaaproject.kaa.demo.testAcc I/DefaultFailoverManager: Server [BOOTSTRAP, -1835393002] failed
03-06 17:10:42.186 2945-2980/org.kaaproject.kaa.demo.testAcc W/DefaultChannelManager: Attempt to connect to the next bootstrap service will be made in 2000 ms, according to failover strategy decision
I have also tried to use the Cell monitor demo, bu I was not receiving anything on MongoDB. Also the source code was missing "kaaManager.start(this);"
After adding this line I got the same error stated above
please help me to solve this issue
Thanks
Joseph
I have solved the issue
1- Open Kaa Sandbox and navigate to
http://>>kaa-sandbox-IP-address<<:9080/sandbox/#management:
Troubleshooting guide
2- Update the Kaa host/IP with the machine host IP address
3- generate the SDK file for the requested platform
4- make sure you are not low disk space
My app has started crashing during the google sign in process.
It wasn't crashing like this before.
Could it be connected to changing the Google Play services version?
What else could cause this crash?
I was able to stop it before by delaying when I implement my OneSignal initialization in the Application class. But, I am not sure how they are connected and have only come across the connection because of trial and error. Changing my OneSignal implementation doesn't seem like a proper solution as it sidesteps a problem that wasn't occurring before and may occur again if I don't find a more specific cause for it.
Also, the crash doesn't always occur during the sign in process.
The main clues from the logcat seem to be:
An error occurred while executing doInBackground()
Caused by: java.util.ConcurrentModificationException
at com.google.android.gms.auth.api.signin.internal.zzb.zzafx(Unknown Source)
at com.google.android.gms.auth.api.signin.internal.zzb.loadInBackground(Unknown Source)
Here is the full logcat:
UncaughtException: java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:142)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)
at com.google.android.gms.auth.api.signin.internal.zzb.zzafx(Unknown Source)
at com.google.android.gms.auth.api.signin.internal.zzb.loadInBackground(Unknown Source)
at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:296)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:54)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:42)
at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:128)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818) `11-11 00:35:53.023 11247-11903/com.example.package E/AndroidRuntime: FATAL EXCEPTION: ModernAsyncTask #1
Process: com.example.package, PID: 11247
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:142)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)
at com.google.android.gms.auth.api.signin.internal.zzb.zzafx(Unknown Source)
at com.google.android.gms.auth.api.signin.internal.zzb.loadInBackground(Unknown Source)
at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:296)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:54)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:42)
at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:128)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
` at java.lang.Thread.run(Thread.java:818)
Thanks in advance.
I have upgraded to Google Play Services v9.6, but now i'm getting a exception if i try to use classes such like BitmapDescriptorFactory.
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: nl.rsdt.japp, PID: 3117
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: IBitmapDescriptorFactory is not initialized
at com.google.android.gms.common.internal.zzac.zzb(Unknown Source)
at com.google.android.gms.maps.model.BitmapDescriptorFactory.zzbsg(Unknown Source)
at com.google.android.gms.maps.model.BitmapDescriptorFactory.fromResource(Unknown Source)
at nl.rsdt.japp.jotial.maps.management.controllers.FotoOpdrachtController$FotoOpdrachtTransducer.generate(FotoOpdrachtController.java:164)
at nl.rsdt.japp.jotial.maps.management.controllers.FotoOpdrachtController$FotoOpdrachtTransducer.transduceToBundle(FotoOpdrachtController.java:125)
at nl.rsdt.japp.jotial.maps.management.transformation.async.AsyncBundleTransduceTask.doInBackground(AsyncBundleTransduceTask.java:31)
at nl.rsdt.japp.jotial.maps.management.transformation.async.AsyncBundleTransduceTask.doInBackground(AsyncBundleTransduceTask.java:15)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
In the previous version(v.9.4) calling MapsInitializer.initialize(context); would enable me to use classes such as BitmapDescriptorFactory. But now it doesn't? I have tried MapsInitializer.initialize(context); witch my Application Context and with my Activity Context but both result in the same exception.
The problem has resolved it self for me, you can see the Issue i made on the Issue Tracker here.
I am facing a problem in Samsung Galaxy J5 device
it always gives me an error can't save image when try to take image from camera, also when try to load image from URI I got an exception
Here is example of the URII That I am trying to open
file:///storage/emulated/0/DCIM/Tango/image.jpg
and here is the exception that I got
E/MediaStore: Failed to insert image
java.io.FileNotFoundException: No such file or directory
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146)
at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:620)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:943)
at android.content.ContentResolver.openOutputStream(ContentResolver.java:690)
at android.content.ContentResolver.openOutputStream(ContentResolver.java:666)
at android.provider.MediaStore$Images$Media.insertImage(MediaStore.java:961)
at com.forsale.forsale.controller.manager.ForSaleServerManager.getImageUri(ForSaleServerManager.java:3641)
at com.forsale.forsale.controller.manager.ForSaleServerManager.getFileObject(ForSaleServerManager.java:3627)
at com.forsale.forsale.controller.manager.ForSaleServerManager$33.doInBackground(ForSaleServerManager.java:2514)
at com.forsale.forsale.controller.manager.ForSaleServerManager$33.doInBackground(ForSaleServerManager.java:2492)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
java.lang.NullPointerException: uriString
at android.net.Uri$StringUri.<init>(Uri.java:471)
at android.net.Uri$StringUri.<init>(Uri.java:461)
at android.net.Uri.parse(Uri.java:433)
at com.forsale.forsale.controller.manager.ForSaleServerManager.getImageUri(ForSaleServerManager.java:3642)
at com.forsale.forsale.controller.manager.ForSaleServerManager.getFileObject(ForSaleServerManager.java:3627)
at com.forsale.forsale.controller.manager.ForSaleServerManager$33.doInBackground(ForSaleServerManager.java:2514)
at com.forsale.forsale.controller.manager.ForSaleServerManager$33.doInBackground(ForSaleServerManager.java:2492)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getName()' on a null object reference
at com.forsale.forsale.controller.manager.MultipartUtility.addFilePart(MultipartUtility.java:54)
at com.forsale.forsale.controller.manager.ForSaleServerManager$33.doInBackground(ForSaleServerManager.java:2515)
at com.forsale.forsale.controller.manager.ForSaleServerManager$33.doInBackground(ForSaleServerManager.java:2492)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
You must check your path first. and if it is correct then look for the image naming as 'image.jpg'. this might solve the problem.