我有一個Adobe Air Android應用程序。我想知道應用何時將被刪除,並且如果我發現此事件,請執行一些基本操作。 這是可能的Adobe AIR機器人?謝謝!Adobe Air正在收聽卸載事件
0
A
回答
0
不,Adobe Air中沒有卸載事件。
一個解決方案可以是做任何你想完成每次applications exits。
// make a reference to the NA singleton instance
var nativeApplication = NativeApplication.nativeApplication;
//add an event listener
nativeApplication.addEventListener(Event.EXITING,onExitHandler);
function onExitHandler(e){
//do something
}
另一種可能的解決方案可能是監視某個具有唯一設備標識符的URL。例如http://www.domain.com/activity.php?deviceId=1234567890
。你不知道安裝了多少個應用程序,但是你會知道你的應用程序有多少活動。我不知道這是否合法。
設備標識符可以通過本機擴展名獲得,例如this one。我在iOS上成功使用它來識別獨特的設備。
至於網址監控,您可以使用URLMonitor類。
最後,我想指出的是,確實有可能在using native Java code in Android之後執行您的操作。從理論上講,應該可以模仿開發自己的本地擴展(ANE)的功能。 Here's an introduction開發您的ANE for Android。
相關問題
- 1. Adobe AIR加載問題
- 2. Adobe Air多國下載
- 3. Adobe Air - 檢測JavaScript事件
- 4. Adobe Air - Analytics
- 5. Adobe Air Browser
- 6. localToGlobal Adobe AIR
- 7. Adobe AIR readLine
- 8. Adobe AIR HTML組件 - socket.io
- 9. Adobe AIR - 垃圾回收和system.gc()
- 10. Adobe Air和PHP
- 11. Adobe Air - window.nativeWindow undefined
- 12. Adobe Air的DeviceOrientationEvent
- 13. Adobe Air和.NET
- 14. Adobe AIR截圖
- 15. Adobe Air with Iphone
- 16. Adobe Air和Dropbox
- 17. Adobe Air for iPhone
- 18. Adobe air http auth
- 19. Adobe Air Javascript API
- 20. Adobe AIR&PHP + MySQL
- 21. Adobe AIR鎖定
- 22. Adobe AIR Android FileStream問題
- 23. Adobe Air SQLite誤解
- 24. Adobe Air - MySQL或SQLite
- 25. Adobe air NativeAlert iOS和Android
- 26. Adobe AIR本機擴展
- 27. Adobe Air父框架橋
- 28. Adobe Air 1.5.2和Flash Builder
- 29. Adobe AIR的解釋
- 30. Adobe Air:錯誤307
您的應用程序在卸載時不太可能正在運行,因此無法附加事件偵聽器。 –