Today, we present to you Mobile Services 2.0.2-Beta Android SDK. With this release, we introduce two new Offline features: Incremental Sync and Soft Delete. In addition, we’ve updated our SDK to support Gradle.build and Android Studio.
If you have been following our Android SDK, we announced future support and Offline with our 2.0-Beta release back in August followed by Carlos’ posts, Futures support and breaking changes in the Mobile Services Android SDK and Offline support in the Azure Mobile Services Android SDK. Since then, we have been working in collaboration with MS Open Tech towards a better Offline experience for our Android users, and here are our updates.
New Features and Bug Fixes in 2.0.2-Beta
For a more detailed breakdown, head over to our GitHub repo.
General:
- (improvement) Indicate Mobile Services SDK version with user-agent
- (improvement) Introduce conflict exception to facilitate handling of 409 conflict
- (bug) Facebook auth cropped UI issue fixed
- (bug) SQL ordering issue fixed
Offline:
- (new) Incremental Sync to pull data with flexibility (more on the feature here)
- (new) Soft Delete (more on the feature and its usage here)
- (improvement) Improve SQLite insert performance on pull
- (improvement) Purge no longer pushes, instead it throws an exception as user expects
- (bug) Local item deletion exception is handled properly according to server state
- (bug) Add support for continuation tokens in queries for paging
- (bug) InsertAsync throws expected exception on duplicate insert
- (bug) Local store & SQLite missing/mismatch table columns (i.e. “_deleted”) fixed
Support for Gradle.build and migration to Android Studio
Android Studio 1.0 was officially released on 12/08/2014, and Android recommends a migration to receive the latest IDE updates. We have renewed our portal, quickstarts, and tutorials to work with Android Studio.
For existing Eclipse users, you can follow this simple 4-step instruction to migrate your project from Eclipse to Android Studio.
For those who prefer Eclipse, our latest SDK along with its .jar artifacts can be downloaded at aka.ms/iajk6q.
Our Android SDK is now also available through jCenter – the new default repository Android Studio comes with. Instead of downloading our SDK, Android Studio will do this for you with some small changes to your project:
1. In the project’s build.gradle, make sure jCenter repository is included in build.
buildscript { repositories { jcenter() } }
2. Then, in the dependencies section of the app’s build.gradle, add the following.
compile 'com.microsoft.azure:azure-mobile-services-android-sdk:2.0.2-beta'
3. When you sync the project with these gradle changes, Mobile Services Android SDK will automatically get pulled into your project.
Note: If you only see your gradle files when you Open an existing Android Studio project, it is most likely your “path to Gradle project” at the Import Project from Gradle window is set to the project’s gradle folder as a default.
You can instead Import project (Eclipse ADT, Gradle, etc.) to fix this problem.
A huge THANK YOU to Mariano Sanchez, Leo Tilli, Marcos Torres, Beatrice Oltean, and the MS Open Tech team for working with us closely on the Mobile Services Android SDK.
We are so excited to get ready for GA in the upcoming weeks! Meanwhile, we would love for you to try it out and direct any feedback to @AzureMobile or discussions below.
Update 05/05/2015: Mobile Services 2.0.2 Android SDK with GA of Offline feature is now available. You can view the changes and improvements we introduced on our Github.
See you soon,
Mimi Xu | Program Manager | Azure Mobile Services