Steps Enable usb debugging and Connect the device to dev system with USB cable. Type “adb tcpip 5555” in Terminal/Command prompt. (Here we are opening a port in device to connect from development system.) Disconnect the phone and check the ip address of phone from network settings Type “adb connect :5555” Now the phone will… Read More »
This is a simple demo to do Slide to Unlock in Android. Layout Activity
This is a common question. Eventhough the Android System calls garabage collector at appropriate times, this usually will not be adequate. Because the system calls GC at intervals, most of the time it wont work perfect and causing unnecessary pauses in the application. If these pauses are more than 16ms, then the user will notice… Read More »
Automatic animations on Layout Change If you want to animate views in a layout without writing big codes. Here is a Simple way. Find the root element of the layout and add this property to it. Adding Manual Animations Fade Out Animation Fade In Animation Move Down by height Translate animate to origin Position Adding… Read More »
Android 6.0 saw the introduction of fingerprint authentication, a new security feature that allows users to confirm their identify with a single touch. Well, after that this has become a common way of authentication for users. Advantages Very easy, fast and convenient to use for authentication Don’t need to remember No struggling with the keyboards… Read More »
This example helps you to find the location in Android using the GPS. I have commented out some functionality in the code. You can uncomment it and extend it at your wish. At first we will create a utility class that will handle all GPS related Operations. GPS Utility Class This class has all utility… Read More »
Floating widgets float over the screen over any app that is currently running. Here we will make a floating action button that you can drag around the screen to position and do actions on it. Add Permission For drawing over the other apps, you need “android.permission.SYSTEM_ALERT_WINDOW” permission. So add this entry in your manifest. Our… Read More »
We often need to transfer images between activities. Well there are many methods to transfer images. You can make the image into a Base64 String and pass it as String argument extra in a bundle between activities You can save it to a disc and read it in the other activity. Well, these methods will… Read More »
We have to override the getBodyContentType() method in volley to enable “form-urlencoded parameters” in POST request using Volley. Here is how the code will look like. If you are not familiar with Volley, Checkout my post here on volley. It will give you a perfect picture on what Volley can do. Code – Method 1… Read More »
You may be knowing that RecyclerView is part of the material design, so it will have the built in animations when you add an element or remove and element. In today’s article, I will show you how to how to do this in a simple way. RecyclerView will perform a relevant animation if any of… Read More »
To get started with this, you need the latest version (version 25) of Android SDK & tools (including SDK tools, build-tools, platform-tools, support repository). Gradle Add the design support library First step is to add the design support library to your app-level build.gradle file. Example is as shown below: Layout Add the BottomNavigationView to your… Read More »
Hi all, You want to design your app with beautiful material design icons… here is the link… Go and use it and make your app beautiful.
Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed. Weak references are most often used to implement canonicalizing mappings. Suppose that the garbage collector determines at a certain point in time that an object is weakly reachable. At that time it will atomically clear all weak references… Read More »
Android comes with a built in feature for Speech to Text. This is really helpful when you want to provide navigation in your app through voice commands. When you say something in the app, your voice will be streamed to the server and the server will convert it to text and send back. You can… Read More »
Android uses a centralized logging system. However you can write your own custom log statements. Log Statements To write log statements, you use use the android.util.Log class with the following methods: Log.v() Log.d() Log.i() Log.w() Log.e() Log.wtf() They are sorted by relevance with Log.i() being the least important one. The first parameter of these methods… Read More »
This is simple, just do like this. It would be better if you do this once in the Class that extends the Application Class.
This is a simple trick in Android Studio. First you have to write the skeleton of your function like this Now to generate the comments for this function just type “/**” on top of the function and hit “enter”. You will see the comments generated for you. Now your function will look like this Leave… Read More »
Read about this from my new programming website http://codespower.com/2017/05/25/difference-between-shared-and-portable-app-in-xamarin/
This article shows how you can do simple image scaling in Android. Here I have a simple class that Scales the image. The Utility class Layout The layout which shows the image for scaling. Set the above xml as layout for the Activity. Activity Please leave your comments at the end of the post.
The popup windows is a floating container that appears on top of the current activity. Layout for PopUp Below is the layout for the popup window. Layout for Activity Create another layout for the activity activity_main.xml Implementation The activity which implements the popup.
Hi all, Today I will show you how you can implement Client-Server architecture in an Android environment. What is a socket? An interface between application and network The application creates a socket The socket type dictates the style of communication reliable vs. best effort connection-oriented vs. connectionless Once configured the application can pass data to… Read More »
Using Shelvesets in TFS we can set aside pending changes in Visual Studio 2015. We can set aside a batch of pending changes from our current work space temporarily using the feature Shelvesets . We can later restore these changes into our work space or can into work space of another user. Read more from… Read More »
Automated testing processes are now a common thing in every project. Lets see some of them MonkeyRunner You can checkout more from here Advantages Low Level tool Does not have to do coding to automate tests Written in Python It can run test cases on rela devices connected to a PC/Emulators. APIs available for controlling… Read More »
The android.telephony.TelephonyManager class provides information about the telephony services such as subscriber id, sim serial number, phone network type etc.You can also determine the phone state etc. Permission Before Starting, make sure you add the permission in the Android Manifest. Android Source Code Below code gets the information from the Android Telephony Manager and displays… Read More »