Some questions about GcmTaskService

后端 未结 2 1717
名媛妹妹
名媛妹妹 2020-12-15 05:05

Background

I wanted to use the new JobScheduler API that was presented on Lollipop, but sadly it doesn\'t have an official port for pre-Lollipop.

However,

2条回答
  •  没有蜡笔的小新
    2020-12-15 05:50

    you can find answers to most of your questions it here.

    https://github.com/jacktech24/gcmnetworkmanager-android-example/blob/master/README.md

    To answers that are not answered there

    7: You won't get notified when wakelock is removed, and as they say in documentation, this API is only for short tasks, if you have longer, write your own implementation

    9: No you can't as of now, the API doesn't allow it

    10: That's because Google Play services are taking care of it, and there is no way around it. You have to detect in the service whether the app is setup (I expect that's your problem) eg. configuration is created etc. and eventually cancel all tasks when one of them is called.

提交回复
热议问题