Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 57

Fhinumina
Lost but trying
Profile
Posts: 3
Reg: Sep 23, 2013
Chicago
1,380
09/24/13 02:06 PM (12 years ago)

Some assistance

Hello, Im new to BuzzTouch and wanted to see if someone can assist me with a request. I wanted to know if I made a simple menu button and would like to add an app or a link to an app for that button, will I be able to do that? I want to add an app within my app so that people can go to that app through my app. I hope that makes sense.
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
09/24/13 02:28 PM (12 years ago)
Hi Fhinumina, Welcome to Buzztouch! Are you working with iOS or Android? Both work a differently so it helps to know which system you are using.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/24/13 02:48 PM (12 years ago)
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
09/24/13 02:53 PM (12 years ago)
@SmugWimp, It would work only if the app had an URL scheme active. And it still differs for iOS and Android :D
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
09/24/13 02:57 PM (12 years ago)
I have been working on a plugin that does this. the big problem you have with a custom url link is say my app bigAndy whats to play with the app littleAndy I could set up a link that opens my customURL link say littleAndy:// all is great when little andy is installed on the device but if little andy aint installed you get an ugly safari message saying this link don't exist, the program goes to safari the app is left we all have a little cry. what you want is for your cheeky little app to do is to go "hey check if littleAndy:// can be opened if not let's take a little trip to the appstore to download littleAndy. then when little andy is installed when the button is pressed again it will travel seamlessly to that application.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
09/24/13 02:58 PM (12 years ago)
or the play store because they have similar calls if not better for android
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
09/24/13 03:02 PM (12 years ago)
Kittsy, You need to let me know when that plugin is ready! I'm first in line! Forget iPhone 5s!
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
09/24/13 04:41 PM (12 years ago)
Here's a quick tutorial modifying the code for the Launch Native App plugin here's the vid http://www.youtube.com/watch?v=IhQmTXZlJzY&feature=youtube_gdata_player In BT_viewControllerManager.m replace the lines 455 - 463 with this //customURLScheme if([appToLaunch isEqualToString:@"customURLScheme"]){ NSArray* splitEncodedURL = [encodedURL componentsSeparatedByString:@"&&&"]; NSString* customURL = [splitEncodedURL objectAtIndex:0]; NSString* appstoreLink = [splitEncodedURL objectAtIndex:1]; if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:customURL]]) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]]; }else{ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:appstoreLink]]; } } In the control panel in the launch native app screen add this for the data string I have used facebook as an example note it is &&& that splits the 2 links fb://&&&https://itunes.apple.com/gb/app/facebook/id284882215?mt=8 it parses too fb:// and https://itunes.apple.com/gb/app/facebook/id284882215?mt=8 the first must be the customURL scheme the 2nd is the appstore link, the app link can be an affiliate link it makes no difference. please bare in mind there are no error functions now so make sure your link is correct. this tutorial can be expanded further such as having the appstore open in app with out leaving your app having error features just incase of a typo in your control panel having the menu screen indicate whether it will open or go to App Store, could be alert or visual indicator on menu row. I'm sure one of the tutorial legends will mop this up and type it more neatly.
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
09/24/13 05:18 PM (12 years ago)
Thanks Kittsy!!! That is so awesome!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/24/13 05:19 PM (12 years ago)
Not only is he awesome, he usually has me in laughing while making edits... "...the program goes to safari the app is left we all have a little cry" Cheers! -- Smug
 
Fhinumina
Lost but trying
Profile
Posts: 3
Reg: Sep 23, 2013
Chicago
1,380
like
09/24/13 05:27 PM (12 years ago)
@Kitty and cakebit. Thanks for the help. I will be working on am android app at first because I do not have a Mac to run xcode. So this code u gave me I can use it to pick out apps from play store and add it in to as menu button on my app?
 

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.