Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
Code Analysis using FindBugs Plugin in Android Studio
Android has Lint for checking errors in Java and XML code. Lint release with every new SDK.
But Lint is not find most type of bugs,exceptions and performance issue.
I found one plugin for static analysis tools to analysis android Java cod...
Pull to Refresh using SwipeRefreshLayout like Gmail
This blog provide you simple Pull to refresh functionality with SwipeRefreshLayout.
First of all create new project.
Open xml layout file and create ListView/ScrollView/Gridview.
Wrap ListView/ScrollView/Gridview with "android.support.v...
How r=to STORE RSS Feeds in Android for offline use.
I am working on an android app that displays an RSS News Feed. Something similar to CNN or other news app. So far the app is working great but I have one issue when the app us not connected to the internet the activity that the RSS News Feed is i...
Snackbar in android
Basically snackbar use to show message like a Toast but here the advantage is we have event to interact
in it.
It shows message on the bottom of the screen. And it will remove when we swipe off.
First of all add this in your gradle file
d...
How To Select Multiple images in android
Hello,
How To Select Multiple images in android. kindly give me idea so i could implement it.
Regards,
Tarun
Built in Place Picker in Android.
Android has now a built in Place picker, where user can pick the places. Developer can only send an intent and get result in OnActivityResult.
Requirements -Google play service greater than 7.
public void onPickButtonClick(View v) {
//...
Add custom ringtone on Notification
In our application, we can add notification ringtone as we want. Here is the solution.
First of all we need to create a folder named raw in /res/ file. After creating the folder put your ringtone in raw folder.
Then put this code when you...
How to know the call state in Android
Android provide us the facility to know the call state. Android gives this feature by providing Telephonymanager class. We need to implement PhoneStateListener interface that has one method onCallStateChanged().
Below is the example.
publ...
Sliding animation when switch to other activity
We can add animation on activity switching.
First thing that we need to do is to create xml for animation. Here I am using two xml for in and out.
animation_in.xml
set xmlns:android="http://schemas.android.com/apk/res/android" android:sh...
How to capture a video for particular time interval in Android
If you are looking to capture a video for particular time interval using default camera, then follow the below code to achieve the same.
Record video from camera for 60 seconds
private void captureVideoFromCamera(){
Intent intent = ne...
Custom EditText - Clear all text in Editext
It is very common that the Android's Edit text needs to clear all filled data in one hit, rather than clearing every single text using keyboard's 'X' button.
It is a good practice that enable user to clear all the text using Edit Text drawable...
How to Parse and read the JSON Array using GSON library
How to parse the below type of API Response
[
{
"id": "xxxxxx",
"displayLabel": "xxxxxxx",
"name": "xxxxxxx",
"fieldType": "Dropdown",
"mandatory": false,
"editable": true,
"description": "xxxxxx",
...
New Location Dialog from Android Settings API
Enable a system location dialog ,asking user that app needs to find the current location
This dialog is from Android Settings API
public class LocationData implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedL...
DVM in Android
DVM i.e., Dalvik Virtual Machine is basically a virtual machine for android and specially made for mobile
devices.
DVM was written by Dan Bornstein.
Now a days JVM has improved so much that it provides amazing memory management and better
p...
ATTACH SQLite Database
Hi,
Sometimes, we have many database and we need to use any one of them.
In this situation we use SQLite ATTACH DATASE statement to choose a specific database.
Syntax of the command:
ATTACH Database YOUR_DATASE_NAME As Alias-Name;
...
Animation to DialogFragment in android
Hi,
Here I am adding sliding animation to DialogFragment
First I am adding animation xml in res/anim folder.
Then creating custom style that add to the particular fragmentdialogs's onStart() method.
slidestart.xml
<set xmlns:a...
Automatically move to next edittext in android
Hi,
In android, we have TextWatcher interface to keep track of input that we are typing.
Usually it is very useful when we need verification on the basic of text length and content also.
It has method onTextChanged(CharSequence s, int star...
Help me Inserting Alarm and Notification
please help me inserting alarm and notofication for my uploaded file to be presented tommorrow for my defense pls :(
Spelling Checker in Android
Android provides a special feature for checking spelling and it is easy to implement in your App.
Android provides SpellCheckerSessionListener listener that handles spelling checker.
For spelling checker, we have to implement SpellChe...
Custom Fonts in Android
Android gives us the facility to customize our strings font.
For this we need to keep .ttf files of the specific font in assets/fonts folder.
We can easily download ttf from internet that we want to apply.
Then we use Typeface class t...
suggestions for my android app
hello guys,
i m creating an android activity in which i want to scroll a group of images(any number) on the click of a manual button.Kindly suggest me any useful libraries in this regard.
How to configure Android WebView to encrypt cookies?
This has been raised as a security concern blocking the release of my Cordova application on Android 4.4 KitKat
Using a SQLIte browser on a rooted device, the application session id cookie is being written in plain text into a SQLite table nam...
Zoomable List view
How to increase font sizes of list view items containing more than one textviews. on pinch - zoom gesture android? There is nothing such list view found on internet
Include GIF in Android Game.
Hello guys,does anyone know how to include gifs in an Android Game?
Thank you!
Communication between Fragments
Here I will explain how we can communicate between two fragments in an Activity. There are many situations where we have to communicate two fragments like we have to pass data between fragments in some events. Here I will communicate through Inte...
Add Dynamic Layout in Android
Generally we add layout from xml but sometimes we need to add layout using java. Here I am adding linear layout from java file. I am creating LinearLayout class which is provided by Android and add params on it. We have methods to set orientation...
android game made by Unity installs twice on the device
after building the game made by Unity and installing it on the device , I found that it is installed twice
check this image : http://i.imgur.com/6TSICnk.png
issue with implementing AdMob ads
after testing the game in a device , it exit after opening it directly
in case of deleting the AdMob Plugin , then the game works fine
after some researches , we found that the problem is because of the manifest files
there`s 2 manifest ...
Replacing images with text when a radio button is clicked.
I am a newbie developer to android. I am trying to develop an application as a test run it is a Q and A app.
Can anyone help me with the following problem.
The pages have 2 radio buttons in a radio group, the center of the page has an image...
Different Language Support in Android
Android gives us the facility to support different languages in your application. The solution is very easy, you just have to define separate values folder for each language and define every String there. You need to add a hyphen and ISO language...
TextClock in Android
Hi Friends, TextClock is used to show the current time or/and date. In TextClock we use formatted String to show the time or/and date. Basically it is a digital clock added from Api level 17 replacement of DigitalClock. By using this method we ge...
Change brightness of the device in Android
Hi,
Here I have written this code to change the brightness of the device in our application. I use the seekbar to change the brightness of the device. To handle the System Settings I use ContentResolver class and to handle current window referen...
Analog clock in Android
Hi Friends, Analog clock is a two handed clock, one shows hour and other shows minutes. It looks like a normal clock. Android provides AnalogClock to show the time.
Here is the code :-
Button buttonClock = (Button) findViewById(R.id. chang...
Setting listview and pager together in a scrollview
Putting listview and viewpager or anyother view together in Scrollview is not good habit but sometimes it's necessary to do So in that case we can use that following method to set listview height at runtime so that we can scroll listview as well ...
Gradient Drawable in Android
To make Button,TextView,Images and other android components looks better and stylish, we create Gradient drawable.
For using Gradient drawable, we can make shading effects and make better GUI.
We need to create drawable folder inside the re...
There is an Application to Receive the Intent or not in Android
Hi friends,
For Implicit intent, we dont need to declare the name of the class but we declare the action that we are doing to perform.
Like here we make a call
Uri callUri = Uri.parse("tel:100");
Intent intent = new Intent(Intent.AC...
Socket Exception in android
When I run this method I get an error of socket Exception.
(Permission denied) i.e,java.net.SocketException: socket failed:
Can you please me to find its solution.
public void run() {
// TODO Auto-generated method stub
URL u...
NetworkOnMainThread Exception
I am trying to call getBitmapFromURL() methos from onCreate() of my Activity and getting NetworkOnMainThread Exception.
Please help me to solve this problem.
public static Bitmap getBitmapFromURL(String src) {
try {
...
Get Country name without using location
Hi...
Usually we get country name by using our location via GPS settings. But somehow on situations we need to get country name without using GPS.
For these situation, Android provides Locale to get our device's country name.
We are us...
How to get IMEI number,serial number and software version of your phone
Hello...
Sometimes we need to know the country code, IMEI number, subscriber of a phone.
Their is very simple solution, For this android gives facility to know it by providing TelephonyManager class.
TelephonyManager have many methods t...
Logging in android
A very nice system is use for logging in android, usually called a centralized system.
Developer can filter log statements by using android tools.
We can create log statements by using android.util.Log class. Log class have so many methods l...
Generate SHA1 Key in android
In android we need to generate SHA1 key fingerprint to get Google Api key for Google Map.
It just a one line command to generate SHA1 key.
First of all create your .keystore file and sign to your app and take down this keystore lo...
Check Network Availability on android
We know that Its not possible that our android device should be always connected with a network.
It might be a situation when we would not connected with any network, So to check it whether we are connected with any network or not.
We check...
How to make listview scrollable inside ScrollView
If you apply ListView inside ScrollView, then the items of ListView will not scroll. By default the scrolling of ListView will not work if defined inside ScrollView. To make the scrolling work, use the onTouchListener. Below is the code to make l...
How to correctly use the AlarmManager class to execute a task at fixed intervals?
This Post ll help you to manage your alarm :
AlarmManager am=(AlarmManager)getSystemService(ALARM_SERVICE);
Intent alarmintent1=new Intent(MainActivity.this, AlarmReceiver.class);
PendingIntent sender1=PendingIntent.getBroadcast(SpeedMotor...
Dp to Px converter and vice-versa
As we all know that Android works with dp size.
But what to do if we have px values and want to check corresponding dp value ?. Don't worry try this -
public static int pxToDp(int px, Context ctx) {
DisplayMetrics displayMetrics = ctx.getRes...
Custom Toast in Android
Android give facility to change the view of a Toast. Sometimes we need to show message on a better way to user .
Here I am writing code to implement custom Toast. I make a separate layout for Toast .
Here I am showing a ImageView and TextVie...
How to implement a ListView in your Android application ?
This video tutorial describes how to implement ListView
A ListView is a view group that displays items in a scrollable list. By the help of adapter, list items are automatically inserted into the list. We just need to set the adapter using setAd...
Scan Wifi networks in your App
Android give facility to access the Wifi Network in your Application. You can access nearly every information of the connection.
Android have WifiManager API to handle all Wifi Connectivity.You can use it like this:
WifiManager wifiManagerO...
Run Multiple AsyncTask on a Single Time
In android, thread pool pattern is use in AsyncTask.
Early the size of the pool was 1 i.e,
there was no support for parallel bunching of AsyncTasks.But from HONEYCOMB version Android allows multiple Asynctask at a time.
We just have to use...