List of usage examples for android.os RemoteException printStackTrace
public void printStackTrace()
From source file:org.gateshipone.odyssey.fragments.ArtistsFragment.java
/** * Call the PBS to enqueue the selected artist * * @param position the position of the selected artist in the adapter *//*from www. j a v a 2s.co m*/ private void enqueueArtist(int position) { // identify current artist ArtistModel currentArtist = (ArtistModel) mAdapter.getItem(position); String artist = currentArtist.getArtistName(); long artistID = currentArtist.getArtistID(); if (artistID == -1) { // Try to get the artistID manually because it seems to be missing artistID = MusicLibraryHelper.getArtistIDFromName(artist, getActivity()); } // Read order preference SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getContext()); String orderKey = sharedPref.getString(getString(R.string.pref_album_sort_order_key), getString(R.string.pref_artist_albums_sort_default)); // enqueue artist try { mServiceConnection.getPBS().enqueueArtist(artistID, orderKey); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
From source file:edu.vuum.mocca.ui.tags.TagsViewFragment.java
private void deleteButtonPressed() { String message;//from w ww . j a va 2s .c o m message = getResources().getString(R.string.tags_view_deletion_dialog_message); new AlertDialog.Builder(getActivity()).setIcon(android.R.drawable.ic_dialog_alert) .setTitle(R.string.tags_view_deletion_dialog_title).setMessage(message) .setPositiveButton(R.string.tags_view_deletion_dialog_yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { try { resolver.deleteAllTagsWithRowID(tagsData.KEY_ID); } catch (RemoteException e) { Log.e(LOG_TAG, "RemoteException Caught => " + e.getMessage()); e.printStackTrace(); } mOpener.openListTagsFragment(); if (getResources().getBoolean(R.bool.isTablet) == true) { mOpener.openViewTagsFragment(-1); } else { getActivity().finish(); } } }).setNegativeButton(R.string.tags_view_deletion_dialog_no, null).show(); }
From source file:com.a3did.partner.recosample.RecoBackgroundMonitoringService.java
private void tearDown() { Log.i("BackMonitoringService", "tearDown()"); this.stopMonitoring(); try {/*from ww w .j a va2 s. c om*/ mRecoManager.unbind(); } catch (RemoteException e) { Log.e("BackMonitoringService", "RemoteException has occured while executing unbind()"); e.printStackTrace(); } }
From source file:fr.mixit.android.ui.fragments.SessionsListFragment.java
protected void refreshSessionsData() { if (mIsBound && mServiceReady) { Message msg = null;/*from ww w.j a v a 2 s .com*/ if (mMode == SessionsActivity.DISPLAY_MODE_SESSIONS) { msg = Message.obtain(null, MixItService.MSG_TALKS, 0, 0); } else if (mMode == SessionsActivity.DISPLAY_MODE_LIGHTNING_TALKS) { msg = Message.obtain(null, MixItService.MSG_LIGHTNING_TALKS, 0, 0); } if (msg != null) { setRefreshMode(true); msg.replyTo = mMessenger; final Bundle b = new Bundle(); msg.setData(b); try { mService.send(msg); } catch (final RemoteException e) { e.printStackTrace(); } mIsFirstLoad = false; } else { setRefreshMode(false); } } }
From source file:cx.ring.client.AccountEditionActivity.java
private AlertDialog createDeleteDialog() { Activity ownerActivity = this; AlertDialog.Builder builder = new AlertDialog.Builder(ownerActivity); builder.setMessage("Do you really want to delete this account").setTitle("Delete Account") .setPositiveButton("Ok", new DialogInterface.OnClickListener() { @Override/*w w w. j a v a2 s. c o m*/ public void onClick(DialogInterface dialog, int whichButton) { Bundle bundle = new Bundle(); bundle.putString("AccountID", acc_selected.getAccountID()); try { service.getRemoteService().removeAccount(acc_selected.getAccountID()); } catch (RemoteException e) { e.printStackTrace(); } finish(); } }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int whichButton) { /* Terminate with no action */ } }); AlertDialog alertDialog = builder.create(); alertDialog.setOwnerActivity(ownerActivity); return alertDialog; }
From source file:org.gateshipone.odyssey.fragments.PlaylistTracksFragment.java
/** * Call the PBS to enqueue the entire playlist. */// www . j a v a 2 s. co m private void enqueuePlaylist() { try { // add playlist mServiceConnection.getPBS().enqueuePlaylist(mPlaylistID); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
From source file:com.thunder.iap.IAPActivity.java
/** * consume a purchase// w w w. ja v a 2 s . c om * @param purchaseToken * @param consumePurchaseListener */ public void consumePurchase(final String purchaseToken, final ConsumePurchaseListener consumePurchaseListener) { new Thread(new Runnable() { @Override public void run() { try { int response = mService.consumePurchase(3, getPackageName(), purchaseToken); if (response == 0) { consumePurchaseListener.onSuccess(); } else { consumePurchaseListener.onServerError(response); } } catch (RemoteException e) { e.printStackTrace(); consumePurchaseListener.onError(e); } } }).start(); }
From source file:org.gateshipone.odyssey.fragments.PlaylistTracksFragment.java
/** * Call the PBS to enqueue the selected track. * * @param position the position of the selected track in the adapter *///from ww w . j ava 2 s. com private void enqueueTrack(int position) { TrackModel track = (TrackModel) mAdapter.getItem(position); try { mServiceConnection.getPBS().enqueueTrack(track, false); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
From source file:org.gateshipone.odyssey.fragments.PlaylistTracksFragment.java
/** * Call the PBS to enqueue the selected track as the next track. * * @param position the position of the selected track in the adapter *//*from ww w . ja v a 2 s . c o m*/ private void enqueueTrackAsNext(int position) { TrackModel track = (TrackModel) mAdapter.getItem(position); try { mServiceConnection.getPBS().enqueueTrack(track, true); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
From source file:edu.vuum.mocca.ui.story.EditStoryFragment.java
public void doSaveButtonClick() { Toast.makeText(getActivity(), "Updated.", Toast.LENGTH_SHORT).show(); StoryData location = makeStoryDataFromUI(); if (location != null) { try {//from ww w . ja v a 2s . c om resolver.updateStoryWithID(location); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); return; } } else { return; } if (getResources().getBoolean(R.bool.isTablet) == true) { mOpener.openViewStoryFragment(getUniqueKey()); } else { getActivity().finish(); // same as hitting 'back' button } }