Skip to content

valtech/valtech-contactsync-android

Repository files navigation

Valtech Contact Sync Android

Circle CI

This android app syncs contact details for Valtech employees to your phone. It is connected to Valtech's identity provider (Valtech IDP), https://id.valtech.com/.

This app also serves to demonstrate how easy it is to integrate with Valtech IDP and its OAuth 2 interface. It also serves as a public, free and open source (MIT) example of how to write a Contact Provider for Android.

How to use

Follow these simple steps to setup sync:

  1. Download and install the app from Google Play.
  2. Open Android Settings -> Accounts.
  3. Click Add account and choose Valtech.
  4. Sign in to IDP using your email and password.
  5. Done! Contacts for your Valtech country will now be synced to your phone on a daily basis.

If you like to sync contacts from more countries than your own country, follow these steps:

  1. Go to Android Settings -> Accounts -> Valtech.
  2. Touch Countries to sync.
  3. Select which countries to sync contacts from (your own country will be preselected).

If you unselect a previously selected country, contacts synced from that country will be removed. If you uninstall the app all contacts synced will be removed.

You can revoke access for the app at any time at https://id.valtech.com/.

Local development

  1. Download the Android SDK.
  2. Install IntelliJ IDEA.
  3. Create the file <repo-root>/local.properties with the contents sdk.dir=/path/to/android/sdk.
  4. Import the project in IntelliJ.
  5. Open IntelliJ.
  6. Import project.
  7. Select the valtech-contactsync-android folder.
  8. Import project from external Model: Gradle.
  9. Select "User gradle default wrapper (recommended)".
  10. Finish.
  11. Add the Android SDK.
  12. File -> Project structure -> SDKs.
  13. Click +, choose Android SDK.
  14. Select path to the Android SDK.
  15. Click OK.
  16. Go to Project in Project Structure.
  17. Choose Android as the Project SDK.
  18. Do cp idp.xml.template app/src/main/res/values/idp.xml and fill in the client secret.

Release

Automatically using CircleCI

  1. Update versionCode and versionName in app/build.gradle.
  2. Push to develop and merge to master.
  3. Go to https://circleci.com/gh/valtech/valtech-contactsync-android/tree/master.
  4. Click your build, Build artifacts and download the app-release.apk.
  5. Upload app-release.apk to Google Play Developer Console.

Manually

  1. Get the key for signing the APK from IT (initially created using keytool -genkey -v -keystore valtech.keystore -alias valtech -keyalg RSA -keysize 2048 -validity 10000).
  2. Put the valtech.keystore at repository root.
  3. Make sure you have the correct IDP credentials in app/src/main/res/values/idp.xml.
  4. Update versionCode and versionName in app/build.gradle.
  5. Run SIGNING_KEY=<putpassphrasehere> ./gradlew assembleRelease (add a space before SIGNING_KEY as that will hide the command from history if you have $HISTCONTROL set).
  6. Upload app/build/outputs/apk/app-release.apk to Google Play Developer Console.

Credits

This project is heavily inspired by jimlar/valtechdroid.

Releases

No releases published

Packages

No packages published