├── AndroidSecurity
├── .gitignore
├── AndroidManifest.xml
├── ImportKey.java
├── README
├── README_secureCh6ServiceInvocation
├── ant.properties
├── build.xml
├── libs
│ ├── android-support-v4.jar
│ ├── commons-lang-2.6.jar
│ └── org.apache.commons.codec-1.3.0.jar
├── proguard-project.txt
├── res
│ ├── drawable
│ │ └── icon.png
│ ├── layout
│ │ ├── aes_encryption_input.xml
│ │ ├── auth_token_activity.xml
│ │ ├── login_activity.xml
│ │ ├── login_successful.xml
│ │ ├── main.xml
│ │ └── select_action_activity.xml
│ ├── menu
│ │ └── main.xml
│ ├── raw
│ │ ├── keystore2.p12
│ │ └── your_ownca_keystore.bks
│ └── values
│ │ ├── arrays.xml
│ │ └── strings.xml
├── src
│ └── com
│ │ └── enterpriseandroid
│ │ └── androidSecurity
│ │ ├── AESEncryptionActivity.java
│ │ ├── AuthTokenActivity.java
│ │ ├── BaseActivity.java
│ │ ├── CheckPermissionActivity.java
│ │ ├── InstallCertActivity.java
│ │ ├── LoginActivity.java
│ │ ├── LoginSuccessfulActivity.java
│ │ ├── MainActivity.java
│ │ ├── SecureConnectionActivity.java
│ │ ├── SendBroadcastActivity.java
│ │ ├── ShowCertActivity.java
│ │ └── util
│ │ ├── AESEncryptionHelper.java
│ │ ├── HttpsClientHelper.java
│ │ └── PasswordHelper.java
└── tools
│ ├── eclipse.xml
│ ├── ide
│ └── eclipse
│ │ ├── classpath
│ │ └── project
│ └── project.properties
├── Contactscontractexample
├── .classpath
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── libs
│ └── android-support-v13.jar
├── proguard-project.txt
├── project.properties
├── res
│ ├── drawable-hdpi
│ │ ├── ic_action_search.png
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ ├── ic_action_search.png
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ ├── ic_action_search.png
│ │ └── ic_launcher.png
│ ├── layout-large
│ │ └── main.xml
│ ├── layout
│ │ ├── content.xml
│ │ ├── data_only.xml
│ │ ├── detail.xml
│ │ ├── list_frag_list.xml
│ │ └── main.xml
│ ├── menu
│ │ ├── search_menu.xml
│ │ └── table_menu.xml
│ ├── values-v11
│ │ └── styles.xml
│ ├── values-v14
│ │ └── styles.xml
│ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── enterpriseandroidbook
│ └── contactscontractexample
│ ├── ItemDetailFragment.java
│ ├── ItemFragment.java
│ ├── ListColumnMap.java
│ ├── MainActivity.java
│ ├── PickFragment.java
│ ├── TabActivity.java
│ ├── TabbedActivity.java
│ └── TabbedPagedFragment.java
├── FragmentFramework
├── .gitignore
├── AndroidManifest.xml
├── proguard.cfg
├── project.properties
├── res
│ ├── drawable-hdpi
│ │ └── icon.png
│ ├── drawable-ldpi
│ │ └── icon.png
│ ├── drawable-mdpi
│ │ └── icon.png
│ ├── layout-large-port
│ │ └── main.xml
│ ├── layout-large
│ │ └── main.xml
│ ├── layout
│ │ ├── content.xml
│ │ ├── content_control_activity.xml
│ │ ├── detail.xml
│ │ ├── list_frag_list.xml
│ │ └── main.xml
│ ├── menu
│ │ ├── control_menu.xml
│ │ └── search_menu.xml
│ └── values
│ │ └── strings.xml
├── src
│ └── com
│ │ └── enterpriseandroidbook
│ │ └── fragmentframework
│ │ ├── ItemDetailFragment.java
│ │ ├── ItemFragment.java
│ │ ├── MainActivity.java
│ │ ├── PickFragment.java
│ │ ├── TabActivity.java
│ │ └── TabbedActivity.java
└── tools
│ ├── eclipse.xml
│ └── ide
│ └── eclipse
│ ├── classpath
│ └── project
├── HumanInterfaceForData
├── .classpath
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── FragmentBasics
│ ├── AndroidManifest.xml
│ ├── libs
│ │ └── android-support-v4.jar
│ ├── project.properties
│ ├── res
│ │ ├── drawable-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-ldpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── layout-large
│ │ │ └── news_articles.xml
│ │ ├── layout
│ │ │ ├── article_view.xml
│ │ │ └── news_articles.xml
│ │ └── values
│ │ │ └── strings.xml
│ └── src
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── fragments
│ │ ├── ArticleFragment.java
│ │ ├── HeadlinesFragment.java
│ │ ├── Ipsum.java
│ │ └── MainActivity.java
├── libs
│ └── android-support-v4.jar
├── proguard-project.txt
├── project.properties
├── res
│ ├── drawable-hdpi
│ │ ├── ic_action_search.png
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ ├── ic_action_search.png
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ ├── ic_action_search.png
│ │ └── ic_launcher.png
│ ├── layout-large-port
│ │ └── main.xml
│ ├── layout-large
│ │ └── main.xml
│ ├── layout
│ │ ├── content.xml
│ │ ├── data_only.xml
│ │ ├── detail.xml
│ │ ├── list_frag_list.xml
│ │ └── main.xml
│ ├── menu
│ │ ├── search_menu.xml
│ │ └── share_menu.xml
│ ├── values-v11
│ │ └── styles.xml
│ ├── values-v14
│ │ └── styles.xml
│ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── enterpriseandroidbook
│ └── contactscontractexample
│ ├── DetailMenuActionFragment.java
│ ├── ItemDetailFragment.java
│ ├── ItemFragment.java
│ ├── ListColumnMap.java
│ ├── MainActivity.java
│ ├── PickFragment.java
│ ├── TabActivity.java
│ └── TabbedActivity.java
├── KeyValCP
├── .gitignore
├── AndroidManifest.xml
├── LICENSE
├── README
├── proguard-project.txt
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── drawable-ldpi
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── drawable
│ │ ├── ic_check.png
│ │ └── ic_x.png
│ ├── layout
│ │ ├── activity_extras.xml
│ │ ├── activity_keyval.xml
│ │ └── keyval_row.xml
│ ├── menu
│ │ └── menu.xml
│ └── values
│ │ └── strings.xml
├── src
│ └── com
│ │ └── enterpriseandroid
│ │ └── database
│ │ └── keyval
│ │ ├── ExtrasActivity.java
│ │ ├── KeyValActivity.java
│ │ └── data
│ │ ├── ColumnDef.java
│ │ ├── KeyValContentProvider.java
│ │ ├── KeyValContract.java
│ │ └── KeyValHelper.java
└── tools
│ ├── eclipse.xml
│ ├── ide
│ └── eclipse
│ │ ├── classpath
│ │ └── project
│ ├── project.properties
│ ├── setup.bat
│ └── setup.sh
├── KeyValClient
├── .gitignore
├── AndroidManifest.xml
├── LICENSE
├── README
├── proguard-project.txt
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── drawable-ldpi
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── drawable
│ │ ├── ic_check.png
│ │ └── ic_x.png
│ ├── layout
│ │ ├── activity_extras.xml
│ │ ├── activity_keyval.xml
│ │ └── keyval_row.xml
│ └── values
│ │ └── strings.xml
├── src
│ └── com
│ │ └── enterpriseandroid
│ │ └── database
│ │ ├── keyval
│ │ └── data
│ │ │ └── KeyValContract.java
│ │ └── keyvalclient
│ │ ├── ExtrasActivity.java
│ │ └── KeyValActivity.java
└── tools
│ ├── eclipse.xml
│ ├── ide
│ └── eclipse
│ │ ├── classpath
│ │ └── project
│ ├── project.properties
│ ├── setup.bat
│ └── setup.sh
├── KeyValDB
├── .gitignore
├── AndroidManifest.xml
├── LICENSE
├── README
├── proguard-project.txt
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── drawable-ldpi
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── keyval_row.xml
│ └── values
│ │ └── strings.xml
├── src
│ └── com
│ │ └── enterpriseandroid
│ │ └── database
│ │ ├── keyval
│ │ └── simple
│ │ │ ├── KeyValActivity.java
│ │ │ ├── KeyValApplication.java
│ │ │ └── data
│ │ │ ├── KeyValContentProvider.java
│ │ │ ├── KeyValContract.java
│ │ │ └── KeyValHelper.java
│ │ └── sql
│ │ └── SQLSamples.java
└── tools
│ ├── eclipse.xml
│ ├── ide
│ └── eclipse
│ │ ├── classpath
│ │ └── project
│ ├── project.properties
│ ├── setup.bat
│ └── setup.sh
├── MigrateClinic
├── .gitignore
├── AndroidManifest.xml
├── README
├── libs
│ └── migrate-api.jar
├── migrate.properties
├── proguard-project.txt
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── drawable-ldpi
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ ├── activity_patient_details.xml
│ │ ├── activity_patients.xml
│ │ ├── activity_xray.xml
│ │ ├── patient_row.xml
│ │ └── xray_row.xml
│ ├── menu
│ │ └── menu.xml
│ ├── values
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── xml
│ │ ├── pref_headers.xml
│ │ └── prefs.xml
├── src
│ └── com
│ │ └── enterpriseandroid
│ │ └── migrateclinic
│ │ ├── BaseActivity.java
│ │ ├── ClinicApplication.java
│ │ ├── PatientDetailActivity.java
│ │ ├── PatientsActivity.java
│ │ ├── PrefsActivity.java
│ │ ├── PrefsFragment.java
│ │ ├── XRayActivity.java
│ │ └── data
│ │ ├── Patient.java
│ │ ├── PatientContract.java
│ │ ├── XRay.java
│ │ ├── XRayContract.java
│ │ └── XRayDetailsContract.java
└── tools
│ ├── eclipse.xml
│ ├── ide
│ └── eclipse
│ │ ├── classpath
│ │ └── project
│ ├── project.properties
│ ├── setup.bat
│ └── setup.sh
├── MigrateContacts
├── .gitignore
├── AndroidManifest.xml
├── README
├── build-schema.xml
├── libs
│ └── .gitignore
├── proguard-project.txt
├── res
│ ├── drawable-hdpi
│ │ ├── conflict.png
│ │ └── ic_launcher.png
│ ├── drawable-ldpi
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ ├── activity_contact_detail.xml
│ │ ├── activity_contacts.xml
│ │ ├── activity_resolve_contact.xml
│ │ ├── contact_row.xml
│ │ └── spinner_conflict_text.xml
│ ├── menu
│ │ └── menu.xml
│ ├── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── xml
│ │ ├── pref_headers.xml
│ │ └── prefs.xml
├── src-schema
│ └── com
│ │ └── enterpriseandroid
│ │ └── migratecontacts
│ │ └── Contact.java
├── src
│ └── com
│ │ └── enterpriseandroid
│ │ └── migratecontacts
│ │ ├── BaseActivity.java
│ │ ├── ContactDetailActivity.java
│ │ ├── ContactsActivity.java
│ │ ├── ContactsApplication.java
│ │ ├── PrefsActivity.java
│ │ ├── PrefsFragment.java
│ │ └── ResolveContactActivity.java
└── tools
│ ├── .gitignore
│ ├── eclipse.xml
│ ├── ide
│ └── eclipse
│ │ ├── classpath
│ │ └── project
│ ├── migrate.properties
│ ├── project.properties
│ ├── setup.bat
│ └── setup.sh
├── README.md
├── README_ivy
├── README_mysql
├── README_tomcat
├── README_windows
├── awsServiceContacts
├── .gitignore
├── README
├── build.xml
├── ivy-settings.xml
├── ivy.xml
├── src
│ ├── log4j.xml
│ ├── main
│ │ ├── java
│ │ │ ├── com
│ │ │ │ └── enterpriseandroid
│ │ │ │ │ └── awsContacts
│ │ │ │ │ ├── dao
│ │ │ │ │ ├── ContactDao.java
│ │ │ │ │ ├── VersionNotMatchException.java
│ │ │ │ │ └── impl
│ │ │ │ │ │ ├── ContactDaoDynamoDBImpl.java
│ │ │ │ │ │ └── ContactDaoDynamoDBV2Impl.java
│ │ │ │ │ ├── dataModel
│ │ │ │ │ ├── Contact.java
│ │ │ │ │ ├── SyncRequest.java
│ │ │ │ │ └── SyncResult.java
│ │ │ │ │ ├── rest
│ │ │ │ │ └── ContactController.java
│ │ │ │ │ └── service
│ │ │ │ │ ├── ContactService.java
│ │ │ │ │ └── impl
│ │ │ │ │ └── ContactServiceImpl.java
│ │ │ └── log4j.xml
│ │ ├── resources
│ │ │ ├── com
│ │ │ │ └── enterpriseandroid
│ │ │ │ │ └── awsContacts
│ │ │ │ │ └── dao
│ │ │ │ │ └── impl
│ │ │ │ │ └── AwsCredentials.properties
│ │ │ └── spring
│ │ │ │ ├── applicationContext-rest.xml
│ │ │ │ ├── applicationContext-storage.xml
│ │ │ │ └── applicationContext-test.xml
│ │ └── webapp
│ │ │ ├── META-INF
│ │ │ └── MANIFEST.MF
│ │ │ └── WEB-INF
│ │ │ └── web.xml
│ ├── spring
│ │ ├── applicationContext-rest.xml
│ │ ├── applicationContext-storage.xml
│ │ └── applicationContext-test.xml
│ └── test
│ │ └── java
│ │ └── unit
│ │ └── test
│ │ ├── dao
│ │ ├── CreateLocalIndexTable.java
│ │ ├── DaoTestClient.java
│ │ ├── Dyanmodbv2DaoTest.java
│ │ ├── Dynamodbv1DaoTest.java
│ │ └── ShowTables.java
│ │ └── rest
│ │ ├── AwsTest.java
│ │ └── TestClient.java
└── tools
│ └── ide
│ └── eclipse
│ ├── classpath
│ ├── project
│ └── settings
│ ├── .jsdtscope
│ ├── org.eclipse.jdt.core.prefs
│ ├── org.eclipse.wst.common.component
│ ├── org.eclipse.wst.common.project.facet.core.xml
│ ├── org.eclipse.wst.jsdt.ui.superType.container
│ └── org.eclipse.wst.jsdt.ui.superType.name
├── googleAppEngineContacts
├── .gitignore
├── README
├── build.properties
├── build.xml
├── ivy-settings.xml
├── ivy.xml
├── ivy
│ └── ivy.jar
├── src
│ ├── META-INF
│ │ └── persistence.xml
│ ├── com
│ │ └── enterpriseandroid
│ │ │ └── googleappengineContacts
│ │ │ ├── contact
│ │ │ ├── GoogleAppEngineContactsServlet.java
│ │ │ ├── rest
│ │ │ │ └── ContactController.java
│ │ │ └── util
│ │ │ │ └── EntityManagerFactoryHelper.java
│ │ │ ├── dao
│ │ │ ├── ContactDao.java
│ │ │ ├── VersionNotMatchException.java
│ │ │ └── impl
│ │ │ │ └── ContactDaoGoogleAppEngineImpl.java
│ │ │ ├── dataModel
│ │ │ ├── Contact.java
│ │ │ ├── SyncRequest.java
│ │ │ └── SyncResult.java
│ │ │ └── service
│ │ │ ├── ContactService.java
│ │ │ └── impl
│ │ │ └── ContactServiceImpl.java
│ └── spring
│ │ ├── applicationContext-rest.xml
│ │ └── applicationContext-storage.xml
├── test
│ ├── spring
│ │ └── applicationContext-test.xml
│ └── unit
│ │ └── test
│ │ └── rest
│ │ ├── AppEngineTest.java
│ │ └── TestClient.java
├── tools
│ └── ide
│ │ └── eclipse
│ │ ├── classpath
│ │ ├── project
│ │ └── settings
│ │ ├── com.google.appengine.eclipse.core.prefs
│ │ ├── com.google.gdt.eclipse.core.prefs
│ │ ├── org.apache.ivyde.eclipse.prefs
│ │ ├── org.eclipse.jdt.core.prefs
│ │ └── org.eclipse.wst.common.project.facet.core.xml
└── war
│ ├── WEB-INF
│ ├── appengine-web.xml
│ ├── logging.properties
│ └── web.xml
│ ├── favicon.ico
│ └── index.html
├── restfulCachingProviderContacts
├── .gitignore
├── AndroidManifest.xml
├── README
├── proguard-project.txt
├── res
│ ├── drawable
│ │ └── ic_launcher.png
│ ├── layout
│ │ ├── activity_contact_details.xml
│ │ ├── activity_contacts.xml
│ │ └── contact_row.xml
│ ├── menu
│ │ └── menu.xml
│ ├── values
│ │ └── strings.xml
│ └── xml
│ │ ├── pref_headers.xml
│ │ └── prefs.xml
├── src
│ ├── com
│ │ └── enterpriseandroid
│ │ │ └── restfulcontacts
│ │ │ ├── BaseActivity.java
│ │ │ ├── ContactDetailActivity.java
│ │ │ ├── ContactsActivity.java
│ │ │ ├── ContactsApplication.java
│ │ │ ├── PrefsActivity.java
│ │ │ ├── data
│ │ │ ├── ContactsContract.java
│ │ │ ├── ContactsHelper.java
│ │ │ └── ContactsProvider.java
│ │ │ └── svc
│ │ │ ├── MessageHandler.java
│ │ │ └── RESTService.java
│ └── net
│ │ └── callmeike
│ │ └── android
│ │ └── data
│ │ └── util
│ │ ├── ColumnMap.java
│ │ └── ProjectionMap.java
└── tools
│ ├── eclipse.xml
│ ├── ide
│ └── eclipse
│ │ ├── classpath
│ │ └── project
│ ├── project.properties
│ ├── setup.bat
│ └── setup.sh
├── springServiceContacts
├── .gitignore
├── README
├── WebContent
│ ├── META-INF
│ │ └── MANIFEST.MF
│ └── WEB-INF
│ │ └── web.xml
├── build-db.xml
├── build.properties
├── build.xml
├── contact.jdbc.sql
├── ivy-settings.xml
├── ivy.xml
├── src
│ ├── com
│ │ └── enterpriseandroid
│ │ │ └── springServiceContacts
│ │ │ ├── dao
│ │ │ ├── ContactDao.java
│ │ │ ├── VersionNotMatchException.java
│ │ │ └── impl
│ │ │ │ ├── ContactDaoHibernateImpl.java
│ │ │ │ └── ContactDaoJdbcImpl.java
│ │ │ ├── dataModel
│ │ │ └── Contact.java
│ │ │ ├── rest
│ │ │ └── ContactController.java
│ │ │ └── service
│ │ │ ├── ContactService.java
│ │ │ └── impl
│ │ │ └── ContactServiceImpl.java
│ ├── hibernateAnnotation.cfg.xml
│ ├── jdbc.properties
│ ├── log4j.xml
│ ├── spring
│ │ ├── applicationContext-rest.xml
│ │ ├── applicationContext-storage.xml
│ │ └── applicationContext-test.xml
│ └── unit
│ │ └── test
│ │ ├── dao
│ │ ├── DaoHibernateTest.java
│ │ ├── DaoJdbcTest.java
│ │ └── DaoTestClient.java
│ │ └── rest
│ │ └── ContactRestTest.java
└── tools
│ └── ide
│ └── eclipse
│ ├── classpath
│ ├── project
│ └── settings
│ ├── .jsdtscope
│ ├── org.apache.ivyde.eclipse.prefs
│ ├── org.eclipse.jdt.core.prefs
│ ├── org.eclipse.wst.common.component
│ ├── org.eclipse.wst.common.project.facet.core.xml
│ ├── org.eclipse.wst.jsdt.ui.superType.container
│ └── org.eclipse.wst.jsdt.ui.superType.name
├── springSyncServiceContacts
├── .gitignore
├── README
├── WebContent
│ ├── META-INF
│ │ └── MANIFEST.MF
│ └── WEB-INF
│ │ └── web.xml
├── build-db.xml
├── build-ivy.xml
├── build.properties
├── build.xml
├── contact.jdbc.sql
├── ivy-settings.xml
├── ivy.xml
├── src
│ ├── com
│ │ └── enterpriseandroid
│ │ │ └── springServiceContacts
│ │ │ ├── dao
│ │ │ ├── ContactDao.java
│ │ │ ├── VersionNotMatchException.java
│ │ │ └── impl
│ │ │ │ ├── ContactDaoHibernateImpl.java
│ │ │ │ └── ContactDaoJdbcImpl.java
│ │ │ ├── dataModel
│ │ │ ├── Contact.java
│ │ │ ├── SyncRequest.java
│ │ │ └── SyncResult.java
│ │ │ ├── rest
│ │ │ └── ContactController.java
│ │ │ └── service
│ │ │ ├── ContactService.java
│ │ │ └── impl
│ │ │ └── ContactServiceImpl.java
│ ├── hibernateAnnotation.cfg.xml
│ ├── jdbc.properties
│ ├── log4j.xml
│ ├── spring
│ │ ├── applicationContext-rest.xml
│ │ ├── applicationContext-storage.xml
│ │ └── applicationContext-test.xml
│ └── unit
│ │ └── test
│ │ ├── dao
│ │ ├── DaoHibernateTest.java
│ │ ├── DaoJdbcTest.java
│ │ └── DaoTestClient.java
│ │ └── rest
│ │ ├── SpringSyncServiceContactsTest.java
│ │ └── TestClient.java
└── tools
│ └── ide
│ └── eclipse
│ ├── classpath
│ ├── project
│ └── settings
│ ├── .jsdtscope
│ ├── org.apache.ivyde.eclipse.prefs
│ ├── org.eclipse.jdt.core.prefs
│ ├── org.eclipse.wst.common.component
│ ├── org.eclipse.wst.common.project.facet.core.xml
│ ├── org.eclipse.wst.jsdt.ui.superType.container
│ └── org.eclipse.wst.jsdt.ui.superType.name
└── syncAdapterContacts
├── .gitignore
├── AccountMgr.png
├── AndroidManifest.xml
├── README
├── libs
└── gson-2.2.1.jar
├── proguard-project.txt
├── res
├── drawable
│ ├── ic_launcher.png
│ ├── ic_menu_account.png
│ ├── ic_menu_sync1.png
│ └── ic_menu_sync2.png
├── layout
│ ├── activity_contact_details.xml
│ ├── activity_contacts.xml
│ └── contact_row.xml
├── menu
│ └── menu.xml
├── values
│ └── strings.xml
└── xml
│ ├── account.xml
│ ├── account_prefs.xml
│ ├── pref_headers.xml
│ ├── prefs.xml
│ └── sync.xml
├── src
├── com
│ └── enterpriseandroid
│ │ └── syncadaptercontacts
│ │ ├── BaseActivity.java
│ │ ├── ContactDetailActivity.java
│ │ ├── ContactsActivity.java
│ │ ├── ContactsApplication.java
│ │ ├── PrefsActivity.java
│ │ ├── data
│ │ ├── ContactsContract.java
│ │ ├── ContactsHelper.java
│ │ └── ContactsProvider.java
│ │ ├── svc
│ │ ├── RESTService.java
│ │ └── SyncUtil.java
│ │ └── sync
│ │ ├── AccountMgr.java
│ │ ├── AccountService.java
│ │ ├── InstallationId.java
│ │ ├── SyncAdapter.java
│ │ └── SyncService.java
└── net
│ └── callmeike
│ └── android
│ └── data
│ └── util
│ ├── ColumnMap.java
│ └── ProjectionMap.java
└── tools
├── eclipse.xml
├── ide
└── eclipse
│ ├── classpath
│ └── project
├── project.properties
├── setup.bat
└── setup.sh
/AndroidSecurity/.gitignore:
--------------------------------------------------------------------------------
1 | .settings
2 | bin
3 | build
4 | gen/*
5 | .project
6 | .classpath
7 | /local.properties
8 | /project.properties
9 |
10 |
--------------------------------------------------------------------------------
/AndroidSecurity/ant.properties:
--------------------------------------------------------------------------------
1 | # This file is used to override default values used by the Ant build system.
2 | #
3 | # This file must be checked into Version Control Systems, as it is
4 | # integral to the build system of your project.
5 |
6 | # This file is only used by the Ant script.
7 |
8 | # You can use this to override default values such as
9 | # 'source.dir' for the location of your java source folder and
10 | # 'out.dir' for the location of your output folder.
11 |
12 | # You can also use it define how the release builds are signed by declaring
13 | # the following properties:
14 | # 'key.store' for the location of your keystore and
15 | # 'key.alias' for the name of the key to use.
16 | # The password will be asked during the build when you use the 'release' target.
17 |
18 |
--------------------------------------------------------------------------------
/AndroidSecurity/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/AndroidSecurity/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/AndroidSecurity/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/AndroidSecurity/libs/commons-lang-2.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/AndroidSecurity/libs/commons-lang-2.6.jar
--------------------------------------------------------------------------------
/AndroidSecurity/libs/org.apache.commons.codec-1.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/AndroidSecurity/libs/org.apache.commons.codec-1.3.0.jar
--------------------------------------------------------------------------------
/AndroidSecurity/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/AndroidSecurity/res/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/AndroidSecurity/res/drawable/icon.png
--------------------------------------------------------------------------------
/AndroidSecurity/res/layout/auth_token_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
13 |
19 |
25 |
31 |
32 |
--------------------------------------------------------------------------------
/AndroidSecurity/res/layout/login_successful.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/AndroidSecurity/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/AndroidSecurity/res/layout/select_action_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
13 |
--------------------------------------------------------------------------------
/AndroidSecurity/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/AndroidSecurity/res/raw/keystore2.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/AndroidSecurity/res/raw/keystore2.p12
--------------------------------------------------------------------------------
/AndroidSecurity/res/raw/your_ownca_keystore.bks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/AndroidSecurity/res/raw/your_ownca_keystore.bks
--------------------------------------------------------------------------------
/AndroidSecurity/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @string/symmetric_encryption
5 | - @string/password_hash
6 | - @string/secure_connection
7 | - @string/account_manager
8 | - @string/install_certificate
9 |
10 |
--------------------------------------------------------------------------------
/AndroidSecurity/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | AndroidSecurity
4 | Encrypt
5 | Save
6 | Quit
7 | Login
8 | Main Menu
9 | Username
10 | Password
11 | Sign in
12 | You have successfully signed in
13 | Sign-in
14 | hello
15 | Successful secure request.
16 | Failed secure request.
17 | Symmetric Encryption
18 | Password Hash
19 | Secure Connection
20 | Account Manager
21 | Install Certificate
22 | Go Back
23 | save
24 |
25 |
--------------------------------------------------------------------------------
/AndroidSecurity/src/com/enterpriseandroid/androidSecurity/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.androidSecurity;
2 |
3 | import com.enterpriseandroid.androidSecurity.R;
4 |
5 | import android.app.Activity;
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 | import android.view.View;
9 | import android.widget.Button;
10 |
11 | public class BaseActivity extends Activity {
12 |
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | }
17 |
18 |
19 | protected void createGoBackButton() {
20 | Button button = (Button) findViewById(R.id.back_button);
21 | button.setOnClickListener(new View.OnClickListener() {
22 | public void onClick(View v) {
23 | goBack();
24 | }
25 | });
26 | }
27 |
28 | protected void goBack() {
29 | Intent intent = new Intent(this, MainActivity.class);
30 | startActivity(intent);
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/AndroidSecurity/src/com/enterpriseandroid/androidSecurity/LoginSuccessfulActivity.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.androidSecurity;
2 |
3 | import com.enterpriseandroid.androidSecurity.R;
4 |
5 | import android.app.Activity;
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 | import android.view.View;
9 | import android.widget.Button;
10 |
11 | public class LoginSuccessfulActivity extends BaseActivity {
12 |
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.login_successful);
17 | createGoBackButton();
18 | }
19 |
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/AndroidSecurity/src/com/enterpriseandroid/androidSecurity/SendBroadcastActivity.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.androidSecurity;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 |
7 | public class SendBroadcastActivity extends Activity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | Intent secureIntent = new Intent("RECEIVE_BROADCAST");
11 | String receivePermission =
12 | "com.enterpriseandroid.androidSecurity.RECEIVE_BROADCAST";
13 | sendBroadcast(secureIntent, receivePermission);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/AndroidSecurity/tools/eclipse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/AndroidSecurity/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/AndroidSecurity/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | AndroidSecurity
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/AndroidSecurity/tools/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-15
15 |
--------------------------------------------------------------------------------
/Contactscontractexample/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Contactscontractexample/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contactscontractexample
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Contactscontractexample/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.6
12 |
--------------------------------------------------------------------------------
/Contactscontractexample/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
11 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Contactscontractexample/libs/android-support-v13.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/Contactscontractexample/libs/android-support-v13.jar
--------------------------------------------------------------------------------
/Contactscontractexample/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/Contactscontractexample/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-16
15 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/drawable-hdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/Contactscontractexample/res/drawable-hdpi/ic_action_search.png
--------------------------------------------------------------------------------
/Contactscontractexample/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/Contactscontractexample/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Contactscontractexample/res/drawable-mdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/Contactscontractexample/res/drawable-mdpi/ic_action_search.png
--------------------------------------------------------------------------------
/Contactscontractexample/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/Contactscontractexample/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Contactscontractexample/res/drawable-xhdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/Contactscontractexample/res/drawable-xhdpi/ic_action_search.png
--------------------------------------------------------------------------------
/Contactscontractexample/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/Contactscontractexample/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Contactscontractexample/res/layout-large/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/layout/content.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/layout/data_only.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/layout/detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/layout/list_frag_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
18 |
19 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/menu/search_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/menu/table_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World, ListAndContentActivity!
4 | Contacts Provider Example App
5 | An empty content fragment
6 | Item
7 | An empty detail fragment
8 | Data
9 | Waiting for data
10 | Table
11 | Number of columns:
12 | Number of rows:
13 | item_bundle_label
14 | detail_bundle_label
15 | No tables
16 | Table name:
17 | Table uri:
18 | "shoawtab_label"
19 |
20 |
--------------------------------------------------------------------------------
/Contactscontractexample/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/FragmentFramework/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin
7 | /gen
8 | lint.xml
9 |
--------------------------------------------------------------------------------
/FragmentFramework/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/FragmentFramework/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-15
12 |
--------------------------------------------------------------------------------
/FragmentFramework/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/FragmentFramework/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/FragmentFramework/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/FragmentFramework/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/FragmentFramework/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/FragmentFramework/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/FragmentFramework/res/layout/content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/FragmentFramework/res/layout/content_control_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/FragmentFramework/res/layout/detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/FragmentFramework/res/layout/list_frag_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/FragmentFramework/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/FragmentFramework/res/menu/control_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/FragmentFramework/res/menu/search_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/FragmentFramework/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World, ListAndContentActivity!
4 | FragmentFrameworkExampleApp
5 | An empty content fragment
6 | Play
7 | Pause
8 | Details
9 | Item
10 | An empty detail fragment
11 | Data
12 | Search
13 |
14 |
--------------------------------------------------------------------------------
/FragmentFramework/tools/eclipse.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/FragmentFramework/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/FragmentFramework/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | FragmentFramework
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | HumanInterfaceForData
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.6
12 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/FragmentBasics/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/FragmentBasics/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/HumanInterfaceForData/FragmentBasics/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-15
15 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/FragmentBasics/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/FragmentBasics/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/FragmentBasics/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/FragmentBasics/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/FragmentBasics/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/FragmentBasics/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/FragmentBasics/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/FragmentBasics/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/FragmentBasics/res/layout/article_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/FragmentBasics/res/layout/news_articles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/FragmentBasics/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Fragment Basics
20 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/HumanInterfaceForData/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-16
15 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/drawable-hdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/res/drawable-hdpi/ic_action_search.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/drawable-mdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/res/drawable-mdpi/ic_action_search.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/drawable-xhdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/res/drawable-xhdpi/ic_action_search.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/HumanInterfaceForData/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/layout/content.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/layout/data_only.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
20 |
21 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/layout/detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/layout/list_frag_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/menu/search_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/menu/share_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World, ListAndContentActivity!
4 | Contacts Provider Example App
5 | An empty content fragment
6 | Item
7 | An empty detail fragment
8 | Data
9 | Waiting for data
10 | Table
11 | Number of columns:
12 | Number of rows:
13 | item_bundle_label
14 | detail_bundle_label
15 | No tables
16 | Table name:
17 | Table uri:
18 | "shoawtab_label"
19 |
20 |
--------------------------------------------------------------------------------
/HumanInterfaceForData/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/KeyValCP/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin/*
7 | /gen/*
8 | /build.xml
9 | /lint.xml
10 | /local.properties
11 | /project.properties
12 |
--------------------------------------------------------------------------------
/KeyValCP/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2012, G. Blake Meike
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/KeyValCP/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/KeyValCP/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValCP/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValCP/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValCP/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValCP/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValCP/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValCP/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValCP/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValCP/res/drawable/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValCP/res/drawable/ic_check.png
--------------------------------------------------------------------------------
/KeyValCP/res/drawable/ic_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValCP/res/drawable/ic_x.png
--------------------------------------------------------------------------------
/KeyValCP/res/layout/activity_extras.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/KeyValCP/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/KeyValCP/tools/eclipse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/KeyValCP/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/KeyValCP/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | KeyValCP
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/KeyValCP/tools/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-15
15 |
--------------------------------------------------------------------------------
/KeyValCP/tools/setup.bat:
--------------------------------------------------------------------------------
1 | REM
2 | REM Double click from Explorer
3 | REM ... or type "setup.bat" at the CMD prompt
4 |
5 | COPY project.properties ..
6 | COPY ..\tools\ide\eclipse\project ..\.project
7 | COPY ..\tools\ide\eclipse\classpath ..\.classpath
8 |
--------------------------------------------------------------------------------
/KeyValCP/tools/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # type: ". setup.sh" from the shell prompt
3 |
4 | cp project.properties ..
5 | cp ../tools/ide/eclipse/project ../.project
6 | cp ../tools/ide/eclipse/classpath ../.classpath
7 |
8 |
9 |
--------------------------------------------------------------------------------
/KeyValClient/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin/*
7 | /gen/*
8 | /build.xml
9 | /lint.xml
10 | /local.properties
11 | /project.properties
12 |
--------------------------------------------------------------------------------
/KeyValClient/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2012, G. Blake Meike
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/KeyValClient/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/KeyValClient/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValClient/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValClient/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValClient/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValClient/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValClient/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValClient/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValClient/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValClient/res/drawable/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValClient/res/drawable/ic_check.png
--------------------------------------------------------------------------------
/KeyValClient/res/drawable/ic_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValClient/res/drawable/ic_x.png
--------------------------------------------------------------------------------
/KeyValClient/res/layout/activity_extras.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/KeyValClient/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | KeyValClient
4 | ExtrasActivity
5 |
6 |
7 | Key:
8 | Val:
9 | key
10 | value
11 | Add
12 | Extra
13 |
14 |
15 | update!
16 |
17 |
--------------------------------------------------------------------------------
/KeyValClient/tools/eclipse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/KeyValClient/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/KeyValClient/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | KeyValClient
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/KeyValClient/tools/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-15
15 |
--------------------------------------------------------------------------------
/KeyValClient/tools/setup.bat:
--------------------------------------------------------------------------------
1 | REM
2 | REM Double click from Explorer
3 | REM ... or type "setup.bat" at the CMD prompt
4 |
5 | COPY project.properties ..
6 | COPY ..\tools\ide\eclipse\project ..\.project
7 | COPY ..\tools\ide\eclipse\classpath ..\.classpath
8 |
--------------------------------------------------------------------------------
/KeyValClient/tools/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # type: ". setup.sh" from the shell prompt
3 |
4 | cp project.properties ..
5 | cp ../tools/ide/eclipse/project ../.project
6 | cp ../tools/ide/eclipse/classpath ../.classpath
7 |
8 |
9 |
--------------------------------------------------------------------------------
/KeyValDB/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin/*
7 | /gen/*
8 | /build.xml
9 | /lint.xml
10 | /local.properties
11 | /project.properties
12 |
13 |
--------------------------------------------------------------------------------
/KeyValDB/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/KeyValDB/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2012, G. Blake Meike
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/KeyValDB/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/KeyValDB/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValDB/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValDB/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValDB/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValDB/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValDB/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValDB/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValDB/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/KeyValDB/res/layout/keyval_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
15 |
16 |
25 |
26 |
34 |
35 |
--------------------------------------------------------------------------------
/KeyValDB/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | SimpleKeyVal
4 |
5 |
--------------------------------------------------------------------------------
/KeyValDB/src/com/enterpriseandroid/database/keyval/simple/KeyValApplication.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.database.keyval.simple;
2 |
3 | import android.app.Application;
4 | import android.database.sqlite.SQLiteDatabase;
5 |
6 | import com.enterpriseandroid.database.keyval.simple.data.KeyValHelper;
7 |
8 | public class KeyValApplication extends Application {
9 | private KeyValHelper dbHelper;
10 | private Thread uiThread;
11 |
12 | @Override
13 | public void onCreate() {
14 | super.onCreate();
15 |
16 | // Raw database access. Replaced with ContentProvider
17 | uiThread = Thread.currentThread();
18 | dbHelper = new KeyValHelper(this);
19 | }
20 |
21 | /**
22 | * Raw database access. Replaced with ContentProvider
23 | *
24 | * @return the global database instance
25 | */
26 | @Deprecated
27 | public SQLiteDatabase getDb() {
28 | if (Thread.currentThread().equals(uiThread)) {
29 | throw new RuntimeException("Database opened on main thread");
30 | }
31 | return dbHelper.getWritableDatabase();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/KeyValDB/src/com/enterpriseandroid/database/keyval/simple/data/KeyValContract.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.database.keyval.simple.data;
2 |
3 | import android.net.Uri;
4 | import android.provider.BaseColumns;
5 |
6 | public final class KeyValContract {
7 | private KeyValContract() {}
8 |
9 | public static final String TABLE_KEYVAL = "keyval";
10 | public static final String AUTHORITY
11 | = "com.enterpriseandroid.database.keyval.simple";
12 | public static final Uri URI = Uri.parse(
13 | "content://" + AUTHORITY + "/" + KeyValContract.TABLE_KEYVAL);
14 |
15 | public static final String TYPE_KEYVAL
16 | = "vnd.android.cursor.dir/vnd.com.enterpriseandroid.database.keyval";
17 |
18 | public static final class Columns implements BaseColumns {
19 | private Columns() {}
20 |
21 | public static final String KEY = "key";
22 | public static final String VAL = "val";
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/KeyValDB/src/com/enterpriseandroid/database/sql/SQLSamples.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/KeyValDB/src/com/enterpriseandroid/database/sql/SQLSamples.java
--------------------------------------------------------------------------------
/KeyValDB/tools/eclipse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/KeyValDB/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/KeyValDB/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | KeyValDB
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/KeyValDB/tools/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-15
15 |
--------------------------------------------------------------------------------
/KeyValDB/tools/setup.bat:
--------------------------------------------------------------------------------
1 | REM
2 | REM Double click from Explorer
3 | REM ... or type "setup.bat" at the CMD prompt
4 |
5 | COPY project.properties ..
6 | COPY ..\tools\ide\eclipse\project ..\.project
7 | COPY ..\tools\ide\eclipse\classpath ..\.classpath
8 |
--------------------------------------------------------------------------------
/KeyValDB/tools/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # type: ". setup.sh" from the shell prompt
3 |
4 | cp project.properties ..
5 | cp ../tools/ide/eclipse/project ../.project
6 | cp ../tools/ide/eclipse/classpath ../.classpath
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MigrateClinic/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin/*
7 | /gen/*
8 | /build.xml
9 | /lint.xml
10 | /local.properties
11 | /project.properties
12 | /migrate.xml
13 |
14 |
--------------------------------------------------------------------------------
/MigrateClinic/libs/migrate-api.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateClinic/libs/migrate-api.jar
--------------------------------------------------------------------------------
/MigrateClinic/migrate.properties:
--------------------------------------------------------------------------------
1 |
2 | migrate.sdk.root=../../client/android/sdk/build/dist
3 |
4 | #migrate.object=com.enterpriseandroid.migrateclinic.Patient
5 | # Since there are two objects, this property must be specified
6 | # on the command line, using the -D flag, e.g.:
7 | # ant -f migrate.xml -Dmigrate.object=com.enterpriseandroid.migrateclinic.data.Patient
8 |
9 | migrate.class.root=bin/classes
10 |
11 | migrate.gen.root=src
12 |
13 | migrate.endpoint=http://migrate.eordercenter.com:80/migrate
14 |
15 |
--------------------------------------------------------------------------------
/MigrateClinic/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/MigrateClinic/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateClinic/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MigrateClinic/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateClinic/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/MigrateClinic/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateClinic/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MigrateClinic/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateClinic/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MigrateClinic/res/layout/activity_patients.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
20 |
21 |
--------------------------------------------------------------------------------
/MigrateClinic/res/layout/xray_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
16 |
17 |
26 |
27 |
--------------------------------------------------------------------------------
/MigrateClinic/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/MigrateClinic/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/MigrateClinic/res/xml/pref_headers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/MigrateClinic/res/xml/prefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/MigrateClinic/src/com/enterpriseandroid/migrateclinic/PrefsActivity.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.migrateclinic;
2 |
3 | import java.util.List;
4 |
5 | import android.os.Build;
6 | import android.os.Bundle;
7 | import android.preference.PreferenceActivity;
8 |
9 |
10 | public class PrefsActivity extends PreferenceActivity {
11 |
12 | @SuppressWarnings("deprecation")
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
17 | addPreferencesFromResource(R.xml.prefs);
18 | }
19 | }
20 |
21 | @Override
22 | public void onBuildHeaders(List target) {
23 | loadHeadersFromResource(R.xml.pref_headers, target);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/MigrateClinic/src/com/enterpriseandroid/migrateclinic/PrefsFragment.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.migrateclinic;
2 |
3 | import android.os.Bundle;
4 | import android.preference.PreferenceFragment;
5 |
6 |
7 | public class PrefsFragment extends PreferenceFragment {
8 |
9 | @Override
10 | public void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | addPreferencesFromResource(R.xml.prefs);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/MigrateClinic/src/com/enterpriseandroid/migrateclinic/data/Patient.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.migrateclinic.data;
2 |
3 | import net.migrate.api.annotations.WebdataSchema;
4 |
5 |
6 | @WebdataSchema(version="1")
7 | public interface Patient {
8 | public String getSsn();
9 | public String getFirstname();
10 | public String getLastname();
11 | public String getInsurer();
12 | }
13 |
--------------------------------------------------------------------------------
/MigrateClinic/src/com/enterpriseandroid/migrateclinic/data/PatientContract.java:
--------------------------------------------------------------------------------
1 | /* Generated Source Code - Do not Edit! */
2 | package com.enterpriseandroid.migrateclinic.data;
3 |
4 | import android.net.Uri;
5 | import android.provider.BaseColumns;
6 | import net.migrate.api.Webdata;
7 |
8 | public final class PatientContract {
9 | private PatientContract() {}
10 |
11 | public static final String SCHEMA_ID = Patient.class.getName();
12 |
13 | public static final Uri SCHEMA_PATIENT_URI = Webdata.Schema.schemaUri(SCHEMA_ID);
14 | public static final Uri OBJECT_PATIENT_URI = Webdata.Object.objectUri(SCHEMA_ID);
15 |
16 | public static final class Columns {
17 | private Columns() {}
18 |
19 | public static final String ID = BaseColumns._ID;
20 | public static final String SSN = "ssn";
21 | public static final String FIRSTNAME = "firstname";
22 | public static final String LASTNAME = "lastname";
23 | public static final String INSURER = "insurer";
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/MigrateClinic/src/com/enterpriseandroid/migrateclinic/data/XRay.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.migrateclinic.data;
2 |
3 | import java.io.InputStream;
4 |
5 | import net.migrate.api.annotations.WebdataSchema;
6 |
7 |
8 | @WebdataSchema(version="1")
9 | public interface XRay {
10 | public String getSsn();
11 | public String getDescription();
12 | public String getNotes();
13 | public Long getTimestamp();
14 | public InputStream getXRay();
15 | }
16 |
--------------------------------------------------------------------------------
/MigrateClinic/src/com/enterpriseandroid/migrateclinic/data/XRayContract.java:
--------------------------------------------------------------------------------
1 | /* Generated Source Code - Do not Edit! */
2 | package com.enterpriseandroid.migrateclinic.data;
3 |
4 | import android.net.Uri;
5 | import android.provider.BaseColumns;
6 | import net.migrate.api.Webdata;
7 |
8 | public final class XRayContract {
9 | private XRayContract() {}
10 |
11 | public static final String SCHEMA_ID = XRay.class.getName();
12 |
13 | public static final Uri SCHEMA_XRAY_URI = Webdata.Schema.schemaUri(SCHEMA_ID);
14 | public static final Uri OBJECT_XRAY_URI = Webdata.Object.objectUri(SCHEMA_ID);
15 |
16 | public static final class Columns {
17 | private Columns() {}
18 |
19 | public static final String ID = BaseColumns._ID;
20 | public static final String SSN = "ssn";
21 | public static final String TIMESTAMP = "timestamp";
22 | public static final String DESCRIPTION = "description";
23 | public static final String NOTES = "notes";
24 | public static final String XRAY = "xray";
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MigrateClinic/tools/eclipse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MigrateClinic/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MigrateClinic/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MigrateClinic
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/MigrateClinic/tools/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-15
15 |
--------------------------------------------------------------------------------
/MigrateClinic/tools/setup.bat:
--------------------------------------------------------------------------------
1 | REM
2 | REM Double click from Explorer
3 | REM ... or type "setup.bat" at the CMD prompt
4 |
5 | COPY project.properties ..
6 | COPY ..\tools\ide\eclipse\project ..\.project
7 | COPY ..\tools\ide\eclipse\classpath ..\.classpath
8 |
--------------------------------------------------------------------------------
/MigrateClinic/tools/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # type: ". setup.sh" from the shell prompt
3 |
4 | cp project.properties ..
5 | cp ../tools/ide/eclipse/project ../.project
6 | cp ../tools/ide/eclipse/classpath ../.classpath
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MigrateContacts/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin/*
7 | /gen/*
8 | build.xml
9 | lint.xml
10 | /local.properties
11 | /migrate.xml
12 | /build
13 | /project.properties
14 |
15 |
--------------------------------------------------------------------------------
/MigrateContacts/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
11 |
12 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
32 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/MigrateContacts/build-schema.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MigrateContacts/libs/.gitignore:
--------------------------------------------------------------------------------
1 | preventdirectoryfromgettingdeletedi
2 |
--------------------------------------------------------------------------------
/MigrateContacts/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/MigrateContacts/res/drawable-hdpi/conflict.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateContacts/res/drawable-hdpi/conflict.png
--------------------------------------------------------------------------------
/MigrateContacts/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateContacts/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MigrateContacts/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateContacts/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/MigrateContacts/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateContacts/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MigrateContacts/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/MigrateContacts/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MigrateContacts/res/layout/activity_contacts.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
20 |
21 |
--------------------------------------------------------------------------------
/MigrateContacts/res/layout/spinner_conflict_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
--------------------------------------------------------------------------------
/MigrateContacts/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/MigrateContacts/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ff0000
4 | #00ff00
5 |
--------------------------------------------------------------------------------
/MigrateContacts/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 30dp
4 | 16sp
5 |
--------------------------------------------------------------------------------
/MigrateContacts/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/MigrateContacts/res/xml/pref_headers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/MigrateContacts/res/xml/prefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/MigrateContacts/src-schema/com/enterpriseandroid/migratecontacts/Contact.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.migratecontacts;
2 |
3 | import net.migrate.api.annotations.WebDataSchema;
4 |
5 | @WebDataSchema(version="1")
6 | public interface Contact {
7 | public String getFirstname();
8 | public String getLastname();
9 | public String getEmail();
10 | public String getPhoneNumber();
11 | }
12 |
--------------------------------------------------------------------------------
/MigrateContacts/src/com/enterpriseandroid/migratecontacts/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.migratecontacts;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.app.Activity;
5 | import android.content.Intent;
6 | import android.util.Log;
7 | import android.view.Menu;
8 | import android.view.MenuInflater;
9 | import android.view.MenuItem;
10 |
11 | @SuppressLint("Registered")
12 | public class BaseActivity extends Activity {
13 | private static final String TAG = "BASE";
14 |
15 | @Override
16 | public boolean onCreateOptionsMenu(Menu menu) {
17 | MenuInflater inflater = getMenuInflater();
18 | inflater.inflate(R.menu.menu, menu);
19 | return true;
20 | }
21 |
22 | @Override
23 | public boolean onOptionsItemSelected(MenuItem item) {
24 | switch (item.getItemId()) {
25 | case R.id.item_prefs:
26 | startActivity(new Intent(this, PrefsActivity.class));
27 | break;
28 |
29 | default:
30 | Log.i(TAG, "Unrecognized menu item: " + item);
31 | return false;
32 | }
33 |
34 | return true;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/MigrateContacts/src/com/enterpriseandroid/migratecontacts/PrefsActivity.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.migratecontacts;
2 |
3 | import java.util.List;
4 |
5 | import android.os.Build;
6 | import android.os.Bundle;
7 | import android.preference.PreferenceActivity;
8 |
9 |
10 | public class PrefsActivity extends PreferenceActivity {
11 |
12 | @SuppressWarnings("deprecation")
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
17 | addPreferencesFromResource(R.xml.prefs);
18 | }
19 | }
20 |
21 | @Override
22 | public void onBuildHeaders(List target) {
23 | loadHeadersFromResource(R.xml.pref_headers, target);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/MigrateContacts/src/com/enterpriseandroid/migratecontacts/PrefsFragment.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.migratecontacts;
2 |
3 | import android.os.Bundle;
4 | import android.preference.PreferenceFragment;
5 |
6 |
7 | public class PrefsFragment extends PreferenceFragment {
8 |
9 | @Override
10 | public void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | addPreferencesFromResource(R.xml.prefs);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/MigrateContacts/tools/.gitignore:
--------------------------------------------------------------------------------
1 | none
2 |
--------------------------------------------------------------------------------
/MigrateContacts/tools/eclipse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MigrateContacts/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MigrateContacts/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MigrateContacts
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/MigrateContacts/tools/migrate.properties:
--------------------------------------------------------------------------------
1 | # migrate sdk root/home directory
2 | migrate.sdk.root=../../migrate-sdk-beta
3 |
4 | # The endpoint for the Migrate Service
5 | migrate.endpoint=http://localhost:8080/
6 |
7 | # The fqn for the class that defines the migrate schema: specify in migrate.properties
8 | migrate.object=com.enterpriseandroid.migratecontacts.Contact
9 |
10 | # The root of the directory containing the template interface: specify in migrate.properties
11 | migrate.class.root=build/classes-schema
12 |
13 | # The directory into which the Contract file will be put
14 | migrate.gen.root=gen
15 |
--------------------------------------------------------------------------------
/MigrateContacts/tools/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-15
15 |
--------------------------------------------------------------------------------
/MigrateContacts/tools/setup.bat:
--------------------------------------------------------------------------------
1 | REM
2 | REM Double click from Explorer
3 | REM ... or type "setup.bat" at the CMD prompt
4 |
5 | COPY project.properties ..
6 | COPY migrate.properties ..
7 | COPY ..\tools\ide\eclipse\project ..\.project
8 | COPY ..\tools\ide\eclipse\classpath ..\.classpath
9 |
--------------------------------------------------------------------------------
/MigrateContacts/tools/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # type: ". setup.sh" from the shell prompt
3 |
4 | cp project.properties ..
5 | cp migrate.properties ..
6 | cp ../tools/ide/eclipse/project ../.project
7 | cp ../tools/ide/eclipse/classpath ../.classpath
8 |
9 |
10 |
--------------------------------------------------------------------------------
/README_ivy:
--------------------------------------------------------------------------------
1 | This file contains notes regarding the use of ivy in the book projects:
2 |
3 | Ivy re-resolve: Ivy keeps a cache of jar files that can sometimes become
4 | stale and that can create compile errors in the projects that use ivy,
5 | like the service oriented examples. Problems often show up as
6 | ClassNotFoundException related to the JPA API.
7 |
8 | The solution to this issue is to "re-resolve" the ivy dependencies in
9 | Eclipse. You can perform this task as follows:
10 |
11 | 1. Right mouse click the open project in Eclipse
12 |
13 | 2. Then select Ivy -> Resolve
14 |
15 |
--------------------------------------------------------------------------------
/README_mysql:
--------------------------------------------------------------------------------
1 | This file contains notes regarding the use of mysql in the book projects:
2 |
3 | Mysql on windows:
4 |
5 | === To guarantee installation of the mysql service on windows:
6 |
7 | 1. Go to control panel and bring up the user account control section by searching
8 | for "User Account Control" in the upper right search box, then turn off
9 | security notifications as follows in the section entitled:
10 |
11 | Choose when to be notified about changes to your computer
12 |
13 | Drag the bar from "Always Notify" to "Never Notify"
14 |
15 | 2. Reboot your computer.
16 |
17 | 3. Then run the following command:
18 |
19 | $MYSQL_HOME/bin/mysqld --install
20 |
21 | 4. reboot your computer.
22 |
23 | === To set the mysql root password, execute the instructions on the following
24 | page:
25 |
26 | http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
27 |
28 |
--------------------------------------------------------------------------------
/README_tomcat:
--------------------------------------------------------------------------------
1 | This file contains notes regarding the use of Tomcat in the book projects:
2 |
3 | To debug problems with Tomcat, view the contents of the file:
4 |
5 | $CATALINA_HOME/logs/catalina.out
6 |
7 | or the log file named with the current date. Aside from simply running the
8 | 'cat' command in a shell, you can also have the contents printed live to a
9 | console in a shell using the tail command as follows:
10 |
11 | tail $CATALINA_HOME/logs/catalina.out
12 |
--------------------------------------------------------------------------------
/README_windows:
--------------------------------------------------------------------------------
1 | This file contains help for converting UNIX specific project instructions to
2 | their windows equivalent.
3 |
4 | Many chapters in the book rely on the use of the cygwin UNIX system for
5 | windows, you should follow the instructions for installing that toolchain in chapter 6.
6 |
7 | If you plan to execute commands in windows cmd, you will need to replace all '/'
8 | characters in directory paths with '\'
9 |
10 | Make sure to use .bat equivalents of scripts, as in the case of
11 | %CATALINA_HOME%/bin/startup.bat
12 |
13 | For many examples, especially chapter 12, you will need to use cygwin - the
14 | required utilities just dont exist on windows.
15 |
16 | Make sure to set the following system environment variables:
17 |
18 | JAVA_HOME
19 | ANT_HOME
20 | CATALINA_HOME
21 |
22 | Place the following directories into the system path variable:
23 |
24 | %JAVA_HOME%\bin
25 | %ANT_HOME%\bin
26 | %CATALINA_HOME%\bin
27 |
--------------------------------------------------------------------------------
/awsServiceContacts/.gitignore:
--------------------------------------------------------------------------------
1 | /.gradle
2 | /build
3 | /build.ant
4 | /bin
5 | /ivy
6 | .checkstyle
7 | .classpath
8 | .project
9 | .settings
--------------------------------------------------------------------------------
/awsServiceContacts/ivy-settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/log4j.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/main/java/com/enterpriseandroid/awsContacts/dao/ContactDao.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.awsContacts.dao;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import com.enterpriseandroid.awsContacts.dataModel.Contact;
7 |
8 | public interface ContactDao {
9 | Contact getContact(String userId, String id) throws IOException ;
10 | String storeOrUpdateContact(String userId, Contact contact) throws IOException ;
11 | List findContactFirstName(String userId, String firstName, int start, int numOfmatches);
12 | List findChanged(String userId, long timestamp, int start, int numOfmatches);
13 | void delete(String userId, String id) throws IOException ;
14 | List getAll(String userId, int start, int numOfmatches) throws IOException ;;
15 | }
16 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/main/java/com/enterpriseandroid/awsContacts/dao/VersionNotMatchException.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.awsContacts.dao;
2 |
3 | import java.io.IOException;
4 |
5 | public class VersionNotMatchException extends IOException {
6 |
7 | private static final long serialVersionUID = -2569918372089349114L;
8 |
9 | public VersionNotMatchException (String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | public VersionNotMatchException (String message) {
14 | super(message);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/main/java/com/enterpriseandroid/awsContacts/service/ContactService.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.awsContacts.service;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 |
7 | import com.enterpriseandroid.awsContacts.dataModel.Contact;
8 | import com.enterpriseandroid.awsContacts.dataModel.SyncRequest;
9 | import com.enterpriseandroid.awsContacts.dataModel.SyncResult;
10 |
11 |
12 | public interface ContactService {
13 | String storeOrUpdateContact(String userId, Contact c) throws IOException ;
14 | List findContactByFirestName(String userId, String firstName, int start, int numOfmatches) throws IOException;
15 | List getAll(String userId, int start, int numOfmatches) throws IOException;
16 | Contact getContact(String userId, String contactId) throws IOException ;
17 | void deleteContact(String userId, String contactId) throws IOException;
18 | List findChanged(String userId, long timestamp, int start, int numOfmatches);
19 | SyncResult sync(String userId, SyncRequest syncR) throws IOException;
20 | }
21 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/main/java/log4j.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/main/resources/com/enterpriseandroid/awsContacts/dao/impl/AwsCredentials.properties:
--------------------------------------------------------------------------------
1 | #Insert your AWS Credentials from http://aws.amazon.com/security-credentials
2 | #Wed May 23 16:39:57 EDT 2012
3 | secretKey=
4 | accessKey=
5 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | DispatcherServlet
6 | org.springframework.web.servlet.DispatcherServlet
7 |
8 | contextConfigLocation
9 |
10 | classpath:spring/applicationContext*.xml
11 |
12 |
13 |
14 |
15 | DispatcherServlet
16 | /
17 |
18 |
19 | index.html
20 | index.htm
21 | index.jsp
22 | default.html
23 | default.htm
24 | default.jsp
25 |
26 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/spring/applicationContext-storage.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/test/java/unit/test/dao/Dyanmodbv2DaoTest.java:
--------------------------------------------------------------------------------
1 | package unit.test.dao;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.Before;
6 | import org.junit.Test;
7 | import org.junit.runner.RunWith;
8 | import org.springframework.beans.factory.annotation.Autowired;
9 | import org.springframework.beans.factory.annotation.Qualifier;
10 | import org.springframework.test.context.ContextConfiguration;
11 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
12 |
13 |
14 |
15 | @RunWith(SpringJUnit4ClassRunner.class)
16 | @ContextConfiguration( { "/spring/applicationContext-*.xml" })
17 |
18 | public class Dyanmodbv2DaoTest {
19 | @Autowired
20 | @Qualifier(value = "dynamodbv2DaoTestClient")
21 | private DaoTestClient client;
22 |
23 |
24 | @Before
25 | public void setup() throws IOException {
26 | client.removeALl();
27 | }
28 |
29 | @Test
30 | public void testUpdate() throws IOException {
31 | client.testUpdate();
32 | }
33 |
34 | @Test
35 | public void testFind() throws IOException {
36 | client.testFind();
37 | }
38 |
39 | @Test
40 | public void testFindChanged() throws IOException {
41 | client.testFindChanged();
42 | }
43 |
44 | @Test
45 | public void testgetAll() throws IOException {
46 | client.testgetAll();
47 | }
48 |
49 | public void testFindChangedPaging() throws IOException {
50 | client.testFindChangedPaging();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/awsServiceContacts/src/test/java/unit/test/dao/Dynamodbv1DaoTest.java:
--------------------------------------------------------------------------------
1 | package unit.test.dao;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.Before;
6 | import org.junit.Test;
7 | import org.junit.runner.RunWith;
8 | import org.springframework.beans.factory.annotation.Autowired;
9 | import org.springframework.beans.factory.annotation.Qualifier;
10 | import org.springframework.test.context.ContextConfiguration;
11 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
12 |
13 | @RunWith(SpringJUnit4ClassRunner.class)
14 | @ContextConfiguration( { "/spring/applicationContext*.xml" })
15 |
16 | public class Dynamodbv1DaoTest {
17 |
18 | @Autowired
19 | @Qualifier(value = "dynamodbv1DaoTestClient")
20 | private DaoTestClient client;
21 |
22 |
23 | @Before
24 | public void setup() throws IOException {
25 | client.removeALl();
26 | }
27 |
28 | @Test
29 | public void testUpdate() throws IOException {
30 | client.testUpdate();
31 | }
32 |
33 | @Test
34 | public void testFind() throws IOException {
35 | client.testFind();
36 | }
37 |
38 | @Test
39 | public void testFindChanged() throws IOException {
40 | client.testFindChanged();
41 | }
42 |
43 | @Test
44 | public void testgetAll() throws IOException {
45 | client.testgetAll();
46 | }
47 |
48 | public void testFindChangedPaging() throws IOException {
49 | client.testFindChangedPaging();
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/awsServiceContacts/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/awsServiceContacts/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | awsServiceContacts
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.wst.jsdt.core.javascriptValidator
10 |
11 |
12 |
13 |
14 | org.eclipse.jdt.core.javabuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.common.project.facet.core.builder
20 |
21 |
22 |
23 |
24 | org.eclipse.wst.validation.validationbuilder
25 |
26 |
27 |
28 |
29 |
30 | org.eclipse.jem.workbench.JavaEMFNature
31 | org.eclipse.wst.common.modulecore.ModuleCoreNature
32 | org.eclipse.wst.common.project.facet.core.nature
33 | org.eclipse.jdt.core.javanature
34 | org.eclipse.wst.jsdt.core.jsNature
35 | org.apache.ivyde.eclipse.ivynature
36 |
37 |
38 |
--------------------------------------------------------------------------------
/awsServiceContacts/tools/ide/eclipse/settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/awsServiceContacts/tools/ide/eclipse/settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.compliance=1.6
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.6
8 |
--------------------------------------------------------------------------------
/awsServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/awsServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/awsServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/awsServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/googleAppEngineContacts/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin
7 | /gen
8 | /lib
9 | /dist
10 | lint.xml
11 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/build.properties:
--------------------------------------------------------------------------------
1 | # uncomment the following line, and make sure you set the sdk.dir to the App Engine SDK directory.
2 | #sdk.dir=c:\\appengine-java-sdk-1.8.1.1
3 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/ivy/ivy.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/googleAppEngineContacts/ivy/ivy.jar
--------------------------------------------------------------------------------
/googleAppEngineContacts/src/META-INF/persistence.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | org.datanucleus.api.jpa.PersistenceProviderImpl
8 |
9 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/src/com/enterpriseandroid/googleappengineContacts/contact/GoogleAppEngineContactsServlet.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.googleappengineContacts.contact;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.http.*;
5 |
6 | @SuppressWarnings("serial")
7 | public class GoogleAppEngineContactsServlet extends HttpServlet {
8 | public void doGet(HttpServletRequest req, HttpServletResponse resp)
9 | throws IOException {
10 | resp.setContentType("text/plain");
11 | resp.getWriter().println("**Hello, world!");
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/src/com/enterpriseandroid/googleappengineContacts/contact/util/EntityManagerFactoryHelper.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.googleappengineContacts.contact.util;
2 |
3 | import javax.persistence.EntityManagerFactory;
4 | import javax.persistence.Persistence;
5 |
6 | public class EntityManagerFactoryHelper {
7 | private static final EntityManagerFactory emfInstance = Persistence
8 | .createEntityManagerFactory("transactions-optional");
9 |
10 | private EntityManagerFactoryHelper() {
11 | }
12 |
13 | public static EntityManagerFactory get() {
14 | return emfInstance;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/src/com/enterpriseandroid/googleappengineContacts/dao/ContactDao.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.googleappengineContacts.dao;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import com.enterpriseandroid.googleappengineContacts.dataModel.Contact;
7 |
8 | public interface ContactDao {
9 | Contact getContact(String id) throws IOException ;
10 | Contact storeOrUpdateContact(Contact contact) throws IOException ;
11 | List findContactFirstName(String firstName, int start, int numOfmatches);
12 | List findChanged( long timestamp, int start, int numOfmatches);
13 | void delete( String id) throws IOException ;
14 | List getAll( int start, int numOfmatches) throws IOException ;
15 | }
16 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/src/com/enterpriseandroid/googleappengineContacts/dao/VersionNotMatchException.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.googleappengineContacts.dao;
2 |
3 | import java.io.IOException;
4 |
5 | public class VersionNotMatchException extends IOException {
6 |
7 | private static final long serialVersionUID = -2569918372089349114L;
8 |
9 | public VersionNotMatchException (String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | public VersionNotMatchException (String message) {
14 | super(message);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/src/com/enterpriseandroid/googleappengineContacts/service/ContactService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author Zane Pan
3 | */
4 | package com.enterpriseandroid.googleappengineContacts.service;
5 |
6 | import java.io.IOException;
7 | import java.util.List;
8 |
9 |
10 |
11 | import com.enterpriseandroid.googleappengineContacts.dataModel.Contact;
12 | import com.enterpriseandroid.googleappengineContacts.dataModel.SyncRequest;
13 | import com.enterpriseandroid.googleappengineContacts.dataModel.SyncResult;
14 |
15 | public interface ContactService {
16 |
17 | void storeOrUpdateContact( Contact c) throws IOException ;
18 |
19 | List findContactByFirstName(String firstName, int start, int numOfmatches) throws IOException;
20 | List getAll(int start, int numOfmatches) throws IOException;
21 | Contact getContact(String contactId) throws IOException ;
22 | void deleteContact( String contactId) throws IOException;
23 | List findChanged(long timestamp, int start, int numOfmatches);
24 |
25 | SyncResult sync(SyncRequest syncR) throws IOException;
26 | }
27 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/src/spring/applicationContext-storage.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/tools/ide/eclipse/settings/com.google.appengine.eclipse.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | filesCopiedToWebInfLib=appengine-api-labs.jar|appengine-endpoints.jar|appengine-jsr107cache-1.7.7.1.jar|jsr107cache-1.1.jar|appengine-api-1.0-sdk-1.7.7.1.jar|asm-4.0.jar|datanucleus-api-jdo-3.1.3.jar|datanucleus-api-jpa-3.1.3.jar|datanucleus-appengine-2.1.2.jar|datanucleus-core-3.1.3.jar|geronimo-jpa_2.0_spec-1.0.jar|jdo-api-3.0.1.jar|jta-1.1.jar
3 | gaeDatanucleusVersion=v2
4 | gaeDeployDialogSettings=
5 | gaeHrdEnabled=true
6 | gaeIsEclipseDefaultInstPath=false
7 | googleCloudSqlEnabled=false
8 | localDevMySqlEnabled=true
9 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/tools/ide/eclipse/settings/com.google.gdt.eclipse.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | jarsExcludedFromWebInfLib=
3 | warSrcDir=war
4 | warSrcDirIsOutput=true
5 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/tools/ide/eclipse/settings/org.apache.ivyde.eclipse.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.apache.ivyde.eclipse.standaloneretrieve=
3 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/tools/ide/eclipse/settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.compliance=1.6
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.6
8 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/tools/ide/eclipse/settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/war/WEB-INF/appengine-web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | your_app_id
4 | 1
5 |
6 |
9 | true
10 |
11 |
12 |
13 |
14 |
15 |
16 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/war/WEB-INF/logging.properties:
--------------------------------------------------------------------------------
1 | # A default java.util.logging configuration.
2 | # (All App Engine logging is through java.util.logging by default).
3 | #
4 | # To use this configuration, copy it into your application's WEB-INF
5 | # folder and add the following to your appengine-web.xml:
6 | #
7 | #
8 | #
9 | #
10 | #
11 |
12 | # Set the default logging level for all loggers to WARNING
13 | .level = WARNING
14 |
--------------------------------------------------------------------------------
/googleAppEngineContacts/war/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/googleAppEngineContacts/war/favicon.ico
--------------------------------------------------------------------------------
/googleAppEngineContacts/war/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Hello App Engine
13 |
14 |
15 |
16 | Hello App Engine!
17 |
18 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin/*
7 | /gen/*
8 | /build.xml
9 | /lint.xml
10 | /local.properties
11 | /project.properties
12 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/res/drawable/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/restfulCachingProviderContacts/res/drawable/ic_launcher.png
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/res/layout/activity_contacts.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
20 |
21 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/res/xml/pref_headers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/res/xml/prefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/src/com/enterpriseandroid/restfulcontacts/PrefsActivity.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.restfulcontacts;
2 |
3 | import java.util.List;
4 |
5 | import android.os.Build;
6 | import android.os.Bundle;
7 | import android.preference.PreferenceActivity;
8 | import android.preference.PreferenceFragment;
9 |
10 |
11 | public class PrefsActivity extends PreferenceActivity {
12 |
13 | public static class SyncPrefs extends PreferenceFragment {
14 | @Override
15 | public void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | addPreferencesFromResource(R.xml.prefs);
18 | }
19 | }
20 |
21 | @SuppressWarnings("deprecation")
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
26 | addPreferencesFromResource(R.xml.prefs);
27 | }
28 | }
29 |
30 | @Override
31 | public void onBuildHeaders(List target) {
32 | loadHeadersFromResource(R.xml.pref_headers, target);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/tools/eclipse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | restfulCachingProviderContacts
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/tools/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-15
15 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/tools/setup.bat:
--------------------------------------------------------------------------------
1 | REM
2 | REM Double click from Explorer
3 | REM ... or type "setup.bat" at the CMD prompt
4 |
5 | COPY project.properties ..
6 | COPY ..\tools\ide\eclipse\project ..\.project
7 | COPY ..\tools\ide\eclipse\classpath ..\.classpath
8 |
--------------------------------------------------------------------------------
/restfulCachingProviderContacts/tools/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # type: ". setup.sh" from the shell prompt
3 |
4 | cp project.properties ..
5 | cp ../tools/ide/eclipse/project ../.project
6 | cp ../tools/ide/eclipse/classpath ../.classpath
7 |
8 |
9 |
--------------------------------------------------------------------------------
/springServiceContacts/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin
7 | /build
8 | /dist
9 | /eclipse
10 | /ivy
11 | /build.ant
12 | contact.hb.sql
13 | springcontact.sql
14 | springContact.sql
15 | springServiceContacts.log
16 |
--------------------------------------------------------------------------------
/springServiceContacts/WebContent/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/springServiceContacts/build.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/springServiceContacts/contact.jdbc.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE contact
2 | (
3 | id int NOT NULL AUTO_INCREMENT,
4 | firstName varchar(255) NOT NULL,
5 | lastName varchar(255) NOT NULL,
6 | phone varchar(255),
7 | email varchar(255),
8 | deleted boolean,
9 | updateTime bigint(20) NOT NULL,
10 | version bigint(20) NOT NULL,
11 | PRIMARY KEY (id)
12 | );
13 |
14 | create index updateTimeIndex on contact (updateTime);
15 | create index firstNameIndex on contact (firstName);
16 |
--------------------------------------------------------------------------------
/springServiceContacts/ivy-settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/springServiceContacts/src/com/enterpriseandroid/springServiceContacts/dao/ContactDao.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.springServiceContacts.dao;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import com.enterpriseandroid.springServiceContacts.dataModel.Contact;
7 |
8 | public interface ContactDao {
9 | Contact getContact(Long id) throws IOException ;
10 | Long storeOrUpdateContact(Contact contact) throws IOException ;
11 | List findContactFirstName(String firstName, int start, int numOfmatches);
12 | List findChanged(long timestamp, int start, int numOfmatches);
13 | void delete(Long id) throws IOException ;
14 | List getAll(int start, int numOfmatches) throws IOException ;;
15 | }
16 |
--------------------------------------------------------------------------------
/springServiceContacts/src/com/enterpriseandroid/springServiceContacts/dao/VersionNotMatchException.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.springServiceContacts.dao;
2 |
3 | import java.io.IOException;
4 |
5 | public class VersionNotMatchException extends IOException {
6 |
7 | private static final long serialVersionUID = -2569918372089349114L;
8 |
9 | public VersionNotMatchException (String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | public VersionNotMatchException (String message) {
14 | super(message);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/springServiceContacts/src/com/enterpriseandroid/springServiceContacts/service/ContactService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author Zane Pan
3 | */
4 | package com.enterpriseandroid.springServiceContacts.service;
5 |
6 | import com.enterpriseandroid.springServiceContacts.dataModel.Contact;
7 |
8 | import java.io.IOException;
9 | import java.util.List;
10 |
11 | public interface ContactService {
12 | void storeOrUpdateContact(Contact c) throws IOException ;
13 | List findContactByFirstName(String firstName, int start, int numOfmatches) throws IOException;
14 | List getAll( int start, int numOfmatches) throws IOException;
15 | Contact getContact(Long id) throws IOException ;
16 | void deleteContact(Long id) throws IOException;
17 | List findChanged(long timestamp, int start, int numOfmatches);
18 | }
19 |
--------------------------------------------------------------------------------
/springServiceContacts/src/hibernateAnnotation.cfg.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | false
7 | org.hibernate.dialect.MySQLDialect
8 |
11 | com.mysql.jdbc.Driver
12 | jdbc:mysql://localhost:3306/springContact?characterEncoding=UTF-8
13 | root
14 | mysql
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/springServiceContacts/src/jdbc.properties:
--------------------------------------------------------------------------------
1 | # Properties file with JDBC-related settings.
2 |
3 | jdbc.driverClassName=com.mysql.jdbc.Driver
4 | db.name=springContact
5 | jdbc.url=jdbc:mysql://localhost:3306/
6 |
7 | jdbc.username=root
8 | jdbc.password=mysql
9 |
10 | # Property that determines the Hibernate dialect
11 | # (only applied with "applicationContext-hibernate.xml")
12 | hibernate.dialect=org.hibernate.dialect.MySQLDialect
13 |
--------------------------------------------------------------------------------
/springServiceContacts/src/log4j.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/springServiceContacts/src/unit/test/dao/DaoHibernateTest.java:
--------------------------------------------------------------------------------
1 | package unit.test.dao;
2 |
3 | import java.io.IOException;
4 | import org.junit.Before;
5 | import org.junit.Test;
6 | import org.junit.runner.RunWith;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.beans.factory.annotation.Qualifier;
9 | import org.springframework.test.context.ContextConfiguration;
10 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
11 |
12 | @RunWith(SpringJUnit4ClassRunner.class)
13 | @ContextConfiguration( { "/spring/applicationContext-*.xml" })
14 |
15 | public class DaoHibernateTest {
16 | @Autowired
17 | @Qualifier(value = "hibernateDaoTestClient")
18 | private DaoTestClient client;
19 |
20 |
21 | @Before
22 | public void setup() throws IOException {
23 | client.removeALl();
24 | }
25 |
26 | @Test
27 | public void testUpdate() throws IOException {
28 | client.testUpdate();
29 | }
30 |
31 | @Test
32 | public void testFind() throws IOException {
33 | client.testFind();
34 | }
35 |
36 | @Test
37 | public void testFindChanged() throws IOException {
38 | client.testFindChanged();
39 | }
40 |
41 | @Test
42 | public void testgetAll() throws IOException {
43 | client.testgetAll();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/springServiceContacts/src/unit/test/dao/DaoJdbcTest.java:
--------------------------------------------------------------------------------
1 | package unit.test.dao;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.Before;
6 | import org.junit.Test;
7 | import org.junit.runner.RunWith;
8 | import org.springframework.beans.factory.annotation.Autowired;
9 | import org.springframework.beans.factory.annotation.Qualifier;
10 | import org.springframework.test.context.ContextConfiguration;
11 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
12 |
13 |
14 |
15 | @RunWith(SpringJUnit4ClassRunner.class)
16 | @ContextConfiguration( { "/spring/applicationContext-*.xml" })
17 |
18 | public class DaoJdbcTest {
19 | @Autowired
20 | @Qualifier(value = "jdbcDaoTestClient")
21 | private DaoTestClient client;
22 |
23 |
24 | @Before
25 | public void setup() throws IOException {
26 | client.removeALl();
27 | }
28 |
29 | @Test
30 | public void testUpdate() throws IOException {
31 | client.testUpdate();
32 | }
33 |
34 | @Test
35 | public void testFind() throws IOException {
36 | client.testFind();
37 | }
38 |
39 | @Test
40 | public void testFindChanged() throws IOException {
41 | client.testFindChanged();
42 | }
43 |
44 | @Test
45 | public void testgetAll() throws IOException {
46 | client.testgetAll();
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/springServiceContacts/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/springServiceContacts/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | springServiceContacts
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.wst.jsdt.core.javascriptValidator
10 |
11 |
12 |
13 |
14 | org.eclipse.jdt.core.javabuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.common.project.facet.core.builder
20 |
21 |
22 |
23 |
24 | org.eclipse.wst.validation.validationbuilder
25 |
26 |
27 |
28 |
29 |
30 | org.eclipse.jem.workbench.JavaEMFNature
31 | org.eclipse.wst.common.modulecore.ModuleCoreNature
32 | org.eclipse.wst.common.project.facet.core.nature
33 | org.eclipse.jdt.core.javanature
34 | org.eclipse.wst.jsdt.core.jsNature
35 | org.apache.ivyde.eclipse.ivynature
36 |
37 |
38 |
--------------------------------------------------------------------------------
/springServiceContacts/tools/ide/eclipse/settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/springServiceContacts/tools/ide/eclipse/settings/org.apache.ivyde.eclipse.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.apache.ivyde.eclipse.standaloneretrieve=
3 |
--------------------------------------------------------------------------------
/springServiceContacts/tools/ide/eclipse/settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.compliance=1.6
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.6
8 |
--------------------------------------------------------------------------------
/springServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/springServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/springServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/springServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/springSyncServiceContacts/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin
7 | /build
8 | /dist
9 | /eclipse
10 | /ivy
11 | /build.ant
12 | contact.hb.sql
13 | contact_sync.hb.sql
14 | springcontact.sql
15 | springsynccontact.sql
16 | springServiceContacts.log
17 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/WebContent/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/build.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/contact.jdbc.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE contact_sync
2 | (
3 | id varchar(50) NOT NULL,
4 | firstName varchar(255) NOT NULL,
5 | lastName varchar(255) NOT NULL,
6 | phone varchar(255),
7 | email varchar(255),
8 | deleted boolean,
9 | updateTime bigint(20) NOT NULL,
10 | version bigint(20) NOT NULL,
11 | PRIMARY KEY (id)
12 | );
13 |
14 | create index updateTimeIndex on contact (updateTime);
15 | create index firstNameIndex on contact (firstName);
16 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/src/com/enterpriseandroid/springServiceContacts/dao/ContactDao.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.springServiceContacts.dao;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import com.enterpriseandroid.springServiceContacts.dataModel.Contact;
7 |
8 | public interface ContactDao {
9 | Contact getContact(String id) throws IOException ;
10 | Contact storeOrUpdateContact(Contact contact) throws IOException ;
11 | List findContactFirstName(String firstName, int start, int numOfmatches);
12 | List findChanged(long timestamp, int start, int numOfmatches);
13 | void delete(String id) throws IOException ;
14 | List getAll(int start, int numOfmatches) throws IOException ;
15 | }
16 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/src/com/enterpriseandroid/springServiceContacts/dao/VersionNotMatchException.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.springServiceContacts.dao;
2 |
3 | import java.io.IOException;
4 |
5 | public class VersionNotMatchException extends IOException {
6 |
7 | private static final long serialVersionUID = -2569918372089349114L;
8 |
9 | public VersionNotMatchException (String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | public VersionNotMatchException (String message) {
14 | super(message);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/src/com/enterpriseandroid/springServiceContacts/service/ContactService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author Zane Pan
3 | */
4 | package com.enterpriseandroid.springServiceContacts.service;
5 |
6 | import java.io.IOException;
7 | import java.util.List;
8 |
9 |
10 | import com.enterpriseandroid.springServiceContacts.dataModel.Contact;
11 | import com.enterpriseandroid.springServiceContacts.dataModel.SyncRequest;
12 | import com.enterpriseandroid.springServiceContacts.dataModel.SyncResult;
13 |
14 | public interface ContactService {
15 | Contact storeOrUpdateContact(Contact c) throws IOException ;
16 | List findContactByFirstName(String firstName, int start, int numOfmatches) throws IOException;
17 | List getAll( int start, int numOfmatches) throws IOException;
18 | Contact getContact(String id) throws IOException ;
19 | void deleteContact(String id) throws IOException;
20 | List findChanged(long timestamp, int start, int numOfmatches);
21 | SyncResult sync(SyncRequest syncR) throws IOException;
22 | }
23 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/src/hibernateAnnotation.cfg.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | false
7 | org.hibernate.dialect.MySQLDialect
8 |
11 | com.mysql.jdbc.Driver
12 | jdbc:mysql://localhost:3306/springSyncContact?characterEncoding=UTF-8
13 | root
14 | mysql
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/src/jdbc.properties:
--------------------------------------------------------------------------------
1 | # Properties file with JDBC-related settings.
2 |
3 | jdbc.driverClassName=com.mysql.jdbc.Driver
4 | db.name=springSyncContact
5 | jdbc.url=jdbc:mysql://localhost:3306/
6 |
7 | jdbc.username=root
8 | jdbc.password=mysql
9 |
10 | # Property that determines the Hibernate dialect
11 | # (only applied with "applicationContext-hibernate.xml")
12 | hibernate.dialect=org.hibernate.dialect.MySQLDialect
13 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/src/log4j.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/src/unit/test/dao/DaoHibernateTest.java:
--------------------------------------------------------------------------------
1 | package unit.test.dao;
2 |
3 | import java.io.IOException;
4 | import org.junit.Before;
5 | import org.junit.Test;
6 | import org.junit.runner.RunWith;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.beans.factory.annotation.Qualifier;
9 | import org.springframework.test.context.ContextConfiguration;
10 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
11 |
12 |
13 |
14 | @RunWith(SpringJUnit4ClassRunner.class)
15 | @ContextConfiguration( { "/spring/applicationContext-*.xml" })
16 |
17 | public class DaoHibernateTest {
18 | @Autowired
19 | @Qualifier(value = "hibernateDaoTestClient")
20 | private DaoTestClient client;
21 |
22 |
23 | @Before
24 | public void setup() throws IOException {
25 | client.removeALl();
26 | }
27 |
28 | @Test
29 | public void testUpdate() throws IOException {
30 | client.testUpdate();
31 | }
32 |
33 | @Test
34 | public void testFind() throws IOException {
35 | client.testFind();
36 | }
37 |
38 | @Test
39 | public void testFindChanged() throws IOException {
40 | client.testFindChanged();
41 | }
42 |
43 | @Test
44 | public void testgetAll() throws IOException {
45 | client.testgetAll();
46 | }
47 |
48 | public void testFindChangedPaging() throws IOException {
49 | client.testFindChangedPaging();
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/src/unit/test/dao/DaoJdbcTest.java:
--------------------------------------------------------------------------------
1 | package unit.test.dao;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.Before;
6 | import org.junit.Test;
7 | import org.junit.runner.RunWith;
8 | import org.springframework.beans.factory.annotation.Autowired;
9 | import org.springframework.beans.factory.annotation.Qualifier;
10 | import org.springframework.test.context.ContextConfiguration;
11 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
12 |
13 |
14 |
15 | @RunWith(SpringJUnit4ClassRunner.class)
16 | @ContextConfiguration( { "/spring/applicationContext-*.xml" })
17 |
18 | public class DaoJdbcTest {
19 | @Autowired
20 | @Qualifier(value = "jdbcDaoTestClient")
21 | private DaoTestClient client;
22 |
23 |
24 | @Before
25 | public void setup() throws IOException {
26 | client.removeALl();
27 | }
28 |
29 | @Test
30 | public void testUpdate() throws IOException {
31 | client.testUpdate();
32 | }
33 |
34 | @Test
35 | public void testFind() throws IOException {
36 | client.testFind();
37 | }
38 |
39 | @Test
40 | public void testFindChanged() throws IOException {
41 | client.testFindChanged();
42 | }
43 |
44 | @Test
45 | public void testgetAll() throws IOException {
46 | client.testgetAll();
47 | }
48 |
49 | public void testFindChangedPaging() throws IOException {
50 | client.testFindChangedPaging();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | springSyncServiceContacts
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.wst.jsdt.core.javascriptValidator
10 |
11 |
12 |
13 |
14 | org.eclipse.jdt.core.javabuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.common.project.facet.core.builder
20 |
21 |
22 |
23 |
24 | org.eclipse.wst.validation.validationbuilder
25 |
26 |
27 |
28 |
29 |
30 | org.eclipse.jem.workbench.JavaEMFNature
31 | org.eclipse.wst.common.modulecore.ModuleCoreNature
32 | org.eclipse.wst.common.project.facet.core.nature
33 | org.eclipse.jdt.core.javanature
34 | org.eclipse.wst.jsdt.core.jsNature
35 | org.apache.ivyde.eclipse.ivynature
36 |
37 |
38 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/tools/ide/eclipse/settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/tools/ide/eclipse/settings/org.apache.ivyde.eclipse.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.apache.ivyde.eclipse.standaloneretrieve=
3 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/tools/ide/eclipse/settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.compliance=1.6
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.6
8 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/springSyncServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/springSyncServiceContacts/tools/ide/eclipse/settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/syncAdapterContacts/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_*
2 | .checkstyle
3 | .classpath
4 | .project
5 | .settings
6 | /bin/*
7 | /gen/*
8 | /build.xml
9 | /lint.xml
10 | /local.properties
11 | /project.properties
12 |
--------------------------------------------------------------------------------
/syncAdapterContacts/AccountMgr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/syncAdapterContacts/AccountMgr.png
--------------------------------------------------------------------------------
/syncAdapterContacts/libs/gson-2.2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/syncAdapterContacts/libs/gson-2.2.1.jar
--------------------------------------------------------------------------------
/syncAdapterContacts/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/syncAdapterContacts/res/drawable/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/syncAdapterContacts/res/drawable/ic_launcher.png
--------------------------------------------------------------------------------
/syncAdapterContacts/res/drawable/ic_menu_account.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/syncAdapterContacts/res/drawable/ic_menu_account.png
--------------------------------------------------------------------------------
/syncAdapterContacts/res/drawable/ic_menu_sync1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/syncAdapterContacts/res/drawable/ic_menu_sync1.png
--------------------------------------------------------------------------------
/syncAdapterContacts/res/drawable/ic_menu_sync2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wileyenterpriseandroid/Examples/4880341cc298abfdf84e728785c2f64c293c3875/syncAdapterContacts/res/drawable/ic_menu_sync2.png
--------------------------------------------------------------------------------
/syncAdapterContacts/res/layout/activity_contacts.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
20 |
21 |
--------------------------------------------------------------------------------
/syncAdapterContacts/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/syncAdapterContacts/res/xml/account.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/syncAdapterContacts/res/xml/account_prefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
11 |
14 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/syncAdapterContacts/res/xml/pref_headers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/syncAdapterContacts/res/xml/prefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/syncAdapterContacts/res/xml/sync.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/syncAdapterContacts/src/com/enterpriseandroid/syncadaptercontacts/PrefsActivity.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.syncadaptercontacts;
2 |
3 | import java.util.List;
4 |
5 | import android.os.Build;
6 | import android.os.Bundle;
7 | import android.preference.PreferenceActivity;
8 | import android.preference.PreferenceFragment;
9 |
10 |
11 | public class PrefsActivity extends PreferenceActivity {
12 |
13 | public static class SyncPrefs extends PreferenceFragment {
14 | @Override
15 | public void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | addPreferencesFromResource(R.xml.prefs);
18 | }
19 | }
20 |
21 | @SuppressWarnings("deprecation")
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
26 | addPreferencesFromResource(R.xml.prefs);
27 | }
28 | }
29 |
30 | @Override
31 | public void onBuildHeaders(List target) {
32 | loadHeadersFromResource(R.xml.pref_headers, target);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/syncAdapterContacts/src/com/enterpriseandroid/syncadaptercontacts/sync/AccountService.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.syncadaptercontacts.sync;
2 |
3 | import android.app.Service;
4 | import android.content.Intent;
5 | import android.os.IBinder;
6 | import android.util.Log;
7 |
8 | import com.enterpriseandroid.syncadaptercontacts.BuildConfig;
9 |
10 |
11 | public class AccountService extends Service {
12 | private static final String TAG = "AUTH_SVC";
13 |
14 |
15 | private volatile AccountMgr mgr;
16 |
17 | @Override
18 | public void onCreate() {
19 | super.onCreate();
20 | mgr = new AccountMgr(getApplicationContext());
21 | if (BuildConfig.DEBUG) { Log.d(TAG, "created"); }
22 | }
23 |
24 | @Override
25 | public IBinder onBind(Intent intent) {
26 | if (BuildConfig.DEBUG) { Log.d(TAG, "bound"); }
27 | return mgr.getIBinder();
28 | }
29 |
30 | // Ooo, eee, ooo ah, ah
31 | // ting, tang, walla walla, bing bang
32 | @Override
33 | public void onDestroy() {
34 | mgr = null;
35 | if (BuildConfig.DEBUG) { Log.d(TAG, "destroyed"); }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/syncAdapterContacts/src/com/enterpriseandroid/syncadaptercontacts/sync/SyncService.java:
--------------------------------------------------------------------------------
1 | package com.enterpriseandroid.syncadaptercontacts.sync;
2 |
3 | import android.app.Service;
4 | import android.content.Intent;
5 | import android.os.IBinder;
6 | import android.util.Log;
7 |
8 | import com.enterpriseandroid.syncadaptercontacts.BuildConfig;
9 | import com.enterpriseandroid.syncadaptercontacts.ContactsApplication;
10 |
11 | public class SyncService extends Service {
12 | private static final String TAG = "SYNC_SVC";
13 |
14 |
15 | private volatile SyncAdapter synchronizer;
16 |
17 | @Override
18 | public void onCreate() {
19 | super.onCreate();
20 | synchronizer = new SyncAdapter((ContactsApplication) getApplication(), true);
21 | if (BuildConfig.DEBUG) { Log.d(TAG, "created"); }
22 | }
23 |
24 | @Override
25 | public IBinder onBind(Intent intent) {
26 | if (BuildConfig.DEBUG) { Log.d(TAG, "sync bound"); }
27 | return synchronizer.getSyncAdapterBinder();
28 | }
29 |
30 | // Ooo, eee, ooo ah, ah
31 | // ting, tang, walla walla, bing bang
32 | @Override
33 | public void onDestroy() {
34 | synchronizer = null;
35 | if (BuildConfig.DEBUG) { Log.d(TAG, "destroyed"); }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/syncAdapterContacts/tools/eclipse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/syncAdapterContacts/tools/ide/eclipse/classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/syncAdapterContacts/tools/ide/eclipse/project:
--------------------------------------------------------------------------------
1 |
2 |
3 | syncAdapterContacts
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/syncAdapterContacts/tools/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-17
15 |
--------------------------------------------------------------------------------
/syncAdapterContacts/tools/setup.bat:
--------------------------------------------------------------------------------
1 | REM
2 | REM Double click from Explorer
3 | REM ... or type "setup.bat" at the CMD prompt
4 |
5 | COPY project.properties ..
6 | COPY ..\tools\ide\eclipse\project ..\.project
7 | COPY ..\tools\ide\eclipse\classpath ..\.classpath
8 |
--------------------------------------------------------------------------------
/syncAdapterContacts/tools/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # type: ". setup.sh" from the shell prompt
3 |
4 | cp project.properties ..
5 | cp ../tools/ide/eclipse/project ../.project
6 | cp ../tools/ide/eclipse/classpath ../.classpath
7 |
8 |
9 |
--------------------------------------------------------------------------------