List of usage examples for android.os Bundle getBoolean
public boolean getBoolean(String key, boolean defaultValue)
From source file:com.android.contacts.interactions.ImportDialogFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setStyle(STYLE_NORMAL, R.style.ContactsAlertDialogTheme); final Bundle args = getArguments(); mSimOnly = args != null && args.getBoolean(EXTRA_SIM_ONLY, false); mSimDao = SimContactDao.create(getContext()); }
From source file:com.chess.genesis.net.GenesisNotifier.java
@Override public int onStartCommand(final Intent intent, final int flags, final int startid) { final Bundle bundle = intent.getExtras(); fromalarm = bundle != null && bundle.getBoolean("fromAlarm", false); new Thread(this).start(); return START_NOT_STICKY; }
From source file:com.wenwen.chatuidemo.activity.PersonFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (savedInstanceState != null && savedInstanceState.getBoolean("isConflict", false)) return;//from ww w . ja v a 2 s .c o m latyout_personal_data = (RelativeLayout) getView().findViewById(R.id.latyout_personal_data); layout_integral = (RelativeLayout) getView().findViewById(R.id.layout_integral); layout_chatset_order = (RelativeLayout) getView().findViewById(R.id.layout_chatset_order); layout_clinic_order = (RelativeLayout) getView().findViewById(R.id.layout_clinic_order); layout_phone_order = (RelativeLayout) getView().findViewById(R.id.layout_phone_order); layout_photo_text_order = (RelativeLayout) getView().findViewById(R.id.layout_photo_text_order); btn_logout = (Button) getView().findViewById(R.id.btn_logout); btn_integral = (Button) getView().findViewById(R.id.integral); uname = (TextView) getView().findViewById(R.id.uname); latyout_personal_data.setOnClickListener(this); layout_integral.setOnClickListener(this); layout_chatset_order.setOnClickListener(this); layout_clinic_order.setOnClickListener(this); layout_phone_order.setOnClickListener(this); layout_photo_text_order.setOnClickListener(this); btn_logout.setOnClickListener(this); btn_integral.setOnClickListener(this); initData(); }
From source file:com.airbop.library.simple.CommonUtilities.java
public static AirBopManifestSettings loadDataFromManifest(Context application_context) { AirBopManifestSettings airbop_settings = new AirBopManifestSettings(); if (application_context != null) { //Log.v(TAG, "loadDataFromManifest: application_context != null"); ApplicationInfo ai;/*from ww w. j av a 2 s. com*/ try { ai = application_context.getPackageManager() .getApplicationInfo(application_context.getPackageName(), PackageManager.GET_META_DATA); if (ai != null) { //Log.v(TAG, "loadDataFromManifest: ai != null"); //Log.v(TAG, "application_context.getPackageName(): " // + application_context.getPackageName()); Bundle app_bundle = ai.metaData; if (app_bundle != null) { //Log.v(TAG, "app_bundle: "+ app_bundle); if (airbop_settings != null) { //Log.v(TAG, "app_bundle: airbop_settings != null"); airbop_settings.mGoogleProjectNumber = app_bundle .getString(AIRBOP_GOOGLE_PROJECT_NUMBER); //Log.v(TAG, "mGoogleProjectNumber: " + airbop_settings.mGoogleProjectNumber); airbop_settings.mAirBopAppkey = app_bundle.getString(AIRBOP_APP_KEY); //Log.v(TAG, "mAirBopAppkey: " + airbop_settings.mAirBopAppkey); airbop_settings.mAirBopAppSecret = app_bundle.getString(AIRBOP_APP_SECRET); //Log.v(TAG, "mAirBopAppSecret: " + airbop_settings.mAirBopAppSecret); airbop_settings.mUseLocation = app_bundle.getBoolean(AIRBOP_USE_LOCATION, false); //Log.v(TAG, "mUseLocation: " + airbop_settings.mUseLocation); airbop_settings.mDefaultNotificationTitle = app_bundle .getString(AIRBOP_DEFAULT_NOTIFICATION_TITLE); //Log.v(TAG, "mDefaultNotificationTitle: " + airbop_settings.mDefaultNotificationTitle); if (airbop_settings.mDefaultNotificationTitle == null) { airbop_settings.mDefaultNotificationTitle = ""; } airbop_settings.mNotificationIcon = app_bundle.getInt(AIRBOP_NOTIFICATION_ICON); //Log.v(TAG, "mNotificationIcon: " + airbop_settings.mNotificationIcon); airbop_settings.mDefaultNotificationClass = app_bundle .getString(AIRBOP_DEFAULT_NOTIFICATION_CLASS); //Log.v(TAG, "mDefaultNotificationClass: " + airbop_settings.mDefaultNotificationClass); airbop_settings.mDefaultNotificationHandling = app_bundle .getBoolean(AIRBOP_DEFAULT_NOTIFICATION_HANDLING, true); //Log.v(TAG, "mDefaultNotificationHandling: " + airbop_settings.mDefaultNotificationHandling); } } } } catch (NameNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return airbop_settings; }
From source file:it.scoppelletti.mobilepower.widget.DateControl.java
protected void onRestoreInstanceState(Bundle savedInstanceState) { myDialogTag = savedInstanceState.getString(DateControl.STATE_DIALOGTAG); myIsEmptyAllowed = savedInstanceState.getBoolean(DateControl.STATE_ISEMPTYALLOWED, true); myIsResetEnabled = savedInstanceState.getBoolean(DateControl.STATE_ISRESETENABLED, false); setValue((SimpleDate) savedInstanceState.getParcelable(DateControl.STATE_VALUE)); myValueControl.setError(savedInstanceState.getCharSequence(DateControl.STATE_ERROR)); }
From source file:net.naonedbus.card.impl.CommentairesCard.java
@Override public Loader<List<Commentaire>> onCreateLoader(final int id, final Bundle bundle) { final boolean forceUpdate = (bundle != null && bundle.getBoolean(BUNDLE_FORCE_UPDATE, false)); return new LoaderTask(getContext(), mLigne, mSens, forceUpdate); }
From source file:org.thomnichols.android.gmarks.WebViewLoginActivity.java
protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); this.resumingTwoFactorAuth = savedInstanceState.getBoolean(KEY_PAUSED_FOR_TWO_FACTOR_AUTH, false); if (this.resumingTwoFactorAuth && savedInstanceState.containsKey(KEY_PAUSED_AT_URL)) this.resumeAtURL = savedInstanceState.getString(KEY_PAUSED_AT_URL); }
From source file:can.yrt.onebusaway.map.RouteMapController.java
@Override public void setState(Bundle args) { assert (args != null); String routeId = args.getString(MapParams.ROUTE_ID); mZoomToRoute = args.getBoolean(MapParams.ZOOM_TO_ROUTE, false); if (!routeId.equals(mRouteId)) { mRouteId = routeId;/* ww w . j av a2 s . c o m*/ mRoutePopup.showLoading(); mFragment.showProgress(true); //mFragment.getLoaderManager().restartLoader(ROUTES_LOADER, null, this); mLoader = onCreateLoader(ROUTES_LOADER, null); mLoader.registerListener(0, this); mLoader.startLoading(); } }
From source file:com.cellbots.remoteEyes.RemoteEyesActivity.java
/** Called when the activity is first created. */ @Override// w ww .j a v a2 s . co m public void onCreate(Bundle savedInstanceState) { Log.e("remote eyes", "started"); super.onCreate(savedInstanceState); mTorchMode = false; out = new ByteArrayOutputStream(); if ((getIntent() != null) && (getIntent().getData() != null)) { putUrl = getIntent().getData().toString(); server = putUrl.replace("http://", ""); server = server.substring(0, server.indexOf("/")); Bundle extras = getIntent().getExtras(); if ((extras != null) && (extras.getBoolean("TORCH", false))) { mTorchMode = true; } } else { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); putUrl = prefs.getString("REMOTE_EYES_PUT_URL", ""); Log.e("prefs", putUrl); if (putUrl.length() < 1) { Intent i = new Intent(); i.setClass(this, PrefsActivity.class); startActivity(i); finish(); return; } else { server = putUrl.replace("http://", ""); server = server.substring(0, server.indexOf("/")); } } resetConnection(); mHttpState = new HttpState(); setContentView(R.layout.main); mPreview = (SurfaceView) findViewById(R.id.preview); mHolder = mPreview.getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); mPreview.setOnClickListener(new OnClickListener() { public void onClick(View v) { setTorchMode(!mTorchMode); } }); this.registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { boolean useTorch = intent.getBooleanExtra("TORCH", false); setTorchMode(useTorch); } }, new IntentFilter("android.intent.action.REMOTE_EYES_COMMAND")); }
From source file:com.apptentive.android.sdk.ViewActivity.java
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); returnToPushCallbackActivity = savedInstanceState.getBoolean("returnToPushCallbackActivity", false); pushCallbackActivityName = savedInstanceState.getString("pushCallbackActivityName"); if (activityContent != null) { activityContent.onRestoreInstanceState(savedInstanceState); }//ww w .j a va 2 s .c om }