Git Product home page Git Product logo

Comments (4)

Letme avatar Letme commented on September 14, 2024

This is is probably crash description:
java.lang.RuntimeException: Unable to resume activity {give_me_coins.dashboard/give_me_coins.dashboard.MainScreen}: java.lang.NullPointerException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2798)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2231)
at android.app.ActivityThread.access$700(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4998)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at give_me_coins.dashboard.MainScreen.setToLocalGMCInfo(MainScreen.java:1464)
at give_me_coins.dashboard.MainScreen.onResume(MainScreen.java:1529)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1192)
at android.app.Activity.performResume(Activity.java:5322)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2759)
... 12 more

----------- below code in onResume solved some problems in case it will help ---------------------
@OverRide
protected void onResume() {
super.onResume();
if(DEBUG) Log.d(TAG,"onResume");
isRunning=true;
oStickyService = GmcStickyService.getInstance(btc_callback, ltc_callback, ftc_callback);
if( oStickyService == null)
{
context.startService( new Intent(context, GmcStickyService.class) );
oStickyService = GmcStickyService.getInstance(btc_callback, ltc_callback, ftc_callback);
}
else
{
switch(coin_select)
{
case(1):
setToLocalGMCInfo(oStickyService.getLTCInfo());
break;
case(2):
setToLocalGMCInfo(oStickyService.getBTCInfo());
break;
case(3):
setToLocalGMCInfo(oStickyService.getFTCInfo());
break;
default:
setToLocalGMCInfo(oStickyService.getLTCInfo());
break;
}
}
if( mPoolService==null) startService();
if( oStickyService != null)
oStickyService.forceUpdate();
updateNow();
mAppSectionsPagerAdapter.notifyDataSetChanged();
}


With onResume opening new StickyService, the old Activity does not receive updates. Maybe a good idea would be to implement back Handler, to inform activity of new updates, which will then update app. This will as well show "loading notification" to Resumed app.
User also complained that if he clicks home (pause), and re-opens application, then above error occurs.

from give-me-coinsmonitoringapp.

MrPet avatar MrPet commented on September 14, 2024

I will look into that.

Crt [email protected] schrieb:

This is is probably crash description:
java.lang.RuntimeException: Unable to resume activity {give_me_coins.dashboard/give_me_coins.dashboard.MainScreen}: java.lang.NullPointerException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2798)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2231)
at android.app.ActivityThread.access$700(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4998)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at give_me_coins.dashboard.MainScreen.setToLocalGMCInfo(MainScreen.java:1464)
at give_me_coins.dashboard.MainScreen.onResume(MainScreen.java:1529)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1192)
at android.app.Activity.performResume(Activity.java:5322)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2759)
... 12 more

----------- below code in onResume solved some problems in case it will help ---------------------
@OverRide
protected void onResume() {
super.onResume();
if(DEBUG) Log.d(TAG,"onResume");
isRunning=true;
oStickyService = GmcStickyService.getInstance(btc_callback, ltc_callback, ftc_callback);
if( oStickyService == null)
{
context.startService( new Intent(context, GmcStickyService.class) );
oStickyService = GmcStickyService.getInstance(btc_callback, ltc_callback, ftc_callback);
}
else
{
switch(coin_select)
{
case(1):
setToLocalGMCInfo(oStickyService.getLTCInfo());
break;
case(2):
setToLocalGMCInfo(oStickyService.getBTCInfo());
break;
case(3):
setToLocalGMCInfo(oStickyService.getFTCInfo());
break;
default:
setToLocalGMCInfo(oStickyService.getLTCInfo());
break;
}

}
if( mPoolService==null) startService();
if( oStickyService != null)
oStickyService.forceUpdate();
updateNow();
mAppSectionsPagerAdapter.notifyDataSetChanged();
}

With onResume opening new StickyService, the old Activity does not receive updates. Maybe a good idea would be to implement back Handler, to inform activity of new updates, which will then update app. This will as well show "loading notification" to Resumed app.
User also complained that if he clicks home (pause), and re-opens application, then above error occurs.


Reply to this email directly or view it on GitHub.

from give-me-coinsmonitoringapp.

MrPet avatar MrPet commented on September 14, 2024

it should work again.

Am 25.11.2013 01:07, schrieb Crt:

This is is probably crash description:
java.lang.RuntimeException: Unable to resume activity {give_me_coins.dashboard/give_me_coins.dashboard.MainScreen}: java.lang.NullPointerException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2798)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2231)
at android.app.ActivityThread.access$700(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4998)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at give_me_coins.dashboard.MainScreen.setToLocalGMCInfo(MainScreen.java:1464)
at give_me_coins.dashboard.MainScreen.onResume(MainScreen.java:1529)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1192)
at android.app.Activity.performResume(Activity.java:5322)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2759)
... 12 more

----------- below code in onResume solved some problems in case it will help ---------------------
@OverRide
protected void onResume() {
super.onResume();
if(DEBUG) Log.d(TAG,"onResume");
isRunning=true;
oStickyService = GmcStickyService.getInstance(btc_callback, ltc_callback, ftc_callback);
if( oStickyService == null)
{
context.startService( new Intent(context, GmcStickyService.class) );
oStickyService = GmcStickyService.getInstance(btc_callback, ltc_callback, ftc_callback);
}
else
{
switch(coin_select)
{
case(1):
setToLocalGMCInfo(oStickyService.getLTCInfo());
break;
case(2):
setToLocalGMCInfo(oStickyService.getBTCInfo());
break;
case(3):
setToLocalGMCInfo(oStickyService.getFTCInfo());
break;
default:
setToLocalGMCInfo(oStickyService.getLTCInfo());
break;
}
}
if( mPoolService==null) startService();
if( oStickyService != null)
oStickyService.forceUpdate();
updateNow();
mAppSectionsPagerAdapter.notifyDataSetChanged();
}


With onResume opening new StickyService, the old Activity does not receive updates. Maybe a good idea would be to implement back Handler, to inform activity of new updates, which will then update app. This will as well show "loading notification" to Resumed app.
User also complained that if he clicks home (pause), and re-opens application, then above error occurs.


Reply to this email directly or view it on GitHub:
#5 (comment)

from give-me-coinsmonitoringapp.

Letme avatar Letme commented on September 14, 2024

At the moment it seems like we fixed it

from give-me-coinsmonitoringapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.