01-11-2013 12:21 AM
Hi All,
My requirement is to display a page in my app where there will be icons showing all the installed apps.I thought of using the invoke.query framework to query the device for apps doing specific functionality.But my app is for payment of water bill.Not getting what i will query the device with for my app.Is there some other way of acheiving this without using invoke.query.Can we check the device if the folder structure of the app is present or provide some id for the app and checking if that id is present.I am using phonegap project.
01-11-2013 09:40 AM
I'm not sure I totally understand your question. I'm going to re-phrase it could you then confim I have got it correct?
1. You would like to query the device for a list of applications.
2. The invoke.query is not sufficient since it returns the incorrect targets or you can't define the proper target type?
3. You would like to query the device directly?
If all you would like to do is invoke an app? Then you can just invoke it directly without using the query. You can see an example by using the "target" attribute here: https://developer.blackberry.com/html5/apis/blackb
For instance the browser:
// open web link in browser blackberry.invoke.invoke({ target: "sys.browser", uri: "http://www.blackberry.com" }, onInvokeSuccess, onInvokeError);
If I have mis-understood please clarify.
01-12-2013 05:01 AM
Invoking the app from another app is not the issue which i am able to do with the line of code
ApplicationManager.getApplicationManager().launch(
The big issue which i am facing is how will i know this particular app HelloWorld is installed on my device.This app HelloWorld just helps user to pay bills online through creditcard.So even if i use invoke.query what will i query the device with.My app doesnt deal with opening of jpeg file or playing mp3 file etc.It just helps users to pay bills.Dont know what i will give in the type section of invoke.query
// open web link in browser blackberry.invoke.invoke({ target: "sys.browser", uri: "http://www.blackberry.com" }, onInvokeSuccess, onInvokeError);
If i am right the above piece of code which u mentioned just opens the mentioned uri in browser and if successfully opened will go to onInvokeSuccess or else goes to onInvokeError function.What i want is something like this
blackberry.invoke.invokable({ uri: "URI for App" }, onInvokableSuccess, onInvokableError); I just want to check whether the app is invokable or not.If app is invokable i will provide icon for app in success function which is clickable.On click of icon will take me to the app using code(ApplicationManager.getApplicationManager().la
01-15-2013 01:40 AM
Hello Erik,
int[] handle = CodeModuleManager.getModuleHandles();
for(int i=0; i<handle.length; i++)
{
ApplicationDescriptor[] app_descriptors = CodeModuleManager.getApplicationDescriptors(handle
{
for(int j=0; j< app_descriptors.length; j++)
{
String moduleName = app_descriptors[i].getModuleName();
String name = app_descriptors[i].getName(); //here the String variable name will give you all the app names installed on your devise. } } }
After some searching around i have come up with some native code to do this..Can you tell me is this the right way to go about.