Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 63

DeckG
Aspiring developer
Profile
Posts: 36
Reg: Apr 18, 2012
Oamaru, New Zea...
1,810
06/06/12 08:05 PM (13 years ago)

Launch download from market if not installed

Hi, I've added a plugin (launch native app) that is supposed to launch junaio when clicked. This works great when junaio is installed, but no joy if it isn't I'm using v2, and in BT_act_controller.java we have the following.... if(appToLaunch.equalsIgnoreCase("junaio")){ Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(dataURL)); //ask user for the best app to use... parentActivity.startActivity(Intent.createChooser(intent, harbortourone_appDelegate.getApplication().getString(R.string.openWithWhatApp))); } I added these lines to capture the junaio intent. After searching I found the following on the google site... isAppInstalled("com.simexusa.campusmaps_full"); private boolean isAppInstalled(String uri) { PackageManager pm = getPackageManager(); boolean installed = false; try { pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES); installed = true; } catch (PackageManager.NameNotFoundException e) { installed = false; } return installed; } Now how can I place this so that junaio is activated if it is installed, or a message saying that Junaio needs to be downloaded from the market if it isn't? I think this option in the Launch native app plugin would be great and increase the scope of options for melding together apps. Look forward to hearing what you all have to say! Derek
 
DeckG
Aspiring developer
Profile
Posts: 36
Reg: Apr 18, 2012
Oamaru, New Zea...
1,810
like
06/07/12 06:13 PM (13 years ago)
is this one to go into the too hard basket?
 
enannos
Lost but trying
Profile
Posts: 4
Reg: Sep 04, 2013
Munich
40
like
09/10/13 03:52 AM (12 years ago)
Hello DeckG, did you manage to solve this? I cannot even do the first step that you did so I'll need your help. I've made an app and imported the "launch native app" plugin. I use another navigation software and I want to "call" it everytime I click on the native_app button. What do I need to add to BT_config.txt? I've made some changes to BT_act_controller.java but with no success... Thanks Evangelos
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.