【问题标题】:How to know Application Installation is completed in android?如何知道应用程序安装在android中完成?
【发布时间】:2012-03-19 07:20:37
【问题描述】:

我想创建这样的服务,当任何新应用程序安装在 android 设备上时启动。那么如何知道任何应用程序安装在 android 设备中,是否有任何 Intent 事件被触发?

【问题讨论】:

    标签: android android-intent android-service android-applicationinfo


    【解决方案1】:
    <receiver android:name="r1">
    
    <intent-filter>
    
    <action android:name="android.intent.action.PACKAGE_ADDED"/> <data android:scheme="package"/>
    
    </intent-filter> 
    
    </receiver>
    

    你可以试试这个广播接收器....

    也经过

    "android.intent.action.PACKAGE_REMOVED"
    "android.intent.action.PACKAGE_REPLACED"
    

    可能会派上用场...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多