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 val sseClient = OkHttpClient.Builder() | |
.connectTimeout(6, TimeUnit.SECONDS) | |
.readTimeout(10, TimeUnit.MINUTES) | |
.writeTimeout(10, TimeUnit.MINUTES) | |
.build() | |
private val sseRequest = Request.Builder() | |
.url(EVENTSURL) | |
.header("Accept", "application/json") | |
.addHeader("Accept", "text/event-stream") |
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
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const cors = require('cors'); | |
const app = express(); | |
app.use(cors()); | |
app.use(bodyParser.json()); | |
app.use(bodyParser.urlencoded({extended: false})); |
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 EditTextWithError( | |
context: Context, | |
attributeSet: AttributeSet | |
):FrameLayout(context,attributeSet) { | |
private var errorText = "" | |
private var linearLayout:LinearLayout | |
private var editText:EditText | |
private var linearLayoutWidth = WRAP_CONTENT | |
private var linearLayoutHeight = WRAP_CONTENT |
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
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<corners | |
android:radius="16dp" /> | |
<stroke | |
android:color="@color/gray_light" | |
android:width="1dp"/> |
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
binding.btnGoto.setOnClickListener { | |
// Navigate to feature_01 | |
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("raystatic://multi.module.app/feat01")) | |
startActivity(intent) | |
// Navigate to feature_02 | |
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("raystatic://multi.module.app/feat02")) | |
startActivity(intent) | |
} |
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
/* Navigate to feature_01 */ | |
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("raystatic://multi.module.app/feat01")) | |
startActivity(intent) | |
/* Navigate to feature_02 */ | |
val intentFeat02 = Intent(Intent.ACTION_VIEW, Uri.parse("raystatic://multi.module.app/feat02")) | |
startActivity(intent) |
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
<intent-filter | |
android:autoVerify="true"> | |
<action android:name="android.intent.action.VIEW" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.BROWSABLE" /> | |
<data | |
android:scheme="raystatic" | |
android:host="multi.module.app"/> |
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 DefaultDeeplinkHandler constructor( | |
private val processors: Set<@JvmSuppressWildcards DeeplinkProcessor> | |
): DeeplinkHandler { | |
override fun process(deeplink: String): Boolean { | |
processors.forEach { | |
if (it.matches(deeplink)) { | |
it.execute(deeplink) | |
return 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
private fun handleIntent(intent: Intent) { | |
intent.data?.toString()?.let { | |
deeplinkHandler.process(it) | |
finish() | |
} | |
} |
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
@Module | |
@InstallIn(SingletonComponent::class) | |
interface DeepLinkProcessorModule { | |
@Binds | |
@IntoSet | |
fun bindFeat01Processors( | |
feature01DeeplinkProcessor: Feature01DeeplinkProcessor | |
): DeeplinkProcessor |
NewerOlder