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 AppModule(val application: Application) : Module() { | |
init { | |
val context = application.applicationContext | |
bind(Application::class.java).toInstance(application) | |
bind(Context::class.java).toInstance(context) | |
bind(AppConfigManager::class.java).toInstance(AppConfigManager()) | |
} | |
} |
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 App : Application() { | |
val appConfigManager: AppConfigManager by inject() | |
override fun onCreate() { | |
super.onCreate() | |
KTP.openRootScope() | |
.openSubScope(APPSCOPE) | |
.installModules(AppModule(this)) |
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
override fun equals(other: Any?): Boolean { | |
// same type | |
if (other == null || other !is Consignment) { | |
return false | |
} | |
// null id | |
return if (id == null) { | |
other.id == null |
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
apply plugin: 'com.android.application' | |
apply plugin: 'com.github.triplet.play' | |
android { | |
compileSdkVersion 28 | |
buildToolsVersion "28.0.3" | |
defaultConfig { | |
applicationId "au.com.auspost.app" | |
minSdkVersion 28 |
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
#!/bin/bash | |
# Script which handles starting the UI build container, then building the UI inside of it. | |
# This expects to be run from a bamboo task, hence the $bamboo_X variables. Set these locally if you want to run it locally. | |
# Call it with no args to start the container | |
# Call it with 'build' to run the build, test, and upload process | |
set -euo pipefail | |
echo "Starting build now" | |
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 | |
} | |
} |
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
@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
"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
<?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> |