NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
10/29/15 03:41 AM (8 years ago)

Launch Native App pluggin doesn't load

Hi all, I've read a couple of older threads about that but no solutions. Despite it's been required when dowloading the BT package, the project doesn't show in Android Studio the pluggin for the Launch Native App from David. Where can I find the associate Jave BT_something file to add in the project ? Cheers ! Nico
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/29/15 04:11 AM (8 years ago)
That's actually not a 'plugin' so much as it is an 'option' within the main code. If you use it, it sort of 'treats' it like a plugin, but the code is located in BT_fragment.java; do a search for 'BT_launchNativeApp' and it should take you to the right spot in the code... Cheers! -- Smug
 
NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
like
10/29/15 04:23 AM (8 years ago)
You're right ! Still the app says "Missing plugin : The Android class file for this screen was not compiled in the project." Those lines seem correct. Is it linked to something else ? I've played with various type of native app (the one I want initially is a browser) and it is the same always. Cheers Smug
 
NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
like
10/29/15 04:33 AM (8 years ago)
You're right ! Still the app says "Missing plugin : The Android class file for this screen was not compiled in the project." Those lines seem correct. Is it linked to something else ? I've played with various type of native app (the one I want initially is a browser) and it is the same always. Cheers Smug
 
NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
like
10/29/15 04:45 AM (8 years ago)
You're right ! Still the app says "Missing plugin : The Android class file for this screen was not compiled in the project." Those lines seem correct. Is it linked to something else ? I've played with various type of native app (the one I want initially is a browser) and it is the same always. Cheers Smug
 
NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
like
10/29/15 05:18 AM (8 years ago)
//launch native app... if(nextScreenType.equalsIgnoreCase("BT_launchNativeApp")){ BT_debugger.showIt(fragmentName + ":launching native app...."); /* Launching native app requires an "appToLaunch" and a "dataURL" App Types: browser, youTube, googleMaps, musicStore, appStore, mail, dialer, sms */ //get the document file name or the URL... String appToLaunch = BT_strings.getJsonPropertyValue(theScreenData.getJsonObject(), "appToLaunch", ""); String dataURL = BT_strings.getJsonPropertyValue(theScreenData.getJsonObject(), "dataURL", ""); if(appToLaunch.length() > 1 && dataURL.length() > 1){ try{ //browser... if(appToLaunch.equalsIgnoreCase("browser")){ Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(dataURL)); //ask user for the best app to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } //youTube... if(appToLaunch.equalsIgnoreCase("youTube")){ Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(dataURL)); //ask user for the best app to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } //googleMaps... if(appToLaunch.equalsIgnoreCase("googleMaps")){ Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?" + dataURL)); //ask user for the best app to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } //nativeMaps... if(appToLaunch.equalsIgnoreCase("nativeMaps")){ Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?" + dataURL)); //ask user for the best app to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } //musicStore... if(appToLaunch.equalsIgnoreCase("musicStore")){ Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(dataURL)); //ask user for the best app to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } //appStore... if(appToLaunch.equalsIgnoreCase("appStore")){ Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(dataURL)); //ask user for the best app to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } //mail... if(appToLaunch.equalsIgnoreCase("mail")){ Intent intent = new Intent(android.content.Intent.ACTION_SEND); intent.setType("plain/text"); //email to address... String[] emailToAddressList = {dataURL}; intent.putExtra(android.content.Intent.EXTRA_EMAIL, emailToAddressList); //ask user for the best app to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } //sms... if(appToLaunch.equalsIgnoreCase("sms")){ Intent intent = new Intent(android.content.Intent.ACTION_VIEW); intent.setType("vnd.android-dir/mms-sms"); //set the to-number.... intent.putExtra("address", dataURL); //ask user for the best app to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } //dialer... if(appToLaunch.equalsIgnoreCase("dialer")){ Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("tel:" + dataURL)); //ask user for the best app to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } //customURLScheme... if(appToLaunch.equalsIgnoreCase("customURLScheme")){ Intent intent = new Intent(android.content.Intent.ACTION_VIEW); //ask user for the best intent to use... startActivity(Intent.createChooser(intent, getString(R.string.openWithWhatApp))); } }catch(Exception e){ BT_debugger.showIt(fragmentName + ":EXCEPTION Launching native app: " + e.toString()); } }else{ BT_debugger.showIt(fragmentName + ":ERROR Launching native app. appToLaunch or dataURL empty?"); } //bail... return; }//launch native app...
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/29/15 06:44 AM (8 years ago)
Check the logs... see what the class name of the plugin it's 'looking' for is. Let's make sure things match up. Cheers! -- Smug
 
NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
like
10/29/15 11:10 PM (8 years ago)
Here are the two lines of the log where the problem seems to start. I'm not sure of what it means, but is it not looking for a BT_launchNativeApp somewhere ? itemNickname is correct 10-30 07:03:00.180 15216-15216/com.vocabulairedelamoto W/ZZ: BT_application:initPluginWithScreenData. Creating plugin with JSON itemId: "C6AC26CC08CFC5BCD7A3C82" itemType: "BT_launchNativeApp" itemNickname: "launchsite" 10-30 07:03:00.180 15216-15216/com.vocabulairedelamoto W/ZZ: BT_application:initPluginWithScreenData EXCEPTION creating fragment: java.lang.ClassNotFoundException: com.vocabulairedelamoto.BT_launchNativeApp
 
NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
like
10/29/15 11:13 PM (8 years ago)
The other thing I found is in BT_fragment : if(appToLaunch.equalsIgnoreCase("Browser")){... On the BT screen the option is "Browser, enter a URL". I suppose it gives back a value "Browser" afterwards but just in case I wrote in the BT_fragment "Browser, enter a URL". No effect though.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/30/15 03:58 AM (8 years ago)
Well, initially, it determines what to do from a user choice in the control panel. When the user selects a choice and presses 'save', the json key 'appToLaunch' is given a value representing what the user wants to happen... String appToLaunch = BT_strings.getJsonPropertyValue(theScreenData.getJsonObject(), "appToLaunch", ""); then, depending on the value, it does an 'if/then' kind of thingy... if(appToLaunch.equalsIgnoreCase("something")){ // do something } and all of that comes from your control panel json configuration. with the 'launch native app' control panel screen open, take a look at the 'raw json' usually at the bottom of the screen, or look in your applications config file. find the value for 'appToLaunch' and make sure it's represented in the code the same way. Remember, the HTML elements in the control panel can display one thing, but provide a different value. <option name="subscribe" value="0">I never want to hear from you again. EV-VAR</option> You see the text, but not the underlying code. If this choice is selected the key 'subscribe' will be assigned the value of '0'. (And that's a text '0', not an integer 0.) Cheers! -- Smug
 
NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
like
11/01/15 12:03 AM (8 years ago)
Well I can't find anything that doesn't match. However the pluggin Custom URL works perfectly so there's my solution ! Thanks for your time Smug ! Nico
 

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.