Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Save image taken from device memory to a specific folder in Android

Step1: Permssion needed to save image. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> Step2: Saving image to the particular directory with new name as given by the user. This will make a seperate direct...

How to seamlessly enable location/gps without redirected to the location service window

Most of the apps requires the user to manually enable the gps setting which causes confusion with the user as they are redirected to the location services window outside the app. The below code will help you to seamlessly enable location/gps with...

Using handlers in android.

Brief Introduction In Android apps there are scenario  where we need to communicate the thread with our UI .Like downloading image from server and communicating to UI thread that downloading is completed or it is interrupted. Hand...

Location Setting API Android

This blog is about how to show Popup for enable Location setting. 1. Add below dependency to app gradle file. compile 'com.google.android.gms:play-services:9.6.1' 2. Implement GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConn...

How to avoid adding emoticons in android edittext

If you don't want to allow users to add emoji in edittext then below few lines will be helpfull for you. This method will return blank string while typing any similies/emoji in your editext. public static InputFilter EMOJI_FILTER = new I...

How to play Youtube video in your android app

In previous posts we discussed about how to generate  youtube video thumb and video_id. Now we are going to implement how to play videos in your android app by going through below easy steps. Step1: First adding YouTubeAndroidPlayerApi li...

How to generate video id from youtube video url in android

If you are using YouTubePlayer in your android app and wants to play youtube video on that, so first we need a youtube video url. From that url we can get a video id(11 alphanumeric character set). In below example we are going to generate a vide...

How to add CirclePageIndicator with ViewPager in android

CircularPagerIndicator is usually a kind of indicator that used to know how many images or tabs are left in our view. It is like a dot at the bottom of a view, more you can get by implementing below few lines in your project. Step1: permission...

How to create youtube video thumbnail in android

In order to create youtube video thumbnail in android we have to first initialize its view i.e. YouTubeThumbnailView in our xml file. On initializing YoutubeThumbnailView we have to add developer key and its InitializationSuccess listener with tw...

Implement FCM from Android Studio GUI

This blog is about how to implement FCM(Firebase Cloud messaging) from Android Studio. Android studio gives you tools to implement  Firebase tools in very easy way. 1. Open Android Studio. (Make sure Android Studio is up to date) 2....

Broadcast Receivers

Broadcast Receivers are used to respond to the broadcast messages that are generated from application or from system. The messages/ broadcasts that  are caught or responded by our Broadcast receivers are sometimes called intents or events...

Services in Android

A service is a component that runs in the background without user interaction and with no user interface. Services performs long running tasks without being visible like, playing music, triggering notifications etc. Services has two forms:- ...

How to create verticle bargraph in android

Step1: Add dependency MPAndroidChart and jitpack maven repository in your build.gradle repositories { maven { url "https://jitpack.io" } } dependencies{ compile 'com.github.PhilJay:MPAndroidChart:v2.1.6' } S...

What's new in latest Android studio version 2.2?

New studio version 2.2 has many features that provide developers vast range of functionality.   1. Layout Editor  Drag and drop from widget palette ,new blue print of your layout,tools like auto correction. Properties panel ...

opening activitiy with transition

In certain cases it is required to open the activity with transition like from left-to-right or top-to bottom or vice-versa. For this we have to create xml file that must be kept in "anim" folder. Regarding xml, we have 4 differen...

Parcelable Android Example

Parcelable is mechanism for passing data between Activities. Parcelable works same like serialization but It is faster then serialization. Here are the points to make class parcelable. 1. Create simple model class like below I created with ...

Parse Json Object with dynamic keys using Gson

