Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 73

feraco
Aspiring developer
Profile
Posts: 705
Reg: Jan 23, 2012
nyc
15,050
12/08/13 07:48 AM (11 years ago)

Scringo chatroom api call android success

Hello Everyone I have been working on trying to open a scringo chatroom from a link in the htmlpro plug in and i finally got it! Ofer from scringo and Chris1 looked through the htmlpro code and added a few modifications. I added this code to the the html pro java file. After that in your html file make sure your link is "ScringoChatURL" and then the chatroom opens!! Also you must make sure the latest android version of scringo is installed. Im very happy with Ofer from Scringo and Chris1 for making this happen. Happy Sunday! //load the URL in the app's built-in browser if it's in our list of types to load... if(!url.contains("ScringoChatURL") && canLoadDocumentInWebView(url)){ //load url in built-in browser... showProgress(null, null); return false; }else{ if (url.contains("ScringoChatURL")) { Scringo.openChatRooms(getActivity()); } else { //ask user what app to open this in if the method returned NO... try{ Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(Intent.createChooser(i, getString(R.string.openWithWhatApp))); }catch(Exception e){ BT_debugger.showIt(fragmentName + ": Error launching native app for url: " + url); showAlert(getString(R.string.noNativeAppTitle), getString(R.string.noNativeAppDescription)); } //do not try to load the URL.. } return true; } }
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
12/08/13 10:05 AM (11 years ago)
This is worth knowing. Great for adding this post.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
12/08/13 10:38 AM (11 years ago)
Sweet! Added to my Codebox Thanks for the share Fred
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
12/08/13 12:00 PM (11 years ago)
Awesome and subscribed to this thread for future referenced! Thank you LA
 

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.