android start activity from service

后端 未结 7 1054
傲寒
傲寒 2020-11-22 03:04

Android:

public class LocationService extends Service {

@Override
    public void onStart(Intent intent, int startId) {
        super.onStart(intent, startI         


        
相关标签:
7条回答
  • 2020-11-22 03:52

    UPDATE ANDROID 10 AND HIGHER

    Start an activity from service (foreground or background) is no longer allowed.

    There are still some restrictions that can be seen in the documentation

    https://developer.android.com/guide/components/activities/background-starts

    0 讨论(0)
提交回复
热议问题