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
<provider | |
android:name=".provider.AcmeProvider" | |
android:authorities="com.acme.provider.myapp" | |
android:label="Log" | |
android:enabled="true"/> |
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
public class RestClient { | |
private static final String TAG = "RestClient"; | |
private static final String USER_AGENT = "VisioStorm Android"; | |
/** Methods supported by RestClient */ | |
public enum RequestMethod { | |
GET, POST | |
} |
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
<service | |
android:name=".authenticator.AuthenticationService" | |
android:exported="true" > | |
<intent-filter> | |
<action android:name="android.accounts.AccountAuthenticator" /> | |
</intent-filter> | |
<meta-data | |
android:name="android.accounts.AccountAuthenticator" | |
android:resource="@xml/authenticator" /> |
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
public class SyncAdapter extends AbstractThreadedSyncAdapter { | |
private final static String TAG = "SyncAdapter"; | |
private AccountManager mAccountManager; | |
public SyncAdapter(Context context, boolean autoInitialize) { | |
super(context, autoInitialize); | |
mAccountManager = AccountManager.get(context); | |
} |
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
public static void syncLog(Context context, String user, String authToken) { | |
Log.i(TAG, "Syncing VisioStorm log"); | |
ContentResolver cr = context.getContentResolver(); | |
Cursor cursor = PendingMovie.getAll(cr); | |
API.setUser(user); | |
API.setAuthToken(authToken); |
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
public class SyncService extends Service { | |
/** Lock to synchronize access to SyncAdapter*/ | |
private static final Object syncLock = new Object(); | |
/** SyncAdapter used to sync data with server */ | |
private static SyncAdapter sSyncAdapter = null; | |
@Override | |
public void onCreate(){ |
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
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android" | |
android:contentAuthority="com.acme.provider.visiostorm" | |
android:accountType="com.acme.app.authenticator" | |
/> |
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
<service | |
android:name=".sync.SyncService" | |
android:exported="true" > | |
<intent-filter> | |
<action android:name="android.content.SyncAdapter" /> | |
</intent-filter> | |
<meta-data | |
android:name="android.content.SyncAdapter" | |
android:resource="@xml/syncadapter" /> | |
</service> |
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
android update project --path ./ --name MyProject |
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
sdk.dir=/opt/android-sdk-linux | |
target=android-8 |