Example usage for android.os RemoteException printStackTrace

List of usage examples for android.os RemoteException printStackTrace

Introduction

In this page you can find the example usage for android.os RemoteException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:org.awesomeapp.messenger.ui.ConversationView.java

private void showPromptForData(final String transferFrom, String filePath) {
    AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);

    builder.setTitle(mContext.getString(R.string.file_transfer));
    builder.setMessage(transferFrom + ' ' + mActivity.getString(R.string.wants_to_send_you_the_file) + " '"
            + filePath + "'. " + mActivity.getString(R.string.accept_transfer_));

    builder.setNeutralButton(R.string.button_yes_accept_all, new DialogInterface.OnClickListener() {

        public void onClick(DialogInterface dialog, int which) {

            try {
                mCurrentChatSession.setIncomingFileResponse(transferFrom, true, true);
            } catch (RemoteException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }/*from   w  ww .  j  a  v  a  2 s  .c  om*/

            dialog.dismiss();
        }

    });

    builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {

        public void onClick(DialogInterface dialog, int which) {
            try {
                mCurrentChatSession.setIncomingFileResponse(transferFrom, true, false);
            } catch (RemoteException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

            dialog.dismiss();
        }

    });

    builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {

            try {
                mCurrentChatSession.setIncomingFileResponse(transferFrom, false, false);
            } catch (RemoteException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

            // Do nothing
            dialog.dismiss();
        }
    });

    AlertDialog alert = builder.create();
    alert.show();

}

From source file:cm.aptoide.pt.MainActivity.java

void updateAll() {

    new Thread(new Runnable() {

        @Override//from  w  ww.jav  a2s.  co m
        public void run() {
            Cursor c = db.getUpdates(order);

            for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
                ViewApk apk = db.getApk(c.getLong(0), Category.INFOXML);
                try {
                    ViewCache cache = new ViewCache(apk.hashCode(), apk.getMd5(), apk.getApkid(),
                            apk.getVername());
                    ViewDownloadManagement download = new ViewDownloadManagement(apk.getPath(), apk, cache,
                            db.getServer(apk.getRepo_id(), false).getLogin(), null);
                    serviceDownloadManager.callStartDownload(download);
                    Thread.sleep(1000);
                } catch (RemoteException e) {
                    e.printStackTrace();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

            }

            c.close();
        }
    }).start();
}

From source file:com.sentaroh.android.SMBSync2.ActivityMain.java

final private void setCallbackListener() {
    util.addDebugMsg(1, "I", "setCallbackListener entered");
    try {/*w w w .  jav  a  2  s . co  m*/
        mSvcClient.setCallBack(mSvcCallbackStub);
    } catch (RemoteException e) {
        e.printStackTrace();
        util.addDebugMsg(0, "E", "setCallbackListener error :" + e.toString());
    }
}

From source file:com.sentaroh.android.SMBSync2.ActivityMain.java

private void startSyncTask(ArrayList<SyncTaskItem> alp) {
    String[] task_name = new String[alp.size()];
    for (int i = 0; i < alp.size(); i++)
        task_name[i] = alp.get(i).getSyncTaskName();
    try {/*from ww w  .  ja  v a 2 s .  c om*/
        mSvcClient.aidlStartSpecificSyncTask(task_name);
        //         mMainTabHost.setCurrentTab(2);
    } catch (RemoteException e) {
        e.printStackTrace();
    }
}

From source file:com.sentaroh.android.SMBSync2.ActivityMain.java

final private void unsetCallbackListener() {
    if (mSvcClient != null) {
        try {/* ww w . j a  va 2s .  c o  m*/
            mSvcClient.removeCallBack(mSvcCallbackStub);
        } catch (RemoteException e) {
            e.printStackTrace();
            util.addDebugMsg(0, "E", "unsetCallbackListener error :" + e.toString());
        }
    }
}

From source file:com.sentaroh.android.SMBSync.SMBSyncMain.java

private void showNotificationMsg(String msg) {
    try {//from w  ww .  j  av a2  s  .  c  o  m
        mSvcClient.aidlShowNotificationMsg("", "", msg);
    } catch (RemoteException e) {
        e.printStackTrace();
    }
}

From source file:com.sentaroh.android.SMBSync.SMBSyncMain.java

@SuppressWarnings("unused")
private void setNotificationIcon(int icon_res) {
    try {// w  w w.  ja  v a2s .  c  o m
        mSvcClient.aidlSetNotificationIcon(icon_res);
    } catch (RemoteException e) {
        e.printStackTrace();
    }
}

From source file:com.sentaroh.android.SMBSync.SMBSyncMain.java

@SuppressWarnings("unused")
private void showNotificationMsg(String prof, String msg) {
    try {//from ww w . j  a  v  a 2s. co  m
        mSvcClient.aidlShowNotificationMsg(prof, "", msg);
    } catch (RemoteException e) {
        e.printStackTrace();
    }
}

From source file:com.sentaroh.android.SMBSync.SMBSyncMain.java

@SuppressWarnings("unused")
private void showNotificationMsg(String prof, String fp, String msg) {
    try {/*from   w ww .  java2 s.c om*/
        mSvcClient.aidlShowNotificationMsg(prof, fp, msg);
    } catch (RemoteException e) {
        e.printStackTrace();
    }
}

From source file:com.sentaroh.android.SMBSync.SMBSyncMain.java

final private void setCallbackListener() {
    util.addDebugLogMsg(1, "I", "setCallbackListener entered");
    try {//  ww w  .  ja  va  2 s .c  om
        mSvcClient.setCallBack(mSvcCallbackStub);
    } catch (RemoteException e) {
        e.printStackTrace();
        util.addDebugLogMsg(0, "E", "setCallbackListener error :" + e.toString());
    }
}