質問

I would like to code a function which will let me know if another specific app of my company is installed on the current device. I guess that in order to do so I need to retrieve a list of the installed apps like here (Answer for native coders):

How to get a list of installed android applications...

Is there a straight forward way to get the list with action script? Bottom line, I just need to know about my own apps. Maybe a way to get a list of air apps installed?

Thank you

役に立ちましたか?

解決

The direct answer no, but you can use one of the following:

1- Write a file in specific location indicates that the app from your company installed, and check this file from your app, to do this - On the first time run of the application write a file in the desktopDirectory:

var myAppTextFile:File = File.desktopDirectory.resolvePath("MyAppVersion.txt");
var fs:FileStream = new FileStream();
fs.open(myAppTextFile, FileMode.WRITE);
fs.writeUTF("MyApp V0.0 installed");
fs.close();`
  • Each time you run the New Application check this file:

    var myAppTextFile:File = File.desktopDirectory.resolvePath("MyAppVersion.txt"); var fs:FileStream = new FileStream(); fs.open(myAppTextFile, FileMode.READ); var str:String = fs.readUTF(); fs.close();`

    Note: Works for Android not for iOS.

2- Use Native extension to do this.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top