Posts

Showing posts from November, 2015

Sign-on by using Google OAuth2

Image
Sign-on by using Google OAuth2 Popular OAuth2 services are available in mobile applications. such as; Login the mobile applications by using Facebook, Google, Twitter etc accounts. In this post, I am gonna explain how to Login a mobile application by using Gmail/Google+ credentials. Step 1: First, we should get the SHA1 fingerprint id from our Android Studio. So, Open the terminal in Mac or Linux (In Windows, open your DOS or command prompt) then follow those below steps in a sequential order. cd ~/.android then  keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android . . Certificate fingerprints: MD5:  B3:13:5C:40:63:7B:54:2C:95:57:24:1B:A2:CC:D7:C8 SHA1: 2C:32:8D:E3:B2:B1:33:D3:25:C2:35:F6:96:71:2C:48:98:39:98:2B SHA256: 9D:00:90:01:31:F9:77:8C:00:F1:3C:74:C6:1B:72:0F:3A:B3:93:6A:6E:F1:F3:0E:64:0F:A5:01:76:F0:63:70 Signature algorithm name: SHA256withRSA Ver...

Using AdMob feature in android applications

Using AdMob feature in android applications Hope, All of you heard about AdMob. It's an advertisement based Google product, used to earn money by displaying ads in android applications. What is AdMob? answer How does AdMob work? answer I hope, you got the basic understanding about AdMob, Now I am going explain how we can integrate this feature into a mobile app. Before starting this implementation, we should get to know about the type of Ads which we can display. Banner Ads: Basically it is used to show an ad in a small portion of the application while we are using other UIs like activity/Fragment, also it won't interrupt a user's flow because it is always displayed the bottom of a particular app screen. Interstitial Ads: Basically it's used to display ads on the whole screen of the application for a certain time period with a close button. The particular app developer should decide when it should be displayed while users accessing the application. Nat...

Creating JSON REFS service by using Spring MVC

Image
Creating JSON REFS service by using Spring MVC In this post, I am going to explain how to create a JSON Webservice by using Spring MVC. 1. Eclipse/ Spring Tool Suite 2. Apache Tomcat 8 You have to create a maven project in Eclipse and define artifact id and group id. Then, add all the dependencies in pom.xml, Here you can see the mandatory dependencies has to be included.  I have been used jackson-core and jackson-databind dependencies. (It's available inside Maven artifact) Then you have to add annotation-driven and component-scan in web.xml Then you can define a method inside the controller class. Here @ResponseBody is used to generate the JSON response in the browser. The below method is responsible for creating a JSON web service. Then Run your application in a web server (Tomcat) or Hit the below URL in the browser. http://localhost:<port>/carservice /carservice - It should be matched with controller method. @...

Programmatically turn ON/OFF NFC in Android

 Programmatically t urn ON/OFF NFC in Android I hope most of you know about NFC (Near Field Communication). It's an innovative version of RFID to read and write a small chunk of information by using the electromagnetic field. More information:  http://developer.android.com/guide/topics/connectivity/nfc/index.html In this post, I am going to explain how to turn ON/OFF NFC by using the android APIs. Google has some restrictions on Nfc power on/off for developers. Obviously, we know it is a user feature to turn on/off by android system setting menu. Follow the below steps: The device should be a rooted device or system application acceptable device. The developer needs to be accessed to handle power ON/OFF API by Java reflection. The application should have NFC permission as well as writing secure setting permission. We need to specify all below permissions in AndroidManifest.xml < uses-permission android :name= "android.permission.NFC" />...