This file contains hidden or 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=".GeoFenceOnBootCompleteReceiver"> | |
<intent-filter> | |
<action android:name="android.intent.action.BOOT_COMPLETED" /> | |
</intent-filter> | |
</receiver> |
This file contains hidden or 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 { | |
compileSdkVersion 'android-27' | |
buildToolsVersion '27.0.3' | |
defaultConfig { | |
minSdkVersion 18 | |
targetSdkVersion 27 | |
} | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<resources xmlns:android="http://schemas.android.com/apk/res/android"> | |
<style name="AP.Widget.EditText" parent="Widget.AppCompat.EditText"> | |
<item name="android:textAppearance"> | |
@style/AP.TextAppearance.AppCompat.Input.Value | |
</item> | |
<item name="android:textColor">@color/AP_P_Grey</item> | |
<item name="android:importantForAutofill"> | |
noExcludeDescendants | |
</item> |
This file contains hidden or 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.support.design.widget.TextInputLayout | |
android:id="@+id/textEmailLayout" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:hint="@string/email_address" | |
android:labelFor="@+id/textEmail"> | |
<EditText android:id="@+id/textEmail" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:cursorVisible="true" |
This file contains hidden or 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
Intent intent = new Intent(FENCE_RECEIVER_ACTION); | |
intent.setClass(context, GeoFenceAwarenessReceiver.class); | |
// Creates pending intent to handle geo fence event | |
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, FENCE_REQUEST_CODE, intent, 0); |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | |
<background android:drawable="@color/primary"/> | |
<foreground android:drawable="@drawable/ic_icon_foreground"/> | |
</adaptive-icon> |
This file contains hidden or 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
"pushNotificationSettings":[ | |
{ | |
"groupId":"Deliveries", | |
"groupName":"Deliveries", | |
"channels":[ | |
{ | |
"channelId":"1_ON_MATCH_PUSH", | |
"templateName":"ON_MATCH_PUSH", | |
"channelName":"Added to track list", | |
"importance":3 |
This file contains hidden or 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
@TargetApi(Build.VERSION_CODES.O) | |
private void createNotificationChannels(AppConfig config) { | |
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && | |
config.getChannelGroups()!= null) { | |
for (AppConfig.ChannelGroup cg: config.getChannelGroups()) { | |
NotificationChannelGroup ncg = | |
new NotificationChannelGroup(cg.groupId, cg.groupName); | |
notificationManager.createNotificationChannelGroup(ncg); | |
for (AppConfig.Channel channel : cg.channels) { |
This file contains hidden or 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
notificationBuilder = new NotificationCompat.Builder(context, channelId) | |
.setSmallIcon(icon) | |
.setContentTitle(title) | |
.setContentText(message) | |
.setStyle(new NotificationCompat.BigTextStyle().bigText(message)) | |
.setAutoCancel(autoCancel) | |
.setSound(defaultSoundUri) | |
.setContentIntent(contentAction.actionIntent); |
This file contains hidden or 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
class NonEqualWrapper<T>(var content: T?) { | |
override fun hashCode(): Int { | |
return content.hashCode() | |
} | |
override fun equals(other: Any?): Boolean { | |
return false | |
} | |
} |