aboutsummaryrefslogtreecommitdiff
path: root/android/app
diff options
context:
space:
mode:
Diffstat (limited to 'android/app')
-rw-r--r--android/app/build.gradle5
-rw-r--r--android/app/src/debug/AndroidManifest.xml2
-rw-r--r--android/app/src/main/AndroidManifest.xml3
-rw-r--r--android/app/src/main/kotlin/com/davidpenkowoj/kulinar_app/MainActivity.kt49
-rw-r--r--android/app/src/main/kotlin/com/example/kulinar_app/MainActivity.kt44
-rw-r--r--android/app/src/profile/AndroidManifest.xml2
6 files changed, 49 insertions, 56 deletions
diff --git a/android/app/build.gradle b/android/app/build.gradle
index b2b235a..d942904 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -32,7 +32,7 @@ if (keystorePropertiesFile.exists()) {
}
android {
- compileSdkVersion 33 // flutter.compileSdkVersion
+ compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
@@ -51,7 +51,7 @@ android {
defaultConfig {
applicationId "com.davidpenkowoj.kulinar_app"
// You can update the following values to match your application needs.
- // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
@@ -66,6 +66,7 @@ android {
storePassword keystoreProperties['storePassword']
}
}
+
buildTypes {
release {
signingConfig signingConfigs.release
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
index 457869c..b701ebb 100644
--- a/android/app/src/debug/AndroidManifest.xml
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.example.kulinar_app">
+ package="com.davidpenkowoj.kulinar_app">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 1ff467b..df27405 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,7 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.example.kulinar_app">
+ package="com.davidpenkowoj.kulinar_app">
- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
diff --git a/android/app/src/main/kotlin/com/davidpenkowoj/kulinar_app/MainActivity.kt b/android/app/src/main/kotlin/com/davidpenkowoj/kulinar_app/MainActivity.kt
index a839c73..a237b5d 100644
--- a/android/app/src/main/kotlin/com/davidpenkowoj/kulinar_app/MainActivity.kt
+++ b/android/app/src/main/kotlin/com/davidpenkowoj/kulinar_app/MainActivity.kt
@@ -1,7 +1,44 @@
-package com.davidpenkowoj.kulinar_app
+package com.davidpenkowoj.kulinar_app
-import io.flutter.embedding.android.FlutterActivity
-
-class MainActivity: FlutterActivity() {
-}
- \ No newline at end of file
+import io.flutter.embedding.android.FlutterActivity
+import android.content.Intent
+import android.os.Bundle
+import androidx.annotation.NonNull
+import io.flutter.embedding.engine.FlutterEngine
+import io.flutter.plugin.common.MethodChannel
+import io.flutter.plugins.GeneratedPluginRegistrant
+
+class MainActivity : FlutterActivity() {
+ private val CHANNEL = "com.davidpenkowoj.kulinar.openfile"
+
+ var openPath: String? = null
+ override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
+ GeneratedPluginRegistrant.registerWith(flutterEngine)
+ val channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
+ channel.setMethodCallHandler { call, result ->
+ when (call.method) {
+ "getOpenFileUrl" -> {
+ result.success(openPath)
+ }
+ else -> result.notImplemented()
+ }
+ }
+ }
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ handleOpenFileUrl(intent)
+ }
+
+ override fun onNewIntent(intent: Intent) {
+ super.onNewIntent(intent)
+ handleOpenFileUrl(intent)
+ }
+
+ private fun handleOpenFileUrl(intent: Intent?) {
+ val path = intent?.data?.path
+ if (path != null) {
+ openPath = path
+ }
+ }
+}
diff --git a/android/app/src/main/kotlin/com/example/kulinar_app/MainActivity.kt b/android/app/src/main/kotlin/com/example/kulinar_app/MainActivity.kt
deleted file mode 100644
index 9f76b6f..0000000
--- a/android/app/src/main/kotlin/com/example/kulinar_app/MainActivity.kt
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.example.kulinar_app
-
-import io.flutter.embedding.android.FlutterActivity
-import android.content.Intent
-import android.os.Bundle
-import androidx.annotation.NonNull
-import io.flutter.embedding.engine.FlutterEngine
-import io.flutter.plugin.common.MethodChannel
-import io.flutter.plugins.GeneratedPluginRegistrant
-
-class MainActivity : FlutterActivity() {
- private val CHANNEL = "com.davidpenkowoj.kulinar.openfile"
-
- var openPath: String? = null
- override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
- GeneratedPluginRegistrant.registerWith(flutterEngine)
- val channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
- channel.setMethodCallHandler { call, result ->
- when (call.method) {
- "getOpenFileUrl" -> {
- result.success(openPath)
- }
- else -> result.notImplemented()
- }
- }
- }
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- handleOpenFileUrl(intent)
- }
-
- override fun onNewIntent(intent: Intent) {
- super.onNewIntent(intent)
- handleOpenFileUrl(intent)
- }
-
- private fun handleOpenFileUrl(intent: Intent?) {
- val path = intent?.data?.path
- if (path != null) {
- openPath = path
- }
- }
-}
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
index 457869c..b701ebb 100644
--- a/android/app/src/profile/AndroidManifest.xml
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.example.kulinar_app">
+ package="com.davidpenkowoj.kulinar_app">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.