This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
}, new NetworkRxHelper.OnAfterConnectInBackground() { | |
@Override | |
public void call(ApiCall.ApiResponse response) { | |
try { | |
throw new IOException("Test Exception"); | |
} catch (IOException e) { | |
rxHelper.setThrowable(e); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import static gogolook.callgogolook2.util.NetworkRxHelper.*; | |
NetworkRxHelper rxHelper = create(mContext); | |
rxHelper.connect( | |
new OnGetApiCall() { | |
@Override | |
public ApiCall call() { | |
return null;//return ApiCall object | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import static gogolook.callgogolook2.util.NetworkRxHelper.*; | |
NetworkRxHelper rxHelper = create(mContext); | |
rxHelper.connect( | |
new OnGetApiCall() { | |
@Override | |
public ApiCall call() { | |
return null;//return ApiCall object | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
}, new OnAfterConnectInBackground() { | |
@Override | |
public void call(ApiCall.ApiResponse response) { | |
try { | |
throw new Exception("This is a test exception"); | |
} catch (Exception e) { | |
rxHelper.setThrowable(e); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
}, new OnAfterConnectInBackground() { | |
@Override | |
public void call(ApiCall.ApiResponse response) { | |
try { | |
throw new Exception("This is a test exception"); | |
} catch (Exception e) { | |
rxHelper.setThrowable(e); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new OnAfterConnectInBackground() { | |
@Override | |
public void call(ApiCall.ApiResponse response) { | |
try { | |
throw new Exception("This is a test exception"); | |
} catch (Exception e) { | |
rxHelper.setThrowable(e); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NetworkRxHelper rxHelper = create(mContext); | |
rxHelper.connect( | |
new OnGetApiCall() { | |
@Override | |
public ApiCall call() { | |
return null;//return ApiCall object | |
} | |
}, new OnBeforeConnect() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CancellableNetworkProgressAsyncTask task = new CancellableNetworkProgressAsyncTask(mContext) { | |
... ... ... | |
}; | |
//Utils.executeAsyncTaskBackground(task); | |
task.runAsRxHelper(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent dialogIntent = new Intent(this, ExampleDialogActivity.class); | |
dialogIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | |
startActivity(dialogIntent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent dialogIntent = new Intent(this, ExampleDialogActivity.class); | |
dialogIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | |
startActivity(dialogIntent); |
NewerOlder