21 Dec 2015

OEM USB Drivers

Acer         http://www.acer.com/worldwide/support/mobile.html
alcatel one touch http://www.alcatelonetouch.com/global-en/support/
Asus  http://support.asus.com/download/
Blackberry https://swdownloads.blackberry.com/Downloads/entry.do?code=4EE0932F46276313B51570F46266A608
Dell http://support.dell.com/support/downloads/index.aspx?c=us&cs=19&l=en&s=dhs&~ck=anavml
Fujitsu http://www.fmworld.net/product/phone/sp/android/develop/
Hisense http://app.hismarttv.com/dss/resourcecontent.do?method=viewResourceDetail&resourceId=16&type=5
HTC http://www.htc.com
Click on the support tab to select your products/device. Different regions will have different links.

Huawei http://consumer.huawei.com/en/support/index.htm
Intel         http://www.intel.com/software/android
Kyocera http://www.kyocera-wireless.com/support/phone_drivers.htm
Lenovo http://support.lenovo.com/us/en/GlobalProductSelector
LGE         http://www.lg.com/us/support/software-firmware
Motorola https://motorola-global-portal.custhelp.com/app/answers/detail/a_id/88481/
MTK http://online.mediatek.com/Public%20Documents/MTK_Android_USB_Driver.zip (ZIP download)
Oppo http://www.oppo.com/index.php?q=software/view&sw_id=631
Pegatron http://www.pegatroncorp.com/download/New_Duke_PC_Driver_0705.zip (ZIP download)
Samsung http://www.samsung.com/us/support/downloads
Sharp http://k-tai.sharp.co.jp/support/
Sony Mobile Communications http://developer.sonymobile.com/downloads/drivers/
Toshiba http://support.toshiba.com/sscontent?docId=4001814
Xiaomi http://www.xiaomi.com/c/driver/index.html
ZTE         http://support.zte.com.cn/support/news/NewsDetail.aspx?newsId=1000442

Read More !

18 Dec 2015

Resetting adb in Android studio

If you are having issues trying to connect to the emulator or see any type of "Connection refused" errors, you may need to reset the Android Debug Bridge. You can go to Tools->Android->Android Device Monitor. Click on the mobile device icon and click on the arrow facing down to find the Reset adb option.
Image 1:-
Amar's Android Tech
 Image 2:-
Amar's Android Tech

Read More !

11 Dec 2015

INSTALL_FAILED_OLDER_SDK error message

If your minSdkVersion is higher than the Android version you are using (i.e. using an emulator that supports API 19 and your target version is for API 23), then you may see an error message that appears similar to the following :
Application Installation Failed
You will need to either lower the minSdkVersion or upgrade to an Android emulator or device that supports the minimum SDK version required.
Read More !

5 Dec 2015

Seeing java.lang.OutOfMemoryError : GC overhead limit when compiling

You are most likely exhausting the heap size especially during compilation. Try to add inside this setting in your app/build.gradle:

android {
   .
   .
   .
   dexOptions {
     javaMaxHeapSize "4g"
   }
}

You can also reduce the build time too by setting incremental to be true:

android {
   dexOptions { 
      incremental true
      javaMaxHeapSize "4g"
   }
}

