Android Context Get getCurrentHome(Context c)

Here you can find the source of getCurrentHome(Context c)

Description

get Current Home

Declaration

public static String getCurrentHome(Context c) 

Method Source Code

//package com.java2s;

import android.content.Context;
import android.content.Intent;

import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;

public class Main {
    public static String getCurrentHome(Context c) {
        Intent intent = new Intent(Intent.ACTION_MAIN);
        intent.addCategory(Intent.CATEGORY_HOME);
        ResolveInfo resolveInfo = c.getPackageManager().resolveActivity(
                intent, PackageManager.MATCH_DEFAULT_ONLY);
        return resolveInfo.activityInfo.packageName;
    }/*from w  w  w  .ja v a  2  s  .c om*/
}

Related

  1. getCornerLightPaint(Context context)
  2. getCornerOffset(Context context)
  3. getCornerPaint(Context context)
  4. getCornerRadius(Context context)
  5. getCurProcess(Context context)
  6. getCurrentLocationByName( Context context)
  7. getCurrentSsid(Context context)
  8. getDataFile(Context context, String fileName)
  9. getDefaultDisplayMetrics( @Nonnull Context context)