Last Updated: February 09, 2016

Things every android developer should know - part 1



Description: In this post, I'm gonna demonstrate tools that help solve some common problems while app development & help increase the speed as well.

So let's get started :-)


1. How to run app on phone without USB cord.(need USB initially to make connection

Note: Android Studio has provided a more sophisticated option to connect without USP using wireless debugging. Do check out the blog


Step 1: Connect the device with the cord to your system. Ensure that USB debugging is enabled from Developer options. Open cmd(windows) or Terminal(Linux) run the command. You'll find the connected device.
adb kill-server && adb devices
Step 2: Run the next command to restart in tcp mode on port 5555
adb tcpip 5555
Step 3: Now disconnect your device from the system and note down your ip address of the phone from Setting > About Phone > Status

E.g It could be something like 192.168.0.3(IP address) Now run the final command by replacing it with your IP address
adb connect 192.168.0.3:5555
Bingo we're done now your device is connected and you can run it wirelessly :-)

2. How to find SHA1 key from android studio?

SHA1 key is needed in many different apps containing maps or social sites authentication or using any Google apps and services. It's super useful. So the simplest way to get that is using Android Studio.

Step 1: Select the Gradle projects from the right pane and expand Tasks > Android> signingReport. (fig.1).

Note: If you do not find your project in Gradle Projects sync the project from Android Studio.

Gradle Project
fig.1


3. Best way to create icons for android app using vector asset.

Many times in our development we need icons for small things with varied colors or shape. Using Vector Asset in Android Studio we can create our icons with super ease.

Step 1: Right-click on app > New > Vector Asset you'll see Fig. 3. You can choose Material Icons which contains a whole lot of icons in different categories. This will create <vector> for the icon you have selected. (fig.4) in drawable folder

Vector Asset
fig.3
Vector Asset for the icon
Vector xml

fig.4
Step 2: Awesome now just we can simply set it to background or src of ImageView and other widgets.


For more updates follow us on -  Twitter

#codingIsAnArt
#coderconsole

8 comments :

  1. Thank you for taking the time to publish this information very useful!
    Android Application Development Pakistan

    ReplyDelete
  2. This is really a nice and informative, containing all information and also has a great impact on the new technology.
    Android Development pakistan

    ReplyDelete
  3. Your article contains very much information about android app development. These tips are very informative and useful for ios app developers. I am thankful to you for sharing this article here.

    ReplyDelete
  4. Hi, Amazing your article you know I'm too lazy to sign up an account just for comment your article. it's really good and helping dude. thanks!
    Android Training in Delhi

    ReplyDelete
  5. Great article Lot's of information to Read...Great Man Keep Posting and update to People..Thanks pay for instagram likes paypal

    ReplyDelete
  6. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value. Im glad to have found this post as its such an interesting one! I am always on the lookout for quality posts and articles so i suppose im lucky to have found this! I hope you will be adding more in the future...
    taxi app development company

    ReplyDelete

Your comments are valuable for us !!!