Skip to main content


Android ADB over WiFi without ROOT

Debugging Android application via usb cable connected is difficult, since the cable disconnected every time in my case.

However after searching I found the way to debug the app over wifi on non rooted devices.

#First connect the device to pc and run on terminal

adb devices -l

It will show list of all the connected devices.Ensure your device is visible

#Now run
adb tcpip 5555

set port to any you want

#Now run
adb connect :5555

eg : adb connect
To view your phone IP :
Open Settings -> About Phone -> Status -> IP address

# Now remove your usb cable and again run adb devices -l

 your device should be visible

#Now debug from android studio without cable

Recent posts

Android Recycler View Tutorial : Part 2

In part 1 we created recycler view without any model or view holder. In this part we will create data model and a view holder and bind both these to the recycler view.

Previous part :

Now lets first create a simple data model:
This class does nothing special it just generate some dummy data.

publicclassDummyModel{//text String textData ="not set yet !!";publicDummyModel(){}/** * constructor to set the dummy text * @param data */publicDummyModel(String data){ textData = data;}staticpublic List<DummyModel>getDummyModel(int length){ List<DummyModel> dummyModelsList =new ArrayList<>();for(int i =0; i < length; i++){ dummyModelsList.add(new DummyModel("This is the model "+i));}return dummyModelsList;}/** * just a setter method !Not used! * @param text */publicvoidsetText(String text){this.textDa…

React Native

React Native : this is the thing which I have been looking for. I want to create my app fast. At first I use rhino with android to keep my app flexible.
However React Native does all this for you, If you haven't heard about react native it is the open source framework for creating app and deploy to multiple platform.
It is more than hybrid apps because it don't use web view it uses bridge to render native component.

Even getting started is very easy no need for android studio.
I am writing this post for windows platform.

#1 first Download the nodejs , Download the latest nodejs , Install it.

#2 open cmd and type node to ensure all thing is running fine.

#3 Now during writing of this post React Native don't work fine with npm5 so you need to downgrade it to npm4 ,

#4 So run cmd and type 'npm install -g npm@4' this will install npm 4

# now lets start with react native app.

# in cmd run

npm install -g create-react-native-app create-react-native-app AwesomeProject cd …

Android Recycler View Tutorial

In Android there is the need when you need to display a list of data or simply data that get generated at run-time. Rather than creating your own layout inflator. Android provide Recycler View, there is also a listview which was provided to show data.

After after many experiments with Recycler View here is the tutorial for it. Hope it will be use full to someone.I assume if you are reading this then you know how to add activity in the android studio.

I have divided the article into several parts. Here is the First part.

Part 2 :

Here is the video of it :

# First Create an Android Project. #Compiling the required library Open your build.gradle file for (module:app) level
add line compile '' in the dependencies section.
this will download recycler view dependencies in the project.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15dependencies{compilefile…

Android Hello world Application

Android Hello World Application .

Test video.

Android Parsing JSON

When developing application at some of time you need to communicate with web service for data exchange. If your communication uses JOSN(JavaScript Object Notation) for data transfer. You may start finding the easiest library available for the JSON however there are plenty of library for JSON library for JAVA.
The one which I found suitable for my need is :
JSON-java License : MIT
Author : Sean Leary

In this article I will share how to parse JSON using JSON-java in android however the snippet is not limited to android only Getting Started
1. Download the library from :
    download the source as ZIP from the github

2. Extract the Files from the zip
3. Open Android-Studio
4. Right click the Java folder navigate to New->Package

5. Select the destination directory as main\java , click on OK button

6. Enter package name as org.json and click on OK button

7. Now copy all the JSON-java .java from the source folder and copy them to Android-Studio

Android Studio Tips/Tricks

This post simple contain the android studio tricks which I used.

#1 Case insensitive code completion. This is the which I first enable on  the android studio. If you don't remember commands like me than it is for you, by enabling this you can get the required method or anything if you know part of it.

a.Open Setting from File-> settings
b. Go to code completion and set case sensitive to none c. Now all set you can check the code completion just type and press ctrl+space

#2 Find methods which can be override and implemented. I always want to know which are the methods provided by the base class that can be overridden. To find the methods which can be overridden in android studio.
Just press CTRL+O Now you have all the methods that can be overridden.
#3 Speed up android studio  If android studio lags in your system. I mean only to the GUI. below is the trick which worked for me. Go to settings -> appearance and set theme to windows and disable the animation. (this will give you…