2012-02-29 57 views
1

我目前正在一個Android應用程序,但我堅持獲得一個可行的解決方案。拜託,我想知道三兩件事:應用程序安裝的監聽器和掛起的互聯網/ 3G連接

1. Is there any code to Listen for Installed Applications and also when an Application is being installed? 
2. Is there anyway to suspend internet permissions granted to installed applications? 
3. Is there anyway to suspend 3G connection in the device without totally disabling it? 

如有的是,有一個回答這些問題的人,如果可能的代碼請給這裏放棄它。另外如果有一個更好的解決方案涵蓋了這三個問題,我也對它開放。 謝謝Devs。

回答

0

下面給出的是問題1的答案,把它放在你的清單中,然後你必須寫下「YourReceiver」,它將接收到這個意圖。有了這個,我打電話給onRecieve,但努力尋找剛剛安裝的應用程序的名稱/信息。的 Receiving package install and uninstall events

<receiver android:name=".YourReceiver"> 
    <intent-filter> 
     <action android:name="android.intent.action.PACKAGE_INSTALL" /> 
     <action android:name="android.intent.action.PACKAGE_ADDED" /> 
     <data android:scheme="package"/> 
    </intent-filter> 
</receiver> 

可能重複哪裏人?

相關問題