kevalpatel2106 / EmoticonGIFKeyboard

An advance Emoticons & GIF keyboard.
Apache License 2.0
270 stars 54 forks source link

RuntimeException when Activity was killed in background and try to reopen it #20

Open WebShaper opened 5 years ago

WebShaper commented 5 years ago

I get a RuntimeException when:

Enabling the Settings > System > Developer options > Don’t keep activities option. The activity gets killed when leaving it.
Open the app and open the view with all emoji Icons.
Press Home button to leave the app.
Reopen the App.

It only happens when to Popup is open.

java.lang.RuntimeException: An error occurred while executing doInBackground()
    at android.os.AsyncTask$3.done(AsyncTask.java:353)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
    at java.util.concurrent.FutureTask.run(FutureTask.java:271)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    at java.lang.Thread.run(Thread.java:764)
 Caused by: java.lang.RuntimeException: Set GIF provider.
    at com.kevalpatel2106.emoticongifkeyboard.internal.gif.GifFragment$TrendingGifTask.doInBackground(GifFragment.java:214)
    at com.kevalpatel2106.emoticongifkeyboard.internal.gif.GifFragment$TrendingGifTask.doInBackground(GifFragment.java:201)
    at android.os.AsyncTask$2.call(AsyncTask.java:333)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
    at java.lang.Thread.run(Thread.java:764) 
karanianandkumar commented 5 years ago

@WebShaper did you get a solution? I am facing the same issue, even though I pass null for gifconfig while initialization.