Android – Use AccountManager with ASP.NET Identity

User or account management is a must-have feature in business applications. For examples, one device should be used by many employees and the employees have different roles in the project. The apps must be able to authenticate user, authorize them and let them access the resources corresponding to their roles. We can manage all these things in app databases within our own tables or we can use AccountManager providing access to a centralized registry of the user’s online accounts. With AccountManager, the user enters credentials (username and password) once per account, granting applications access to online resources with “one-click” approval. In this blog post, I would like to make a small demo how we can integrate ASP.NET Identity service for authenticating user with AccountManager. I’ll only focus on addAccount part, the other functions will be discussed in other posts if necessary.

Continue reading Android – Use AccountManager with ASP.NET Identity

Android – How to consume an Azure Mobile Services?

Publishing core data through web service is always a work-intensive progress because we have to build up a web server, define service interface, make data access layer and implement user management. It has never been easy and always requires advanced knowledge. The resources of developers have to be distributed not only for client but also for server. Therefore the cost gets more. Moreover because of strong growth in market of smartphone and table running on different operating systems, the developers are put into a challenge to make a universal web service which can be easily consumed in all platforms. In my previous posts, such as How to call ASP.Net Web API service from Android? or Android – Media player and ASP.NET Web Api, we are able to build up a universal REST web service which can be consumed in all platforms supporting HTTP protocols.

Continue reading Android – How to consume an Azure Mobile Services?

Android – Introduction to AndroidAnnotations, Maven in Intellij IDEA

I think, as developers, all of us want to write less code but still keep the code structure clean and clear as possible. When I develop app in Android, I always miss MVVM (WPF in Visual Studio) where I can bind control to event easily. Android makes me ‘bored’ when I have to look up each control with findViewById() and then initialize them so that I can use them later. Even though that the problem with findViewById() can be solved with Roboguice, but I still have to write the code for registering event such as click, long click,… It’s really boring and I want to have less code for that task. I need something ‘clean and clear’. Therefore in this post, I would like to introduce AndroidAnnotations, a framework for helping us keeping our code thin and healthy.

Continue reading Android – Introduction to AndroidAnnotations, Maven in Intellij IDEA