Still not working? Try to increase the heap size of Android Studio.
  1. Quit Android Studio.
  2. Create or edit a studio.vmoptions file.
    • On Mac, this file should be in ~/Library/Preferences/AndroidStudio/studio.vmoptions.
    • On Windows, it should be in %USERPROFILE%\.AndroidStudio\studio[64].exe.vmoptions.
    Increase the maximum memory to 2 Gb and max heap size of 1 Gb.
     -Xmx2048m
     -XX:MaxPermSize=1024m`
    
  3. Start Android Studio.
Read More !

28 Nov 2015

Getting "com.android.dex.DexException: Multiple dex files define"

One of the issues in the new Gradle build system is that you can often get "Multiple dex files define" issues.

If a library is included twice as a dependency you will encounter this issue. Review the libs folder for JARS and the gradle file at app/build.gradle and see if you can identify the library dependency that has been loaded into your application twice.

If one dependency library already includes an identical set of libraries, then you may have to make changes to your Gradle configurations to avoid this conflict. This problem usually happens when there are multiple third-party libraries integrated into your code base.

Another error if you attempt to include a library that is a subset of another library. For instance, suppose we included the Google play-services library but thought we also needed to include it with the play-services-map library.:

dependencies {
    compile 'com.google.android.gms:play-services:6.5.+'
    compile 'com.google.android.gms:play-services-maps:6.5.+'
}

It turns out that having both is redundant and will cause errors. It is necessary in this case to remove one or the other, depending on your need to use other Google API libraries.
Read More !

16 Nov 2015

Getting "tooling.GradleConnectionException" errors

If you see org.gradle.tooling.GradleConnectionException errors, you may need to install a newer version of JDK (there have been reports of 1.7.0_71 having this issue). First try to restart the adb server first.
Amar's Android Tech

Read More !

7 Nov 2015

Getting "failed to find Build Tools revision x.x.x"

If you're opening another Android Studio project and the project fails to compile, you may see "failed to find Build Tools revision x.x.x" at the bottom of the screen. 
Since this package is constantly being changed, it should be no surprise that other people who have installed Android Studio may have different versions. You can either click the link below to install this specific Build Tools version, or you can modify the build.gradle file to match the version you currently have installed.
Amar's Android Tech

Read More !

26 Oct 2015

Seeing Unsupported major.minor version 52.0 on some plugins

Some Android Studio plugins do not support Java 1.6 anymore, so it's best to confirm what version you are using. Inside Android Studio, click on About Android Studio. You should see the JRE version listed as 1.x.x below :
Amar's Android Tech
If you have multiple Java versions installed, you should make sure that v1.6 is not being used.
On OS X machines, you can remove the JDK from being noticed. You can move it the temporary directory in case other issues are created by this change.
sudo mv /System/Library/Java/JavaVirtualMachines/1.6.0.jdk /tmp
Read More !

17 Oct 2015

Unable to delete emulator getting "AVD is currently running in the Emulator"

Open the Tools => Android => AVD Manager and select virtual device that you want to delete. Click on the down arrow at the end and select the [Show on Disk] option which will open the emulator directory. Inside the [Your Device].avd folder, locate any *.lock files and delete them. You can now delete the emulator.
Read More !

10 Oct 2015

Android Studio is Crashing or Freezing Up

If Android Studio starts freezing up or crashing even after rebooting the IDE or your computer, your Studio has likely become corrupted. The best way to resolve this is to clear all the caches by removing all the following folders:

~/Library/Application Support/AndroidStudio
~/Library/Caches/AndroidStudio
~/Library/Logs/AndroidStudio
~/Library/Preferences/AndroidStudio

and then uninstall Android Studio and re-install the latest stable version. This should allow you to boot Android Studio again without errors.
Read More !

5 Oct 2015

Add application shortcut to the home screen

In this post, I will be discussing about how to create shortcut for Android applications programmatically.
What is Android Shortcut?
Android allows you to create app shortcuts, but you can also create special shortcuts that link directly to screens within an app. For example, shortcuts could link to the Navigation screen in Maps or any screen in the Settings app.
To Create Shortcut
It is very simple to create shortcut programmatically, all you need to do is broadcast the intent with necessary information.
Below code snippet will create the shortcut.
//create shortcuts of app
        Intent HomeScreenShortCut= new Intent(getApplicationContext(),
                MainActivity.class);
        HomeScreenShortCut.setAction(Intent.ACTION_MAIN);
        HomeScreenShortCut.putExtra("duplicate", false);
        //shortcutIntent is added with addIntent
        Intent addIntent = new Intent();
        addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, HomeScreenShortCut);
        addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "Matrialtest");
        addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
                Intent.ShortcutIconResource.fromContext(getApplicationContext(),
                               R.drawable.ic_launcher));
        addIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
        getApplicationContext().sendBroadcast(addIntent);

Add add this permission to your manifest

<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
That’s all. It’s time to test our code.
Run the application using emulator or device by right clicking on the project >> Run as >> Android application >> Choose emulator or device.
Read More !

28 Sept 2015

Error:failed to find Build Tools revision 23.0.0 rc2


Going crazy with this error from about a couple of hours.

The error is:

failed to find Build Tools revision 23.0.0 rc1
But I think to have all update



I could fix it by changing it to

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.0"
}
in build.gradle file

Open the SDK Manager and find the version of the Android SDK Build-tools which is installed and that you want to use. Then go to Gradle Scripts > build.gradle (Module: app). Set the buildToolsVersion to your version.
There is an easier solution. "Right click on the project > Open Module Settings. Choose the Complie Sdk Version and Build Tools Version you want to use".
Read More !

25 Sept 2015

Cannot locate factory for objects of type DefaultGradleConnector, as ConnectorServiceRegistry has been closed.

I get this error when trying to run my App on Android Studio.


Gradle 'MyApp' refresh failed.
Error:Cannot locate factory for objects of type DefaultGradleConnector, as ConnectorServiceRegistry has been closed.

Just Restarting Android Studio usually fixes this error for me.

Read More !

23 Sept 2015

Pan Card Validation in Android EditText

Sample code for PAN card number validation.
PAN card number is a unique national number issued in India for tax related purposes.

 PAN structure is as follows: AAAAA9999A: First five characters are letters, next 4 numerals, last character letter.

To validate PAN card, call this line of code :-

mEdtPanNumber.addTextChangedListener(new TextWatcher() {

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                // TODO Auto-generated method stub
            }

            @Override
            public void afterTextChanged(Editable editable) {
                if (editable.length() == 10) {
                    String s = editable.toString(); // get your editext value here
                    Pattern pattern = Pattern.compile("[a-z]{5}[0-9]{4}[a-z]{1}");
                    Matcher matcher = pattern.matcher(s);
                    // Check if pattern matches
                    if (matcher.matches()) {
                    panNumber = editable.toString();
                } else {
                    Toast.makeText(DetailsActivity.this, getString(R.string.plz_enter_your_correct_pan_num), Toast.LENGTH_LONG).show();
                }
                }
            }

            @Override
            public void beforeTextChanged(CharSequence s, int start, int count,
                                          int after) {
                // TODO Auto-generated method stub
            }
        });

Read More !

22 Jul 2015

How to get sha1 key in android studio

get SHA1 in Android Studio
If you have android studio then it is very very simple. Just create a MapActivity using android studio and after creating it go into google_maps_api.xml and in there there will be a link given in comments. If you paste it in your browser, it will ask a few details to be filled and after that your api will be generated. No need of using keytool and all.
  1. Click on your package and choose New -> Google -> Google Maps Activity
  2. Android Studio redirect you to google_maps_api.xml
And you will see all you need to get google_maps_key
SHA1 Key in Android Studio

Read More !

18 Jul 2015

Difference between padding and margin

Padding is used to offset the content of a view by specifying pixels. For example a left padding of 2 wil push views content 2 pixels right side of the left edge. Use android:padding
android:paddingBottom,android:paddingLeft,android:paddingRight,android:paddingTop to set padding on various sides of the content of that view.

Margin specifies the extra space left on all four sides of a view. Margin space is generally outside the view's bounds. To leave space on left side use android:margin_left, to leave space on other sides use android:layout_marginRight, android:layout_marginTop, android:layout_marginBottom etc..

In Simple words .. if you want to take your widget like TextView, EditText far away from other. You should use margin from top,right,left,bottom.

By increasing padding it will increase the inner spacing not making the widget far apart from others..

"Padding is inside of a View.Margin is outside of a View."
This difference may be relevant to background or size properties.
Margin:-
Margins make up the vertical and horizontal areas between elements. If elements have no margins around them, they will bump right up against each other. In other words, he space outside of, or between, elements is what comprises the margin areas.

Padding:-
The padding of an element is the horizontal and vertical space that’s set around the content area of the targeted element. So padding is on the inside of a box, not the outside.



Read More !

15 Jul 2015

What is the use of asynctask in android ?

AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers.

An asynchronous task is defined by a computation that runs on a background thread and whose result is published on the UI thread. An asynchronous task is defined by 3 generic types, called ParamsProgress and Result.and 
4 steps, called onPreExecutedoInBackgroundonProgressUpdate and onPostExecute.


AsyncTask's generic types


The three types used by an asynchronous task are the following:
  1. Params, the type of the parameters sent to the task upon execution.
  2. Progress, the type of the progress units published during the background computation.
  3. Result, the type of the result of the background computation.
Not all types are always used by an asynchronous task. To mark a type as unused, simply use the type Void:
 private class MyTask extends AsyncTask<Void, Void, Void> { ... }

The 4 steps


When an asynchronous task is executed, the task goes through 4 steps:
  1. onPreExecute(), invoked on the UI thread before the task is executed. This step is normally used to setup the task, for instance by showing a progress bar in the user interface.
  2. doInBackground(Params...), invoked on the background thread immediately after onPreExecute() finishes executing. This step is used to perform background computation that can take a long time. The parameters of the asynchronous task are passed to this step. The result of the computation must be returned by this step and will be passed back to the last step. This step can also use publishProgress(Progress...) to publish one or more units of progress. These values are published on the UI thread, in the onProgressUpdate(Progress...) step.
  3. onProgressUpdate(Progress...), invoked on the UI thread after a call to publishProgress(Progress...). The timing of the execution is undefined. This method is used to display any form of progress in the user interface while the background computation is still executing. For instance, it can be used to animate a progress bar or show logs in a text field.
  4. onPostExecute(Result), invoked on the UI thread after the background computation finishes. The result of the background computation is passed to this step as a parameter.

Cancelling a task


A task can be cancelled at any time by invoking cancel(boolean). Invoking this method will cause subsequent calls to isCancelled() to return true. After invoking this method, onCancelled(Object), instead of onPostExecute(Object) will be invoked after doInBackground(Object[]) returns. To ensure that a task is cancelled as quickly as possible, you should always check the return value of isCancelled() periodically from doInBackground(Object[]), if possible (inside a loop for instance.)

Threading rules


There are a few threading rules that must be followed for this class to work properly:
Read More !

11 Jul 2015

Difference between Service, Async Task & Thread?

  • Service is like an Activity but has no interface. Probably if you want to fetch the weather for example you won't create a blank activity for it, for this you will use a Service.
  • A Thread is a Thread, probably you already know it from other part. You need to know that you cannot update UI from a Thread. You need to use a Handler for this, but read further.
  • An AsyncTask is an intelligent Thread that is advised to be used. Intelligent as it can help with it's methods, and there are two methods that run on UI thread, which is good to update UI components.



Service
Thread
IntentService
AsyncTask
When to use ?
Task with no UI, but shouldn't be too long. Use threads within service for long tasks.
- Long task in general.

- For tasks in parallel use Multiple threads (traditional mechanisms)
- Long task usually with no communication to main thread.
(Update)- If communication is required, can use main thread handler or broadcast intents

- When callbacks are needed (Intent triggered tasks). 
- Small task having to communicate with main thread.

- For tasks in parallel use multiple instances OR Executor
 
Trigger
Call to method
onStartService()
Thread start() method
Intent
Call to method execute()
Triggered From (thread)
Any thread
Any Thread
Main Thread (Intent is received on main thread and then worker thread is spawed)
Main Thread
Runs On (thread)
Main Thread
Its own thread
Separate worker thread
Worker thread. However, Main thread methods may be invoked in between to publish progress.
Limitations /
Drawbacks
May block main thread
- Manual thread management

- Code may become difficult to read
- Cannot run tasks in parallel.

- Multiple intents are queued on the same worker thread.
- one instance can only be executed once (hence cannot run in a loop) 

- Must be created and executed from the Main thread


Read More !

10 Jul 2015

Material Design Colors

This color palette comprises primary and accent colors that can be used for illustration or to develop your brand colors. They’ve been designed to work harmoniously with each other.
The color palette starts with primary colors and fills in the spectrum to create a complete and usable palette for Android, Web, and iOS. Google suggests using the 500 colors as the primary colors in your app and the other colors as accents colors.
Reference site :- Matrial Design Color

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="md_red_500_primary">#F44336</color>
    <!-- light -->
    <color name="md_red_50">#FFEBEE</color>
    <color name="md_red_100">#FFCDD2</color>
    <color name="md_red_200">#EF9A9A</color>
    <color name="md_red_300">#E57373</color>
    <color name="md_red_400">#EF5350</color>
    <!-- dark -->
    <color name="md_red_600">#E53935</color>
    <color name="md_red_700">#D32F2F</color>
    <color name="md_red_800">#C62828</color>
    <color name="md_red_900">#B71C1C</color>

    <!-- light -->
    <color name="md_red_a100">#FF8A80</color>
    <!-- dark -->
    <color name="md_red_a200">#FF5252</color>
    <color name="md_red_a400">#FF1744</color>
    <color name="md_red_a700">#D50000</color>


    <!-- PINK -->
    <!-- dark -->
    <color name="md_pink_500_primary">#E91E63</color>
    <color name="md_pink_50">#FCE4EC</color>
    <color name="md_pink_100">#F8BBD0</color>
    <color name="md_pink_200">#F48FB1</color>
    <color name="md_pink_300">#F06292</color>
    <color name="md_pink_400">#EC407A</color>
    <!-- dark -->
    <color name="md_pink_600">#D81B60</color>
    <color name="md_pink_700">#C2185B</color>
    <color name="md_pink_800">#AD1457</color>
    <color name="md_pink_900">#880E4F</color>

    <!-- light -->
    <color name="md_pink_A100">#FF80AB</color>
    <!-- dark -->
    <color name="md_pink_A200">#FF4081</color>
    <color name="md_pink_A400">#F50057</color>
    <color name="md_pink_A700">#C51162</color>


    <!-- PURPLE -->
    <!-- dark -->
    <color name="md_purple_500_primary">#9C27B0</color>
    <!-- light -->
    <color name="md_purple_50">#F3E5F5</color>
    <color name="md_purple_100">#E1BEE7</color>
    <color name="md_purple_200">#CE93D8</color>
    <!-- dark -->
    <color name="md_purple_300">#BA68C8</color>
    <color name="md_purple_400">#AB47BC</color>
    <color name="md_purple_600">#8E24AA</color>
    <color name="md_purple_700">#7B1FA2</color>
    <color name="md_purple_800">#6A1B9A</color>
    <color name="md_purple_900">#4A148C</color>

    <!-- light -->
    <color name="md_purple_A100">#EA80FC</color>
    <!-- dark -->
    <color name="md_purple_A200">#E040FB</color>
    <color name="md_purple_A400">#D500F9</color>
    <color name="md_purple_A700">#AA00FF</color>


    <!-- DEEP PURPLE-->
    <!-- dark -->
    <color name="md_deep_purple_500_primary">#673AB7</color>
    <!-- light -->
    <color name="md_deep_purple_50">#EDE7F6</color>
    <color name="md_deep_purple_100">#D1C4E9</color>
    <color name="md_deep_purple_200">#B39DDB</color>
    <!-- dark -->
    <color name="md_deep_purple_300">#9575CD</color>
    <color name="md_deep_purple_400">#7E57C2</color>
    <color name="md_deep_purple_600">#5E35B1</color>
    <color name="md_deep_purple_700">#512DA8</color>
    <color name="md_deep_purple_800">#4527A0</color>
    <color name="md_deep_purple_900">#311B92</color>

    <!-- light -->
    <color name="md_deep_purple_A100">#B388FF</color>
    <!-- dark -->
    <color name="md_deep_purple_A200">#7C4DFF</color>
    <color name="md_deep_purple_A400">#651FFF</color>
    <color name="md_deep_purple_A700">#6200EA</color>


    <!-- INDIGO -->
    <!-- dark -->
    <color name="md_indigo_500_primary">#3F51B5</color>
    <!-- light -->
    <color name="md_indigo_50">#E8EAF6</color>
    <color name="md_indigo_100">#C5CAE9</color>
    <color name="md_indigo_200">#9FA8DA</color>
    <!-- dark -->
    <color name="md_indigo_300">#7986CB</color>
    <color name="md_indigo_400">#5C6BC0</color>
    <color name="md_indigo_600">#3949AB</color>
    <color name="md_indigo_700">#303F9F</color>
    <color name="md_indigo_800">#283593</color>
    <color name="md_indigo_900">#1A237E</color>

    <!-- light -->
    <color name="md_indigo_A100">#8C9EFF</color>
    <!-- dark -->
    <color name="md_indigo_A200">#536DFE</color>
    <color name="md_indigo_A400">#3D5AFE</color>
    <color name="md_indigo_A700">#304FFE</color>


    <!-- BLUE -->
    <!-- dark -->
    <color name="md_blue_500_primary">#2196F3</color>
    <!-- light -->
    <color name="md_blue_50">#E3F2FD</color>
    <color name="md_blue_100">#BBDEFB</color>
    <color name="md_blue_200">#90CAF9</color>
    <color name="md_blue_300">#64B5F6</color>
    <color name="md_blue_400">#42A5F5</color>
    <!-- dark -->
    <color name="md_blue_600">#1E88E5</color>
    <color name="md_blue_700">#1976D2</color>
    <color name="md_blue_800">#1565C0</color>
    <color name="md_blue_900">#0D47A1</color>

    <!-- dark -->
    <color name="md_blue_A100">#82B1FF</color>
    <!-- light -->
    <color name="md_blue_A200">#448AFF</color>
    <color name="md_blue_A400">#2979FF</color>
    <color name="md_blue_A700">#2962FF</color>


    <!-- LIGHT BLUE -->
    <!-- dark -->
    <color name="md_light_blue_500_primary">#03A9F4</color>
    <!-- light -->
    <color name="md_light_blue_50">#E1F5FE</color>
    <color name="md_light_blue_100">#B3E5FC</color>
    <color name="md_light_blue_200">#81D4FA</color>
    <color name="md_light_blue_300">#4FC3F7</color>
    <color name="md_light_blue_400">#29B6F6</color>
    <!-- dark -->
    <color name="md_light_blue_600">#039BE5</color>
    <color name="md_light_blue_700">#0288D1</color>
    <color name="md_light_blue_800">#0277BD</color>
    <color name="md_light_blue_900">#01579B</color>

    <!-- light -->
    <color name="md_light_blue_A100">#80D8FF</color>
    <color name="md_light_blue_A200">#40C4FF</color>
    <color name="md_light_blue_A400">#00B0FF</color>
    <!-- dark -->
    <color name="md_light_blue_A700">#0091EA</color>


    <!-- CYAN -->
    <!-- dark -->
    <color name="md_cyan_500_primary">#00BCD4</color>
    <!-- light -->
    <color name="md_cyan_50">#E0F7FA</color>
    <color name="md_cyan_100">#B2EBF2</color>
    <color name="md_cyan_200">#80DEEA</color>
    <color name="md_cyan_300">#4DD0E1</color>
    <color name="md_cyan_400">#26C6DA</color>
    <!-- dark -->
    <color name="md_cyan_600">#00ACC1</color>
    <color name="md_cyan_700">#0097A7</color>
    <color name="md_cyan_800">#00838F</color>
    <color name="md_cyan_900">#006064</color>

    <!-- light -->
    <color name="md_cyan_A100">#84FFFF</color>
    <color name="md_cyan_A200">#18FFFF</color>
    <color name="md_cyan_A400">#00E5FF</color>
    <color name="md_cyan_A700">#00B8D4</color>


    <!-- TEAL -->
    <!-- dark -->
    <color name="md_teal_500_primary">#009688</color>
    <!-- light -->
    <color name="md_teal_50">#E0F2F1</color>
    <color name="md_teal_100">#B2DFDB</color>
    <color name="md_teal_200">#80CBC4</color>
    <color name="md_teal_300">#4DB6AC</color>
    <color name="md_teal_400">#26A69A</color>
    <!-- dark -->
    <color name="md_teal_600">#00897B</color>
    <color name="md_teal_700">#00796B</color>
    <color name="md_teal_800">#00695C</color>
    <color name="md_teal_900">#004D40</color>

    <!-- light -->
    <color name="md_teal_A100">#A7FFEB</color>
    <color name="md_teal_A200">#64FFDA</color>
    <color name="md_teal_A400">#1DE9B6</color>
    <color name="md_teal_A700">#00BFA5</color>

    <!-- GREEN -->
    <!-- dark -->
    <color name="md_green_500_primary">#4CAF50</color>
    <!-- light -->
    <color name="md_green_50">#E8F5E9</color>
    <color name="md_green_100">#C8E6C9</color>
    <color name="md_green_200">#A5D6A7</color>
    <color name="md_green_300">#81C784</color>
    <color name="md_green_400">#66BB6A</color>
    <!-- dark -->
    <color name="md_green_600">#43A047</color>
    <color name="md_green_700">#388E3C</color>
    <color name="md_green_800">#2E7D32</color>
    <color name="md_green_900">#1B5E20</color>

    <!-- light -->
    <color name="md_green_A100">#B9F6CA</color>
    <color name="md_green_A200">#69F0AE</color>
    <color name="md_green_A400">#00E676</color>
    <color name="md_green_A700">#00C853</color>


    <!-- LIGHT GREEN -->
    <!-- dark -->
    <color name="md_light_green_500_primary">#8BC34A</color>
    <!-- light -->
    <color name="md_light_green_50">#F1F8E9</color>
    <color name="md_light_green_100">#DCEDC8</color>
    <color name="md_light_green_200">#C5E1A5</color>
    <color name="md_light_green_300">#AED581</color>
    <color name="md_light_green_400">#9CCC65</color>
    <color name="md_light_green_600">#7CB342</color>
    <color name="md_light_green_700">#689F38</color>
    <!-- dark -->
    <color name="md_light_green_800">#558B2F</color>
    <color name="md_light_green_900">#33691E</color>

    <!-- light -->
    <color name="md_light_green_A100">#CCFF90</color>
    <color name="md_light_green_A200">#B2FF59</color>
    <color name="md_light_green_A400">#76FF03</color>
    <color name="md_light_green_A700">#64DD17</color>


    <!-- LIME -->
    <!-- light -->
    <color name="md_lime_500_primary">#CDDC39</color>
    <color name="md_lime_50">#F9FBE7</color>
    <color name="md_lime_100">#F0F4C3</color>
    <color name="md_lime_200">#E6EE9C</color>
    <color name="md_lime_300">#DCE775</color>
    <color name="md_lime_400">#D4E157</color>
    <color name="md_lime_600">#C0CA33</color>
    <color name="md_lime_700">#AFB42B</color>
    <color name="md_lime_800">#9E9D24</color>
    <!-- dark -->
    <color name="md_lime_900">#827717</color>

    <!-- light -->
    <color name="md_lime_A100">#F4FF81</color>
    <color name="md_lime_A200">#EEFF41</color>
    <color name="md_lime_A400">#C6FF00</color>
    <color name="md_lime_A700">#AEEA00</color>


    <!-- YELLOW -->
    <!-- light -->
    <color name="md_yellow_500_primary">#FFEB3B</color>
    <color name="md_yellow_50">#FFFDE7</color>
    <color name="md_yellow_100">#FFF9C4</color>
    <color name="md_yellow_200">#FFF59D</color>
    <color name="md_yellow_300">#FFF176</color>
    <color name="md_yellow_400">#FFEE58</color>
    <color name="md_yellow_600">#F9A825</color>
    <color name="md_yellow_700">#FBC02D</color>
    <color name="md_yellow_800">#F9A825</color>
    <color name="md_yellow_900">#F57F17</color>

    <color name="md_yellow_A100">#FFFF8D</color>
    <color name="md_yellow_A200">#FFFF00</color>
    <color name="md_yellow_A400">#FFEA00</color>
    <color name="md_yellow_A700">#FFD600</color>


    <!-- Amber -->
    <!-- light -->
    <color name="md_amber_500_primary">#FFC107</color>
    <color name="md_amber_50">#FFF8E1</color>
    <color name="md_amber_100">#FFECB3</color>
    <color name="md_amber_200">#FFE082</color>
    <color name="md_amber_300">#FFD54F</color>
    <color name="md_amber_400">#FFCA28</color>
    <color name="md_amber_600">#FFB300</color>
    <color name="md_amber_700">#FFA000</color>
    <color name="md_amber_800">#FF8F00</color>
    <color name="md_amber_900">#FF6F00</color>

    <color name="md_amber_A100">#FFE57F</color>
    <color name="md_amber_A200">#FFD740</color>
    <color name="md_amber_A400">#FFC400</color>
    <color name="md_amber_A700">#FFAB00</color>


    <!-- ORANGE -->
    <!-- light -->
    <color name="md_orange_500_primary">#FF9800</color>
    <color name="md_orange_50">#FFF3E0</color>
    <color name="md_orange_100">#FFE0B2</color>
    <color name="md_orange_200">#FFCC80</color>
    <color name="md_orange_300">#FFB74D</color>
    <color name="md_orange_400">#FFA726</color>
    <color name="md_orange_600">#FB8C00</color>
    <color name="md_orange_700">#F57C00</color>
    <!-- dark -->
    <color name="md_orange_800">#EF6C00</color>
    <color name="md_orange_900">#E65100</color>

    <!-- light -->
    <color name="md_orange_A100">#FFD180</color>
    <color name="md_orange_A200">#FFAB40</color>
    <color name="md_orange_A400">#FF9100</color>
    <color name="md_orange_A700">#FF6D00</color>


    <!-- DEEP ORANGE-->
    <!-- dark -->
    <color name="md_deep_orange_500_primary">#FF5722</color>
    <!-- light -->
    <color name="md_deep_orange_50">#FBE9E7</color>
    <color name="md_deep_orange_100">#FFCCBC</color>
    <color name="md_deep_orange_200">#FFAB91</color>
    <color name="md_deep_orange_300">#FF8A65</color>
    <color name="md_deep_orange_400">#FF7043</color>
    <!-- dark -->
    <color name="md_deep_orange_600">#F4511E</color>
    <color name="md_deep_orange_700">#E64A19</color>
    <color name="md_deep_orange_800">#D84315</color>
    <color name="md_deep_orange_900">#BF360C</color>

    <color name="md_deep_orange_A100">#FF9E80</color>
    <color name="md_deep_orange_A200">#FF6E40</color>
    <!-- light -->
    <color name="md_deep_orange_A400">#FF3D00</color>
    <color name="md_deep_orange_A700">#DD2C00</color>


    <!-- BROWN -->
    <!-- dark -->
    <color name="md_brown_500_primary">#795548</color>
    <!-- light -->
    <color name="md_brown_50">#EFEBE9</color>
    <color name="md_brown_100">#D7CCC8</color>
    <color name="md_brown_200">#BCAAA4</color>
    <!-- dark -->
    <color name="md_brown_300">#A1887F</color>
    <color name="md_brown_400">#8D6E63</color>
    <color name="md_brown_600">#6D4C41</color>
    <color name="md_brown_700">#5D4037</color>
    <color name="md_brown_800">#4E342E</color>
    <color name="md_brown_900">#3E2723</color>

    <!-- GREY -->
    <!-- light -->
    <color name="md_grey_500_primary">#9E9E9E</color>
    <color name="md_grey_50">#FAFAFA</color>
    <color name="md_grey_100">#F5F5F5</color>
    <color name="md_grey_200">#EEEEEE</color>
    <color name="md_grey_300">#E0E0E0</color>
    <color name="md_grey_400">#BDBDBD</color>
    <!-- dark -->
    <color name="md_grey_600">#757575</color>
    <color name="md_grey_700">#616161</color>
    <color name="md_grey_800">#424242</color>
    <color name="md_grey_900">#212121</color>


    <!-- BLUE GRAY -->
    <!-- dark -->
    <color name="md_blue_grey_500_primary">#607D8B</color>
    <!-- light -->
    <color name="md_blue_grey_50">#ECEFF1</color>
    <color name="md_blue_grey_100">#CFD8DC</color>
    <color name="md_blue_grey_200">#B0BEC5</color>
    <color name="md_blue_grey_300">#90A4AE</color>
    <!-- dark -->
    <color name="md_blue_grey_400">#78909C</color>
    <color name="md_blue_grey_600">#546E7A</color>
    <color name="md_blue_grey_700">#455A64</color>
    <color name="md_blue_grey_800">#37474F</color>
    <color name="md_blue_grey_900">#263238</color>

    <color name="md_black">#000000</color>
    <color name="md_white">#FFFFFF</color>

</resources>

Read More !