Tag Archives: PackageManager

How to find location in Android using GPS?

By | July 25, 2017

This example helps you to find the location in Android using the GPS. I have commented out some functionality in the code. You can uncomment it and extend it at your wish. At first we will create a utility class that will handle all GPS related Operations. GPS Utility Class This class has all utility functions for getting… Read More »

Using Meta-data in Android Manifest and accessing it.

By | October 3, 2013

Sometimes you have the need to set up some app-wide configuration information in an Android app or need to create a class that can be used in multiple projects with a generic way of setting configuration values. This is particularly useful for things like API keys that will probably be different across apps but should be accessible in… Read More »

How to create a simple App Launcher in Android?

By | March 22, 2013

You have seen Launchers listing your apps. Ever wondered how they get the list of all apps. This program help you to list all apps installed in your phone and in a gridview and invoke them. Here we use this class.. PackageManager Class for retrieving various kinds of information related to the application packages that are currently installed… Read More »

A Simple FlashLight Application.

By | July 20, 2012

Here is a simple Application on how to use flashlight in android. [java] package com.coderzheaven.pack; import android.app.Activity; import android.content.Context; import android.content.pm.PackageManager; import android.hardware.Camera; import android.hardware.Camera.Parameters; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.Toast; public class FlashLightActivity extends Activity { //flag to detect flash is on or off private boolean isLighOn = false; private Camera… Read More »

How to check whether an application is installed in your ANDROID Phone?

By | March 28, 2012

This sample code comes handy when you have to check that an application is already installed in your ANDROID Phone. Call the below function appInstalledOrNot() with the package name of the app installed on the ANDROID Device as a string parameter. This function returns true if the app is installed otherwise returns false. [java] import android.app.Activity; import android.content.pm.PackageManager;… Read More »