in androidmanifest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
![]() |
| Use Service API |
ActionBar actionBar = getActivity().getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
NOTE
You can control the behaviors and visibility of the action bar with the ActionBar APIs, which were added in Android 3.0 (API level
11). Remember!
public static boolean IsInstallSkype(Context context)
{
PackageManager pm = context.getPackageManager();
boolean app_installed = false;
try
{
pm.getPackageInfo("com.skype.raider", PackageManager.GET_ACTIVITIES);
app_installed = true;
}
catch (PackageManager.NameNotFoundException e)
{
app_installed = false;
}
return app_installed ;
}
// launch skype
if ((Utils.IsInstallSkype( v.getContext())))
{
Intent sky = new Intent("android.intent.action.VIEW");
sky.setData(Uri.parse("skype:" + nickChat + "?chat"));
v.getContext().startActivity(sky);
}else
{
Toast.makeText(v.getContext(),"You need to install skype", Toast.LENGTH_SHORT).show();
}
And that 's it! happy code!