List of usage examples for android.os RemoteException printStackTrace
public void printStackTrace()
From source file:com.piusvelte.mosaic.android.MosaicMap.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.map, container, false); btnNickname = ((Button) rootView.findViewById(R.id.nickname)); btnNickname.setOnClickListener(new View.OnClickListener() { @Override/* w w w .j a va2 s .c o m*/ public void onClick(View v) { Activity activity = getActivity(); final EditText newNickname = new EditText(activity); newNickname.setText(btnNickname.getText().toString()); new AlertDialog.Builder(activity).setTitle("Change nickname").setView(newNickname) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { String nickname = newNickname.getText().toString(); if (nickname.length() > 0) { if (!nickname.equals(btnNickname.getText().toString())) { try { iLocationService.changeNickname(nickname); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } else { //TODO no name } } }).setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }).show(); } }); return rootView; }
From source file:com.google.android.gcm.demo.app.BluetoothHDPActivity.java
private void sendMessage(int what, int value) { if (mHealthService == null) { Log.d(TAG, "Health Service not connected."); return;//from www . j ava 2s . c o m } try { mHealthService.send(Message.obtain(null, what, value, 0)); } catch (RemoteException e) { Log.w(TAG, "Unable to reach service."); e.printStackTrace(); } }
From source file:com.google.android.gcm.demo.app.BluetoothHDPActivity.java
private void sendMessageWithDevice(int what) { if (mHealthService == null) { Log.d(TAG, "Health Service not connected."); return;/*from w ww .j av a2 s . co m*/ } try { mHealthService.send(Message.obtain(null, what, mDevice)); } catch (RemoteException e) { Log.w(TAG, "Unable to reach service."); e.printStackTrace(); } }
From source file:com.dynamixsoftware.printingsample.IntentApiFragment.java
@Override public void onDetach() { super.onDetach(); if (intentApi != null) { intentApi.stopService(null);/*from www . j a v a 2 s. c o m*/ try { intentApi.setServiceCallback(null); } catch (RemoteException e) { e.printStackTrace(); } try { intentApi.setPrintCallback(null); } catch (RemoteException e) { e.printStackTrace(); } intentApi = null; } }
From source file:org.gateshipone.odyssey.fragments.FilesFragment.java
/** * Call the PBS to enqueue all music in the current folder and his children. *//*w w w . j ava 2 s . c o m*/ private void enqueueCurrentFolderAndSubFolders() { try { mServiceConnection.getPBS().enqueueDirectoryAndSubDirectories(mCurrentDirectory.getPath()); } catch (RemoteException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } }
From source file:pl.poznan.put.cs.ify.app.MainActivity.java
public void requestActiveRecipesList() { if (mService != null) { Message msg = Message.obtain(null, ServiceHandler.REQUEST_ACTIVE_RECIPES); try {/*from w w w .j a v a2 s . co m*/ mService.send(msg); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
From source file:org.gateshipone.odyssey.fragments.FilesFragment.java
/** * Call the PBS to enqueue the selected file. * * @param position the position of the selected file * @param asNext flag if the file should be enqueued as next *//*from w w w .j a va2 s. co m*/ private void enqueueFile(int position, boolean asNext) { FileModel currentFile = (FileModel) mAdapter.getItem(position); try { mServiceConnection.getPBS().enqueueFile(currentFile.getPath(), asNext); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
From source file:org.gateshipone.odyssey.fragments.FilesFragment.java
/** * Call the PBS to play all music files from the selected folder and his children. * A previous playlist will be cleared./*from w w w . ja v a 2 s. c o m*/ * * @param position the position of the selected folder */ private void playFolderAndSubFolders(int position) { try { mServiceConnection.getPBS().clearPlaylist(); enqueueFolderAndSubFolders(position); mServiceConnection.getPBS().jumpTo(0); } catch (RemoteException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } }
From source file:org.gateshipone.odyssey.fragments.FilesFragment.java
/** * Call the PBS to enqueue all music files from the selected folder and his children. * * @param position the position of the selected folder *///from ww w. ja v a2 s. co m private void enqueueFolderAndSubFolders(int position) { FileModel currentFolder = (FileModel) mAdapter.getItem(position); try { mServiceConnection.getPBS().enqueueDirectoryAndSubDirectories(currentFolder.getPath()); } catch (RemoteException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } }
From source file:org.gateshipone.odyssey.fragments.FilesFragment.java
/** * Call the PBS to play all music in the current folder and his children. * A previous playlist will be cleared.// ww w . ja va 2 s . c o m */ private void playCurrentFolderAndSubFolders() { try { mServiceConnection.getPBS().clearPlaylist(); enqueueCurrentFolderAndSubFolders(); mServiceConnection.getPBS().jumpTo(0); } catch (RemoteException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } }