java - Update TextView from another Activity -
i have 2 activities in 1 application.
first 1 updates textviews every 3 seconds. works fine.
when keyguard (lock screen) activated first activity launches sec activity appears on lock screen (in order show info if screen locked). works fine.
i textviews of sec activity updated periodically first activity. have played hours , tried lot of suggestions found google none of them worked me. sec activity crashes nullpointerexception @ moment when textview.settext() called.
what best practice doing this?
thanks in advance help.
i don't think there way this, first activity collected system, , don't want work after onpause has been called.
i move logic updates views service runs in background. since sounds need service while application running create bound one.
http://developer.android.com/guide/components/services.html
java android
No comments:
Post a Comment