Created
September 15, 2011 11:20
-
-
Save darko1002001/1219030 to your computer and use it in GitHub Desktop.
GCAsset.upload()
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
// create the request with account, an upload progress listener and the asset id that was previously | |
verified and marked as new or verified ( not complete). Can accept one or multiple asset Ids. | |
returns an JSONArray of the status of each upload with asset id and status code and a response | |
GCAssetCollection with the parsed response. | |
GCBaseRequest request = GCAssets.upload(GCAccount.getInstance(getApplicationContext()), | |
new GCUploadProgressListener() { | |
@Override | |
public void onUploadStarted(String assetId, String filepath) { | |
Log.e(TAG, "Started: " + assetId + filepath); | |
} | |
@Override | |
public void onUploadFinished(String assetId, String filepath) { | |
Log.e(TAG, "Started: " + assetId + filepath); | |
} | |
@Override | |
public void onProgress(int total, int uploaded) { | |
Log.e(TAG, "Progress: " + "Total: " + total + " Uploaded" + uploaded); | |
} | |
}, "416"); | |
sync: | |
request.execute(); | |
async: | |
new GCAsyncRunner(request, this).execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment