Skip to main content

Posts

Showing posts from 2016

Get ready for the Android Nougat and update your application

Multi-window   A new manifest attribute called  android:resizableActivity  is available for apps targeting N and beyond. If this attribute is set to true, your  activity can be launched in split-screen modes  on phones and tablets.  You can also specify your activity's minimum allowable dimensions, preventing users from making the activity window smaller than that size. Implementation: < activity android :name= “ActivityName”   android :configChanges= " orientation|screenSize| keyboard|keyboardHidden| screenLayout| smallestScreenSize" android :resizeableActivity= " true”> </activity> Direct reply notifications:  With Android Nougat, you can reply to your notifications directly from their spot in the tray. You won't have to open the app or install anything extra, either. Once the folks who built your app support the feature, it will just work. Don't worry though. When you need to see more or do more than just s...

Retrofit in Android

Type-safe HTTP client for Android and Java by Square, Inc. Retrofit is a REST Client for Android and Java by Square . This library is easy learn and has more features. This is beginner friendly compared to other Networking libraries. You can GET,POST,PUT,DELETE  ..etc using this library. You can also use picasso for image loading. 3 classes In Retrofit,we need to create 3 classes. POJO (Plain Old Java Object) or Model Class :– The json retrieved from the server is added to this class. Interface :- Now we need to create an interface for managing url calls like GET,POST..etc.This is the service class. RestAdapter Class :- This is RestClient Class. Gson is used in default for the retrofit.You can use setup your own converter Adding Retrofit Library to Project Gradle    : compile 'com.squareup.retrofit2:retrofit:2.0.2'      MAVEN <dependency> <groupId>com.squareup.retrofit2</groupId> ...