Tag Archives: ACTION_VIEW

Using SmsManager to send SMS

By | March 1, 2017

There are two ways to send SMS in Android Using SmsManager Using Built in Intent 1. SmsManager The SmsManager manages SMS operations such as sending data to the given mobile device. You can create this object by calling the static method SmsManager.getDefault() as follows: Initialize [java] SmsManager smsManager = SmsManager.getDefault(); [/java] Sending Message Once you have SmsManager object,… Read More »

How to open browser from android cocos2D Application?

By | February 7, 2012

This code snippet helps you to open browser in android cocos2D application [java] public void openBrowser(){ CCDirector.sharedDirector().getActivity().runOnUiThread(new Runnable() { public void run() { Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com")); CCDirector.sharedDirector().getActivity().startActivity(browserIntent); }}); } [/java] Call this function anywhere inside your cocos2D project to open the browser with the corresponding URL.