List of usage examples for android.os Bundle EMPTY
Bundle EMPTY
To view the source code for android.os Bundle EMPTY.
Click Source Link
From source file:org.immopoly.android.api.IS24ApiService.java
@Override protected void onHandleIntent(Intent intent) { final ResultReceiver receiver = intent.getParcelableExtra(API_RECEIVER); double lat = intent.getDoubleExtra(LAT, 0.0); double lon = intent.getDoubleExtra(LNG, 0.0); Bundle b = new Bundle(); Log.d(Const.LOG_TAG, "IS24 search started"); try {/*from w w w .ja v a2 s. co m*/ receiver.send(STATUS_RUNNING, Bundle.EMPTY); final float[] radii = Const.SEARCH_RADII; // search for flats in radii[i]. finish if enough flats found (1 is enough in the last run) for (int i = 0; i < radii.length; i++) { int min = i == radii.length - 1 ? 1 : Const.SEARCH_MIN_RESULTS; Flats flats = loadFlats(lat, lon, radii[i], min, Const.SEARCH_MAX_RESULTS); if (flats != null) { Log.d(Const.LOG_TAG, "IS24 search finished. #flats: " + flats.size()); b.putParcelableArrayList("flats", flats); receiver.send(STATUS_FINISHED, b); this.stopSelf(); return; } } // no flats found Log.d(Const.LOG_TAG, "IS24 search finished with no flats: "); b.putString(Intent.EXTRA_TEXT, NO_FLATS); } catch (Exception e) { Log.e(Const.LOG_TAG, "IS24 search caught Exception: ", e); } receiver.send(STATUS_ERROR, b); this.stopSelf(); }
From source file:inforuh.eventfinder.sync.SyncAdapter.java
public static void periodicSync(Context context, int interval, int flexTime) { Account account = getAccount(context); String authority = context.getString(R.string.content_authority); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { SyncRequest request = new SyncRequest.Builder().syncPeriodic(interval, flexTime) .setSyncAdapter(account, authority).setExtras(new Bundle()).build(); ContentResolver.requestSync(request); } else {//from w w w . ja va 2s. c om ContentResolver.addPeriodicSync(account, authority, Bundle.EMPTY, interval); } }
From source file:com.feedhenry.helloworld.test.FOAuthAbstractClassTest.java
public void testActivityCallsFHInitOnStartup() throws IOException { final Delegate delegate = new Delegate(); getInstrumentation().runOnMainSync(new Runnable() { @Override//w ww . ja va2 s .co m public void run() { StubFHOAuthActivity activity = startActivity(new Intent(), Bundle.EMPTY, null); activity.setCallbackDelegate(delegate); activity.onStart(); } }); StubFHOAuthActivity main = getActivity(); while (!delegate.onFHReadyCalled) { assertTrue("Timeout after 5 seconds", System.currentTimeMillis() - startTime < 5000); } main.finish(); }
From source file:org.peterbaldwin.vlcremote.fragment.ArtFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (getMediaServer() != null) { getLoaderManager().initLoader(LOADER_IMAGE, Bundle.EMPTY, this); }//from w w w . j ava2s . c o m }
From source file:com.jpventura.popularmovies.app.TabPageFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { int strategy = getArguments().getInt(FRAGMENT_LOADER_STRATEGY); getLoaderManager().initLoader(strategy, Bundle.EMPTY, this); super.onActivityCreated(savedInstanceState); }
From source file:com.conferenceengineer.android.iosched.ui.phone.SessionsActivity.java
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_search: if (!UIUtils.hasHoneycomb()) { startSearch(null, false, Bundle.EMPTY, false); return true; }//from w w w . j a va 2s.c o m break; } return super.onOptionsItemSelected(item); }
From source file:com.android.settings.SettingsLicenseActivity.java
private void showHtmlFromDefaultXmlFiles() { getLoaderManager().initLoader(LOADER_ID_LICENSE_HTML_LOADER, Bundle.EMPTY, this); }
From source file:com.github.secondsun.catfactsdemo.networking.LoaderBasedFactFetcher.java
@Override public void load(CatFacts activity) { final Loader<List<String>> localLoader = activity.getLoaderManager() .initLoader(LoaderBasedFactFetcher.LOADER_ID, Bundle.EMPTY, this); localLoader.startLoading();/*from w ww . j a v a 2 s. co m*/ }
From source file:com.google.android.demos.jamendo.widget.Loadable.java
/** * @see LoaderManager#initLoader(int, Bundle, LoaderCallbacks) *//* w ww . j a v a 2 s . c o m*/ public void init() { Bundle args = new Bundle(); args.putInt(ARG_NUMBER, mTargetCount); mLoaderManager.initLoader(mLoaderId, Bundle.EMPTY, this); }
From source file:com.feedhenry.helloworld.test.FOAuthAbstractClassTest.java
public void testLoginButtonShowsIfNotLoggedIn() throws Exception { final Delegate delegate = new Delegate(); getInstrumentation().runOnMainSync(new Runnable() { @Override//from ww w. j a v a2 s . c om public void run() { StubFHOAuthActivity activity = startActivity(new Intent(), Bundle.EMPTY, null); activity.setCallbackDelegate(delegate); activity.onStart(); } }); StubFHOAuthActivity main = getActivity(); while (!delegate.onFHReadyCalled) { assertTrue("Timeout after 5 seconds", System.currentTimeMillis() - startTime < 5000); } main.checkSession(); assertTrue(delegate.onNotLoggedInCalled); main.finish(); }