Use a persistent notification to allow the user to return to running Android app

后端 未结 5 776
情歌与酒
情歌与酒 2020-12-30 10:22

I am developing an app with numerous Activities. I would like to create a persistent notification that (more or less) says, \"AppName - Return to AppName\" that will be pre

5条回答
  •  無奈伤痛
    2020-12-30 10:51

    I usually use activity named "Launcher" that checks state of my application model and starts activities (or does other things) depending on model rules. I put Model object in my Application class. Model can use Preferences to store its state. I do it to avoid static fields in activities.

提交回复
热议问题