Back to project page PatternAndroid.
The source code is released under:
MIT License
If you think the Android project PatternAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.twitterclone.model.operations; // w w w . j a v a 2s .c o m import com.loopj.android.http.*; import com.twitterclone.model.provider.Contract; import android.content.ContentValues; import android.content.Context; import android.os.Bundle; import com.foxykeep.datadroid.exception.ConnectionException; import com.foxykeep.datadroid.exception.CustomRequestException; import com.foxykeep.datadroid.exception.DataException; import com.foxykeep.datadroid.requestmanager.Request; import com.foxykeep.datadroid.service.RequestService.Operation; public final class TweetsOperation implements Operation { public RequestParams tmp; @Override public Bundle execute(Context context, Request request) throws ConnectionException, DataException, CustomRequestException { ContentValues[] tweetsValues = new ContentValues[RestTwitter.tweetsValuesArray .size()]; for (int i = 0; i < RestTwitter.tweetsValuesArray.size(); ++i) { tweetsValues[i] = RestTwitter.tweetsValuesArray.get(i); System.out.println("Tweet" + RestTwitter.tweetsValuesArray.get(i)); } context.getContentResolver().delete(Contract.Tweets.CONTENT_URI, null, null); context.getContentResolver().bulkInsert(Contract.Tweets.CONTENT_URI, tweetsValues); return null; } }