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
data class BeforeUser( | |
val type: Type, | |
val name: String, | |
val address: String?, | |
val phoneNumber: String?, | |
val businessNumber: String?, | |
val department: String? | |
) { | |
enum class Type { | |
CUSTOMER, STORE, ADMIN |
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
sealed class User(open val name: String) { | |
data class Customer( | |
override val name: String, | |
val address: String, | |
val phoneNumber: String | |
) : User(name) | |
data class Store( | |
override val name: String, |
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
sealed class User { | |
data class Customer( | |
val name: String, | |
val address: String, | |
val phoneNumber: String | |
) : User() | |
data class Store( | |
val name: String, | |
val address: String, |
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
data class User( | |
val type: Type, | |
val name: String, | |
val address: String?, | |
val phoneNumber: String?, | |
val businessNumber: String?, | |
val department: String? | |
) { | |
enum class Type { | |
CUSTOMER, STORE, ADMIN |
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
private fun handleDeepLink() { | |
val deepLinkUri = intent.data | |
logd("deepLinkUri: $deepLinkUri") | |
val deepLinkIntent = deepLinkUri?.let { | |
DeepLinkInfo.invoke(deepLinkUri).getIntent(this, it) | |
} ?: DeepLinkInfo.getMainIntent(this) | |
if (isTaskRoot) { | |
TaskStackBuilder.create(this).apply { | |
if (needAddMainForParent(deepLinkIntent)) { | |
addNextIntentWithParentStack(DeepLinkInfo.getMainIntent(this@SchemeActivity)) |
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
private fun handleDeepLink() { | |
val deepLinkUri = intent.data | |
logd("deepLinkUri: $deepLinkUri") | |
val deepLinkIntent = deepLinkUri?.let { | |
DeepLinkInfo.invoke(deepLinkUri).getIntent(this, it) | |
} ?: DeepLinkInfo.getMainIntent(this) | |
if (isTaskRoot) { | |
TaskStackBuilder.create(this).apply { | |
addNextIntentWithParentStack(DeepLinkInfo.getMainIntent(this@SchemeActivity)) | |
addNextIntent(deepLinkIntent) |
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
enum class DeepLinkInfo(@StringRes val hostStringResId: Int) { | |
MAIN(R.string.scheme_host_main) { | |
override fun getIntent(context: Context, deepLinkUri: Uri) = | |
getMainIntent(context) | |
}, | |
DETAIL(R.string.scheme_host_detail) { | |
override fun getIntent(context: Context, deepLinkUri: Uri) = | |
DetailActivity.getIntent(context, deepLinkUri) |
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
class TedContentProvider : ContentProvider() { | |
override fun onCreate(): Boolean { | |
Log.d("ted", "TedContentProvider::onCreate") | |
val application = context as Application | |
Stetho.initializeWithDefaults(application) | |
startKoin { | |
androidContext(application) | |
} |
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
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | |
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | |
NotificationChannel notificationChannel = new NotificationChannel("channel_id", "channel_name", NotificationManager.IMPORTANCE_DEFAULT); | |
notificationChannel.setDescription("channel description"); | |
notificationChannel.enableLights(true); | |
notificationChannel.setLightColor(Color.GREEN); | |
notificationChannel.enableVibration(true); | |
notificationChannel.setVibrationPattern(new long[]{100, 200, 100, 200}); | |
notificationChannel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); | |
notificationManager.createNotificationChannel(notificationChannel); |
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.app.NotificationManager notificationManager = (android.app.NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | |
NotificationChannel channelMessage = new NotificationChannel("channel_id", "channel_name", android.app.NotificationManager.IMPORTANCE_DEFAULT); | |
channelMessage.setDescription("channel description"); | |
channelMessage.enableLights(true); | |
channelMessage.setLightColor(Color.GREEN); | |
channelMessage.enableVibration(true); | |
channelMessage.setVibrationPattern(new long[]{100, 200, 100, 200}); | |
channelMessage.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); | |
notificationManager.createNotificationChannel(channelMessage); |
NewerOlder