This file contains hidden or 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
| private void setView() { | |
| viewList.add(tvContactDetails); | |
| viewList.add(llContactDetails); | |
| tvLocation.setText(event.getFull_address()); | |
| String phone = ""; | |
| if (!event.getMobile_phone().isEmpty()) { | |
| phone = event.getMobile_phone(); | |
| if (!event.getTelephone().isEmpty()) { | |
| phone = phone + "\n" + event.getTelephone(); | |
| } |
This file contains hidden or 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
| <!-- SyncAdapter related --> | |
| <string name="sync_account_type">syncadaptertutorial.example.com</string> | |
| <string name="content_authority">com.fortyonestudio.syncadaptertutorial</string> |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <account-authenticator xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:accountType="@string/sync_account_type" | |
| android:icon="@mipmap/ic_launcher" | |
| android:label="@string/app_name" | |
| android:smallIcon="@mipmap/ic_launcher" /> |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <sync-adapter xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:contentAuthority="@string/content_authority" | |
| android:accountType="@string/sync_account_type" | |
| android:userVisible="false" | |
| android:supportsUploading="false" | |
| android:allowParallelSyncs="false" | |
| android:isAlwaysSyncable="true" /> |
This file contains hidden or 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
| package com.fortyonestudio.syncadaptertutorial; | |
| import android.accounts.Account; | |
| import android.accounts.AccountManager; | |
| import android.content.Context; | |
| import android.os.Bundle; | |
| import android.support.design.widget.FloatingActionButton; | |
| import android.support.design.widget.Snackbar; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.support.v7.widget.Toolbar; |
This file contains hidden or 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
| package com.fortyonestudio.syncadaptertutorial.services; | |
| import com.fortyonestudio.syncadaptertutorial.model.DataWeather; | |
| import retrofit2.Call; | |
| import retrofit2.http.GET; | |
| import retrofit2.http.POST; | |
| /** | |
| * Created by Riris. |
This file contains hidden or 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
| package com.fortyonestudio.syncadaptertutorial.services; | |
| import com.google.gson.Gson; | |
| import com.google.gson.GsonBuilder; | |
| import java.util.concurrent.TimeUnit; | |
| import okhttp3.OkHttpClient; | |
| //import okhttp3.logging.HttpLoggingInterceptor; | |
| import okhttp3.logging.HttpLoggingInterceptor; |
This file contains hidden or 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
| package com.fortyonestudio.syncadaptertutorial.sync; | |
| import android.accounts.Account; | |
| import android.accounts.AccountManager; | |
| import android.content.AbstractThreadedSyncAdapter; | |
| import android.content.ContentProviderClient; | |
| import android.content.ContentResolver; | |
| import android.content.ContentUris; | |
| import android.content.ContentValues; | |
| import android.content.Context; |
This file contains hidden or 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
| package com.fortyonestudio.syncadaptertutorial.sync; | |
| import android.app.Service; | |
| import android.content.Intent; | |
| import android.os.IBinder; | |
| import android.util.Log; | |
| /** | |
| * Created by Riris. | |
| */ |
This file contains hidden or 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
| package com.fortyonestudio.syncadaptertutorial.sync; | |
| import android.app.Service; | |
| import android.content.Intent; | |
| import android.os.IBinder; | |
| /** | |
| * Created by Riris. | |
| */ | |
| public class ExampleAuthenticatorService extends Service { |
NewerOlder