Skip to main content

Posts

Showing posts from May, 2019

How to Capture or Upload Image from Gallery using File Provider

We often Pick images from Gallery to upload in android app but sometime when tried in Android version greater than Marshmallow it throw an error that it does not have permission to Uri. So here i am telling you how to use concept of File provider in Android Version after Android Marshmallow .So lets Start from beginning :- Step 1: in AndroidManifest.xml add these Permissions <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> Step 2: in Same AndroidManifest.xml file add  <provider             android:name="android.support.v4.content.FileProvider"             android:authorities="${applicationId}.provider"             android:exported="false"             android:grantUriPermissions="true">             <meta-data                 an

How to Integrate Auto SMS detect API in Android

Here i am sharing an important android Github library that use for integrate Auto SMS detect for your android application .So let's start from beginning :- Step 1: Download via Gradle:    compile 'com.github.stfalcon:smsverifycatcher:0.3.2' or Maven: <dependency>   <groupId>com.github.stfalcon</groupId>   <artifactId>smsverifycatcher</artifactId>   <version>0.3.2</version>   <type>pom</type> </dependency> Step 2: Add permissions to AndroidManifest.xml: <uses-permission android:name="android.permission.RECEIVE_SMS" />   <uses-permission android:name="android.permission.READ_SMS" /> Step 3: smsVerifyCatcher = new SmsVerifyCatcher(this, new OnSmsCatchListener<String>() { @Override public void onSmsCatch(String message) { String code = parseCode(message);//Parse verification code otp.setText(code); //set cod