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
fun quizRoute(quiz: Quiz): String{ | |
val json = Uri.encode(Gson().toJson(quiz)) | |
return "$QUIZ_ROUTE/$json" | |
} |
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
clickEvent = { quiz -> | |
val route = ScreenRoutes.quizRoute(quiz) | |
navController.navigate(route) | |
} |
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
private static String getVersionName() { | |
String versionName = "$System.env.ANDROID_VERSION_NAME" | |
if (versionName == null || versionName.isEmpty()) { | |
int versionCode = getVersionCode() | |
return "1.0.$versionCode" | |
} else { | |
return versionName | |
} | |
} |
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
private static Properties loadProperties(Project rootProject) { | |
def keystoreProperties = new Properties() | |
// load your keystore.properties file into e keystoreProperties object. | |
try { | |
def keystorePropertiesFile = rootProject.file("keystore.properties") | |
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | |
} catch(FileNotFoundException exception){ | |
println(exception.message) | |
println("-------") |
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 { | |
compileSdk 31 | |
defaultConfig { | |
applicationId "com.matematicasimples" | |
minSdk 23 | |
targetSdk 30 | |
versionCode getVersionCode() | |
versionName getVersionName() |
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
ComposableFunction() { | |
DisposableEffect(Unit) { | |
typingTimer = TypingTimer().apply { | |
setup( | |
baseMessage = welcomingMessage, | |
finishCallback = { showFooter = true }, | |
currentMessageUpdateCallback = { | |
// here if you are using viewbinding it could be textView.text = currentMessage | |
currentMessage = it | |
} |
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
import express, { Request, Response, NextFunction } from "express"; | |
require('express-async-errors'); | |
import { historyRoutes } from "./routes/history.routes"; | |
const app = express(); | |
app.use(express.json()); | |
app.use("/history", historyRoutes); |
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
import { Router } from "express"; | |
import { CreateNewHistoricEntryController } from "../../controllers/CreateNewHistoricEntryController"; | |
const historyRoutes = Router(); | |
const createNewHistoricEntryController = new CreateNewHistoricEntryController(); | |
historyRoutes.post("/historic", createNewHistoricEntryController.handle); | |
export { historyRoutes }; |