Android : restart application after update - ACTION_PACKAGE_REPLACED

后端 未结 5 1435
情歌与酒
情歌与酒 2020-12-03 10:09

My application that is not on Play Store verify on the web If there are a new version and download and start it. After the installation I would like to restart the applicati

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 11:09

    I put the following receiver in the AndroidManifest.xml

    
        
            
        
        
            
        
    
    

    So my app can be launched on update as well as device reboot. Ofcourse as everyone has mentioned that you need API 12+ for MY_PACKAGE_REPLACED.

提交回复
热议问题