Gson is a java library which converts Json to Java object and vice versa. This blog is about how we can parse Json data to Java Object where keys are dynamic created. 1. Json Sample text is:- { "data": { "status_code": "101", "...

Auto-Reply to Texts Messages on Android device When Youre Busy

In certain cases, we are busy with some work and we don't have free time to reply our device incoming text messages. In that case, you will send an auto-reply message to all the incoming messages about your situation which goes something like...

How to register a new user using Shopify mobile buy sdk ?

In previous blog we learn how to login in shopify from android app, now we already have sample application class to maintain buy client session so in this blog we learn how to create a new user account in your shop. xml layout file for registr...

Login with Shopify sdk

This is login tutorial using shopify sdk. Shopify authenticate any customer based n email id and password and returns customer details if customer already exists in shopify or shop. Mobile buy sdk is used to access all the methods of shopif...

What is Shopify and how to configure shopify sdk in android studio ?

Shopify is basically used to store and sell varieties of products so this is a platform to sell products of your shop. Shopify can also be implement in your Android applicaiton. Following are the steps to create shop and products and then c...

Monkey Testing with ADB command.

This blog is about how to use MonkeyRunner tool with ADB. MonkeyRunner Tool to test app UI and functionality. pseudo-random streams of user events and system events is generated by MonkeyRunner. MonkeyRunner controls the workstation by sending...

How to retrieve contacts from your android device

Step1: permission needed to read contacts <uses-permission android:name="android.permission.READ_CONTACTS"/> Step2: ContentResolver provides access to the content provider. Its main work is to read the user's query and redirecti...

How to get Image from URL using glide library

The below example code will helps you to get Image from URL by using glide library and to wait for image until it loaded.  For this in below example I have added glide library in  build.gradle file then I am using Glide with MainActivit...

How to implement ViewPager with tabs in android?

To switch easily from one page to another using slide either from left-to-right or right-to-left becomes easy using ViewPager. The below example is to make view pager with TabLayout, tabs may be used to display headings, we can also move easily f...

How to get GCM registration token in Android

GCM(Google Cloud Messaging) registration token is a kind of id given by the GCM connection server to user/client that allow user to receive messages. To get registration token first we have to generate a unique number, it can be created while con...

How to Mute/Unmute device sound programmatically in android?

In some of the cases in our application, we have to set our devices in Mute/Unmute mode. To get this functionality we have to add few lines of code. I have added two buttons one is for Mute and another one is for Unmute our device described below...

How to catch activities in foreground/background using ActivityLifecycleCallbacks?

To catch the states of every activity in our android application we have to implement ActivityLifecycleCallbacks. ActivityLifecycleCallbacks will have different override method as onActivityCreated, onActivityStarted, onActivityResumed, onActivit...

How to authenticate with Fingerprint in android applications ?

From android marshmallow api 23 android supports fingerprint authentication support. Fingerprint api support android version 6.0 or greater. Fingerprint authentication contains following process : 1. Check weather a user enabled keyguard or...

Group notification with summary in android nougat 7

As we know we have notification bar to show all the notifications in that are, in Android M we can show multiple notifications but from android N we can group them easily with better UI experience. A summary will also add whenever user wants t...

Linkify text in Android Textview

Linkify is very helpful to create links from TextView or Spannable. Linkify get Regular expression and work on Text with Regular expression.  For example, you have a random text which includes web URLs also and you want to use web URL a...

Behaviour of launchMode "singleTop" in Activity (manifest)

How launchmode parameter in activity behaves   <activity android:name=.FirstActivity android:launchMode=singleTop></activity>   Let us assume different activity as A ,B ,C ,D ,E   1   and...

How to use Butterknife in Android?

ButterKnife is library to initialize the views with Annotations. With the help of Butterknife you have no need to initialize view with findViewBtId(). here we start. 1. Create Project. 2. Open module level build.gradle file. 3. Add b...

How to declare dimension of activity and how to start launch bounds activity ?

Hi, Android 7 i.e nougat supports multi window mode to open more than one screens at a time With help of this flag one activity can be open adjacent to another activity. Require jdk : 1.8 or higher Require sdk : 24 nougat Require depe...

Android 7 to create resizable and minimum size activity

Hi, Android 7 i.e nougat supports multi window mode that means at the same time two or more screens can be open like to open email on right side and gallery on left side. So to create multi-window screen we have to use a flag in manifest named...

Features of Android Nougat api 7

Now Android API version 7 is ready to launch in the market with name Nougat.   Nougat has some features that are listed below : Performance - For Fast updates now just in time compiler comes with new updates, VR mode etc. Battery...

How to convert image color to Gray Scale using OpenCV?

OpenCV library is useful to convert image background color to another RGB color. We basically read the image using BufferedImage then we read bytes data from that image and we create a new MAT by applying image height and width and then put th...

Phongap Plugin Development From Android Studio.

Phone-gap Plugin Development  Hello all, Here is a simple tutorial to create plugin for phone-gap from android studio.  Requirements :-  Cordova (should be installed on your development machine). Phonegap (s...

Detect Beacon in Android

Hello Folks, This blog describes you how to use Altbeacon library for detecting beacons. What is a beacon ? A beacon is a device that is designed to attract attention to specific locations. Bluetooth low energy (BLE) technology is used t...

How to match template using openCV ?

Template matching with openCV basically works on matrix reading of searched image. following is the example of Template matching using openCV : xml file to show resulting image after image search : <?xml version="1.0" enco...

How to show openCV native camera in Android ?

In previous blog we added openCV android sdk and native libraries in our project so that we can use sdk. Here we will show camera in our Android app using openCV sdk. in your activity's xml file add this : <org.opencv.android.Ja...

How to add openCV sdk and native libs in your project?

OpenCV is an open source project that provides OpenCV android SDK to match one template against other. These are the following steps to add OpenCv in your project : 1. First of all download Android studio from this link - https://developer....

How to get android device macAddress, IMEI no and uniqueId

To grab MAC address first we have to enable device WIFI, after enabling it we can get the MAC address. public static String macAddress(final Context context){ WifiManager wifiManager = (WifiManager) context.getSystemService(Context....

How to read notification title, text and package name in android?

If you want to read your incoming notifications title, text and package name in your android application then below few lines of code will be helpful for you. To read incoming notification we have to add a BIND_NOTIFICATION_LISTENER_SERVICE in ou...

How to Insert, Select and Delete all table row data in SQLite database?

In the below example code I have clearly described how to insert,Select and delete all table row from the database. Here, first I have extended SQLiteOpenHelper class After this I have used onCreate method to create a database table. In next step...

Google sign in with google play service 9.0

With Google play services v9 we can easily sign in with google in our apps, now we have GoogleSignInOptions builder that is used to configure Google sign in api. GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions....

How to set arrow on custom seekbar ?

we can set arrow based seekbar using following trick like this : First of all you have to set a image of scale then below that image set a seekbar with progressDrawable transparent and then set arrow image as a thumb. <?xml version=&q...

Set Custom View to TabLayout android

This blog is about adding custom Layout to TabLayout.   Here we start. 1. Create Project.   2. Open Gradle file of the project.   3. Add design dependencies to the gradle. compile 'com.android.support:des...

Set help or show case view on screen

Showcase view or Help view is basically used to show some useful content on any screen when user comes first time there. This is the github library you can use to set showcase in easy way like this : add library in gradle file : compil...

How to crop an image in android

Step1: First we have to add jcenter() repository to Project build.gradle allprojects { repositories { jcenter() } } Step2: Now add cropping library in our app build.gradle and synchronize the application. compi...
1 3 20
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: