Android Context Set setBaiduServiceEnabled(Context paramContext, boolean paramBoolean)

Here you can find the source of setBaiduServiceEnabled(Context paramContext, boolean paramBoolean)

Description

set Baidu Service Enabled

Declaration

public static void setBaiduServiceEnabled(Context paramContext,
            boolean paramBoolean) 

Method Source Code

//package com.java2s;
import android.content.ComponentName;
import android.content.Context;

public class Main {
    public static void setBaiduServiceEnabled(Context paramContext,
            boolean paramBoolean) {
        if (paramBoolean)
            ;/*from  w ww.j  a  v  a  2 s .  c  o  m*/
        for (int i = 1;; i = 2) {
            paramContext.getPackageManager().setComponentEnabledSetting(
                    new ComponentName(paramContext.getPackageName(),
                            "com.baidu.location.f"), i, 1);
            return;
        }
    }
}

Related

  1. sendKey(Context c, int keyCode)
  2. sendPlayPauseKey(Context c)
  3. sendSms(@Nonnull Context context, @CheckForNull String number, @Nullable String text)
  4. sendStopKey(Context c)
  5. setAppContext(Context context)
  6. setContext(Application app)
  7. setDefaultLocale(Context context, String locale)
  8. setLanguage(Context context, String language)
  9. setProxy(Context ctx)