Skip to main content

Posts

Showing posts with the label Android 6.0

How to know FingerPrint feature available in android? | FingerPrint Feature code too check your mobile Supported or not ?

In Android Version 6.0 Android Marshmallow FingerPrint Features Enable. So, how you code your device support or not ? How to check the FingerPrint code works or not here is the solution for the FingerPrint check is your mobile support or not ?


Google Official Announcement for Finger Print Official Documentation for Android FingerPrint API 

You know how to get all permission for FingerPrint and how to use but how to know devices support FingerPrint or not ? below is some of code which helps you to know device support or not ?



So, Let get Started for FingerPrint...

First, you have to get permission from the Manifest file..

<uses-permission android:name="android.permission.USE_FINGERPRINT"/>


Example 1
if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
    Toast.makeText(this, "Finger print not supported", Toast.LENGTH_SHORT).show();
}

Example 2
FingerprintManager fingerprintManager = (FingerprintManager) getSystemService(Context.FINGERPRINT_SE…

Floating Labels : Material Design Tips

From google material design documentation. When the user engages with the text input field, the floating inline labels move to float above the field. How to add? I. In your build.gradle add latest appcompat and design libraries. dependencies { compile 'com.android.support:appcompat-v7:X.X.X'// where X.X.X version compile 'com.android.support:design:X.X.X'// where X.X.X version} II. Make your activity extend android.support.v7.app.AppCompatActivity. publicclassMainActivityextendsAppCompatActivity{...} III. Declare your EditText inside any layout.xml file and wrap it with TextInputLayout. <android.support.design.widget.TextInputLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"><EditTextandroid:layout_width="match_parent"android:layout_height="wrap_content"android:hint="@string/Title"/></android.support.design.widget.TextInputLayout>

User Input Errors : Material Design Tips

From google material design documentation. Help users fix input errors as soon as they are detected. Disable the submission of a form if errors are detected, and if detected only after form submission, clearly explain the error and how to fix it. How to add? I. In your build.gradle add latest appcompat and design libraries. dependencies { compile 'com.android.support:appcompat-v7:X.X.X'// where X.X.X version compile 'com.android.support:design:X.X.X'// where X.X.X version} II. Make your activity extend android.support.v7.app.AppCompatActivity. publicclassMainActivityextendsAppCompatActivity{...} III. Declare your EditText inside any layout.xml file and wrap it with TextInputLayout. <android.support.design.widget.TextInputLayoutandroid:id="@+id/inputLayout"android:layout_width="match_parent"android:layout_height="wrap_content"app:errorEnabled="true"><EditTextandroid:layout_width="match_parent"android:lay…

Tabs : Material Design Tips

From google material design documentation Tabs make it easy to explore and switch between different views or functional aspects of an app or to browse categorized data sets. How to add? I. In your build.gradle add latest design and appcompat libraries. dependencies { compile 'com.android.support:appcompat-v7:X.X.X' compile 'com.android.support:design:X.X.X' compile 'com.android.support:support-v13:X.X.X'// where X.X.X version// if you want to support android sdk < 13// you need to add support library v4 instead of v13} II. Make your activity extend android.support.v7.app.AppCompatActivity. publicclassMainActivityextendsAppCompatActivity{...} III. Declare TabLayout and ViewPager in your layout.xml file. <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><android.support.design.wi…