Discussion Forums  >  Uncategorized

Replies: 3    Views: 589

Zoid66
Lost but trying
Profile
Posts: 176
Reg: Oct 26, 2010
USA
1,760
11/13/10 07:31 AM (15 years ago)

Launch Video

If we are link to a site with Video, any idea if we can just have it open in the phones default player..
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/13/10 10:13 AM (15 years ago)
Have you tried creating a CustomHTML page with the link - then clicking the link? What happens? The Phone decides what to do with different types of links. Phone numbers, email address, etc. Not sure what will happen if you click a 'video link.' May do what you want. Launching the default browser from a menu-item is on our list of things to do.
 
Zoid66
Lost but trying
Profile
Posts: 176
Reg: Oct 26, 2010
USA
1,760
like
11/13/10 12:00 PM (15 years ago)
Tried a few things cust html etc. cant get the videos to play in the webview. What do you think the amount of work is to launch off of the main menu to the default browser?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/13/10 08:05 PM (15 years ago)
Should be easy. When you tap a menu item, a function is triggered. The functions that run on each tap are in Act_Activity_Base.java in the src directory. Example: Find this code: if(theScreen.screenType.equals(screen_url)) showCustomURL(); This means that if the screen type is screen_url (this is a CustomURL screen in the buzztouch control panel, then run the function called showCustomURL() So, if we scroll down int he same file and look at the showCustomURL() function, the logic is pretty easy. What's its doing is looking at the URL associated with the CustomURL screen from the control panel. If it has youtube don't use the custom intent, instead let the phone decide. This means youtube videos will launch in the phones player, not a buzztouch player. You can see the useMyIntent variable used at the end of this function. If it's 0, then launch the default browser. So, at the very end of this funciton, find this line: //let phone decide intent if(bolDone == 0 && useMyIntent == 0){ //let device determine which intent to launch... Intent theIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(useUrl)); startActivity(theIntent); } If you just set bolDone = 0 and useMyIntent = 0 then the phone will launch the default browser with the URL from the buzztouch control panel. It would look like this when you're done: //let phone decide intent bolDone = 1; useMyIntent = 1; if(bolDone == 0 && useMyIntent == 0){ //let device determine which intent to launch... Intent theIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(useUrl)); startActivity(theIntent); } Basically we are just ignoring all the logic above and just saying bolDone and useMyIntent always = 1 so just launch the browser. This is a :30 second fix if you understand what I'm trying to explain.
 

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.