ApplicationFinder.ane

This is the first ANE that I made for my own project… hopefully my other ones can be released soon.

Anyways, let’s get right to it.

The ApplicationFinder ANE is something I created to help you find other Applications on your Android system. You can get information 2 ways.

isAppInstalled(package:String):PackageInfo

This method looks to see if a particular application (by app id) is installed. If the application is installed ApplicationFinder returns the name, package id, version number, and version name of the application. If the app isn’t installed you get null.

getInstalledApps():Array

This method just returns to you the entire list of installed apps. Go nuts, search and find what you need. Like the isAppInstalled you get the name, package id, version number, and version name of the application.

Later I’ll add things like also returning the app icon, possibly some app management methods (startup, shutdown, etc).

I’ve included my test app here so you can run it, and then the ANE also. Enjoy!

Test Application (FXP)
ApplicationFinder.ane

Comments (14)

vincentNovember 8th, 2011 at 2:16 am

Looks great ! You have planned to do it too for iOS?

Thanks

jonbcamposNovember 8th, 2011 at 7:14 am

@vincent Maybe at some point, but not super immediately.

DanelNovember 9th, 2011 at 2:33 am

Cool, really appreciate your effort and sharing!

Its time to start up a ANE bank for exchanges :)

mouradaMarch 8th, 2012 at 6:59 am

great job!
We look forward to your developments
i am interested for invoking a application in thé list

SebastianApril 13th, 2012 at 3:50 am

Looking forward to be able to open another app. As far as I know this isn’t possible by AIR apps because of sandbox security issues.

Hope you provide something soon.

jonbcamposApril 16th, 2012 at 9:54 am

@Sebastian I’ll look into it at some point. I created that ANE for a specific app and just haven’t had a need to do more features. Maybe at some point.

NathanMay 18th, 2012 at 5:45 am

@jonbcampos. Hi, this is great, thanks for sharing. I have been trying to convert to Flash Prof. initially but can’t compile because it requires com.unitedmindset.extensions.ApplicationFinder. And I can’t find them in the Flex project you shared. Am I missing something or being dumb?

jonbcamposMay 18th, 2012 at 5:50 am

@Nathan no Nathan, you aren’t missing anything. As I haven’t shared the full project recompiling will be a bit of a pain. I have actually been spending some time the last few days getting the code together and sharable. You should see a new post and github repo with multiple anes soon.

Can flash pro not just use the compiled ane? I would think it would be able to.

KhawarJanuary 8th, 2013 at 1:08 pm

how to use :(

KhawarJanuary 8th, 2013 at 2:21 pm

import flash.events.MouseEvent;
import com.unitedmindset.extensions.ApplicationFinder;
import com.unitedmindset.vos.PackageInfo;

var obj:ApplicationFinder = new ApplicationFinder();

var i:Number;
btn.addEventListener(MouseEvent.CLICK , go);
function go(e:MouseEvent):void
{
var myList:Array = new Array(obj.getInstalledApps());

txt.text = String(myList);

}

OUTPUT:
[object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo], object PackageInfo],

how to access the array?

jonbcamposJanuary 8th, 2013 at 2:23 pm

@Khawar you have the array, now you need to do something with it. You can’t directly “toString” the array as the results are complex objects. You could iterate through the array and find the specific strings you intend to show to your user.

AlexFebruary 14th, 2013 at 1:05 pm

Hi,

…spent two days installing developing software… give it up now ;-)

Because AIR is not able to call other apps or apks (android/mobile) – I ask, if an ANE can do this?

I think the main problem all AIR developers have – how to Update app without the market place.
My solution was, to download and save the APK file – then, because there is no way to execute it, call the navigateToURL AS3 function with “file:///storage….”
If I try this in a browser – it will work – but if I call from AIR – it will open a PDF-Reader and will tell me this is not a PDF File… It’s not a problem of standard-open-applications – all my devices doing the same, also after reseting standard-apps.
If it would work, the user will be asked for using the package installer – and he can agree or cancel the operation – so no risk…

Wow – a lot of text ;-) Finaly, is there a way with an ANE to call an installer, app or APK – directly or call the browser with the URI: file:///…? May your ANE is not far away…
Maybe it is easy to integrate?
Hope you can help me,
thanks a lot
Alex

jonbcamposFebruary 15th, 2013 at 9:09 am

@alex Yes an ANE could do this… or you could just navigateToUrl and get it complete in one line of code. Rather than download and run.

Leave a comment

Your comment