Android’s Runtime Permission

Android is being keep developed but the latest update to Android M is totally different since there is some major change that would change everything like new Runtime Permission. Surprisingly it is not much talked about in Android Developer community even though it is extremely important and may cause some big trouble in the near future.

Android’s permission system is one of the greatest security concern from the start since those consents are requested at introduce time. Once introduced, the application will have the capacity to get to all of things allowed with no client’s affirmation what precisely application does with the consent.

In Android 6.0 Marshmallow, application will not be granted any permission at installation time. Instead, application has to ask user for a permission one-by-one at runtime.

Please note that permission request dialog not launch automatically. Developer has to call for it manually. In the case that developer try to call some function that requires a permission which user has not granted yet, the function will suddenly throw an Exception which will lead to the application crashing.

Besides, user is also able to revoke the granted permission anytime through phone’s Settings application.

Android's Runtime Permission

Continue Reading


Inbox Style Notification Like Whatsapp

In this post we will discuss about Inbox style notification like Whatsapp, Gmail and other chat applications are having.

Android notification will be displayed in Notification area and to see the details regarding the notification, the user can expand it in by open the Notification drawer.

Note : Inbox style notification is not available on platforms prior to Android 4.1.

Continue Reading


Part of TextView clickable

Today we will discuss about how can we set click listener for some part of your TextView.

As you all know we can set click listener on textview like we use to set in other controls(Button, ImageView etc).

But what if i want listener for some text only. For example “This is demo android program”, now i want click listener just for “android” word. Yes this is possible with using ClickableSpan.
Continue Reading


YouTube Integration with Android Studio

In todays world we are seeing lot of applications having video streaming or demo videos which will give instruction about how your application works. Storing video inside your project will increase apk size, instead of that we can store video on Youtube and stream it. Make a video with this editing software at makewebvideo.com/en/make/3d-text-intro-video, and then link your video, which’ll lead the user to Youtube.

Today we will learn how to stream youtube video in your android app.

first step we need to do is obtaining Google API Key, follow this steps to obtain Google API Key.

  1. Get SHA-1 fingerprint from your machine using java Keytool. Execute following command in your cmd/terminal.

On Windows

On Linux/MAC

Continue Reading


Floting Labels : Text Input Layout

We have already covered FloatingActionButton and SnackBar from Material Design. Today we will discuss about TextInputLayout.

There is a nice and interesting approach to customize edittext in Material Design. They didn’t touch EditText directly, instead TextInputLayout will be used to enhance its functionality.

We have seen lot of libraries for floating labels but in Material Design we can directly use it with the help of TextInputLayout.

Add design support library in gradle file.

Add TextInputLayout in your xml :
Continue Reading