android - Activity Start slowly -
recently met strange problem,i start activity service,but if follow steps :
- enter app
- press home key go launcher
- then trigger service start activity
after above steps,the activity starts more normal way.because add log in activity's oncreate method.
normal way same above,except pressing home key.
please me solve it.thanks.
you can run service , activity in different processes. moving logging service doesn't bind ui. use process attribute service in androidmanifest.xml
here's snippit docs:
the name of process service run. normally, components of application run in default process created application. has same name application package. element's process attribute can set different default components. component can override default own process attribute, allowing spread application across multiple processes.
Comments
Post a Comment