Showing running services in Android

Here I want to share snippet of code which I found when I tried to get all services which are running in Android.
It is very simple and useful.

public class Main extends Activity {
private static String APP_TAG = “tag”;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
List<ActivityManager.RunningServiceInfo> runningServices = activityManager.getRunningServices(50);

for (int i = 0; i < runningServices.size(); . . . → Read More: Showing running services in Android

  • Share/Bookmark

Viewing android.R.drawable images

How often do you want to see what kind of images are in android.R.drawable package?
Personally, I very often look at them. And the big problem is to see them at first time, because you don’t know where they are.
This post should resolve this problem. Continue reading Viewing android.R.drawable images

  • Share/Bookmark

Checking Android SDK version

I want to show how you can get Android SDK version from code.
It is very simple:

String version = Build.VERSION.RELEASE;

This one returns SDK version (2.0.1, 2.0, 1.6).

int apiLevel = Build.VERSION.SDK_INT;

This one returns API Level (6, 5, 4).

 

If you’d like to get the latest posts as soon as they’re published, subscribe to . . . → Read More: Checking Android SDK version

  • Share/Bookmark

Checking if camera presents in Android device

Today I tried some ideas with camera in Android and found that there is an easy way to check if camera presents in Android device. Continue reading Checking if camera presents in Android device

  • Share/Bookmark

Image rotating in Android

There is an easy way for image rotating in Android from code. Continue reading Image rotating in Android

  • Share/Bookmark

Image saving to the filesystem in Android

Sometimes after some operations with image you want to save this image to the filesystem. How? Can I use FileOutputStream for this operation? Sure, you can. Continue reading Image saving to the filesystem in Android

  • Share/Bookmark

Starting applications after boot up in Android

There are applications which should starts automatically after the Android phone is booted up.
I am going to show how to create such application. Continue reading Starting applications after boot up in Android

  • Share/Bookmark

Image resizing in Android

When you work with images in Android , you can not only set this image as background image :) . Android allows a lot of things which you can do with an image object. Here I want to show how easy is to resize an image (Bitmap object) using Matrix class. This practice is very useful. Continue reading Image resizing in Android

  • Share/Bookmark

Installing non-market application in Android phone

I have received some identical questions by e-mail. People ask me how to install non-market application in Android phone.
It is simple, by default Android works only with applications from Android Market, for allowing to install non-market application need to configure Android phone:
Settings->Applications->Unknown sources

That’s all. As you can see it is very easy.
Now I am going . . . → Read More: Installing non-market application in Android phone

  • Share/Bookmark

Opening browser with specific URI in Android

Sometimes you need to open browser with specific URI from your application.
For example you want to show application’s page and so on.
This operation is very simple.
You need to use Activity as usual you use it for walking from one activity to other.
In this post I am going to show snippet of code about how you can . . . → Read More: Opening browser with specific URI in Android

  • Share/Bookmark