This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
splits { | |
abi { | |
def isReleaseBuild = false | |
gradle.startParameter.taskNames.find { | |
// Enable split for release builds in different build flavors | |
// (assemblePaidRelease, assembleFreeRelease, etc.). | |
if (it ==~ /:app:assemble.*Release/) { | |
isReleaseBuild = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.android.build.OutputFile | |
android { | |
splits { | |
//... | |
} | |
// Map for the version code that gives each ABI a value. | |
def abiCodes = ['x86':1, 'x86_64':2, 'armeabi-v7a':3, 'arm64-v8a':4] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
universal: 1, 2, 3 | |
x86: 100001, 100002, 100003 | |
x86_64: 200001, 200002, 200003 | |
armeabi-v7a: 300001, 300002, 300003 | |
arm64-v8a: 400001, 400002, 400003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bintray.user=USERNAME | |
bintray.apikey=API_KEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:3.3.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
ext { | |
// repo name which you created | |
bintrayRepo = 'maven' | |
//project name | |
bintrayName = 'InstagramPostViewAndroid' | |
//enter your package name | |
publishedGroupId = 'in.androidhunt.instapost' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Construct a request for phone numbers and show the picker | |
private void requestHint() { | |
HintRequest hintRequest = new HintRequest.Builder() | |
.setPhoneNumberIdentifierSupported(true) | |
.build(); | |
PendingIntent intent = Auth.CredentialsApi.getHintPickerIntent( | |
apiClient, hintRequest); | |
startIntentSenderForResult(intent.getIntentSender(), | |
RESOLVE_HINT, null, 0, 0, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get an instance of SmsRetrieverClient, used to start listening for a matching | |
// SMS message. | |
SmsRetrieverClient client = SmsRetriever.getClient(this /* context */); | |
// Starts SmsRetriever, which waits for ONE matching SMS message until timeout | |
// (5 minutes). The matching SMS message will be sent via a Broadcast Intent with | |
// action SmsRetriever#SMS_RETRIEVED_ACTION. | |
Task<Void> task = client.startSmsRetriever(); | |
// Listen for success/failure of the start Task. If in a background thread, this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BroadcastReceiver to wait for SMS messages. This can be registered either | |
* in the AndroidManifest or at runtime. Should filter Intents on | |
* SmsRetriever.SMS_RETRIEVED_ACTION. | |
*/ | |
public class MySMSBroadcastReceiver extends BroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
if (SmsRetriever.SMS_RETRIEVED_ACTION.equals(intent.getAction())) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<receiver android:name=".MySMSBroadcastReceiver" android:exported="true"> | |
<intent-filter> | |
<action android:name="com.google.android.gms.auth.api.phone.SMS_RETRIEVED"/> | |
</intent-filter> | |
</receiver> |