Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,7 @@ app.*.symbols
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
!/dev/ci/**/Gemfile.lock

# OCF Client
**/ios/Frameworks/OCFClient.framework/*
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Go-OCF Onboarding App
# plgd mobile client

## Build
- localization files
`flutter pub run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/appLocalizations.dart lib/l10n/intl_*.arb`
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28
compileSdkVersion 29

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -38,9 +38,9 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.my_app"
applicationId "dev.plgd.client"
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.my_app">
package="dev.plgd.client">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
5 changes: 3 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.my_app">
package="dev.plgd.client">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="my_app"
android:label="plgd"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand All @@ -27,4 +27,5 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
14 changes: 2 additions & 12 deletions android/app/src/main/kotlin/com/example/my_app/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.my_app
package dev.plgd.client

import androidx.annotation.NonNull
import io.flutter.embedding.android.FlutterActivity
Expand All @@ -7,7 +7,7 @@ import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.plugin.common.MethodChannel

class MainActivity: FlutterActivity() {
private val CHANNEL = "gocf.dev/sdk"
private val CHANNEL = "plgd.dev/sdk"
private var sdkClient: ocfclient.Ocfclient_? = null;

override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
Expand All @@ -18,7 +18,6 @@ class MainActivity: FlutterActivity() {
"discover" -> this.discoverDevices(result)
"own" -> this.ownDevice(call.arguments(), result)
"onboard" -> this.onboardDevice(call.arguments(), result)
"offboard" -> this.offboardDevice(call.arguments(), result)
"disown" -> this.disownDevice(call.arguments(), result)
else -> result.notImplemented()
}
Expand Down Expand Up @@ -66,15 +65,6 @@ class MainActivity: FlutterActivity() {
}
}

private fun offboardDevice(args: Map<String,String>?, result: MethodChannel.Result) {
try {
sdkClient!!.offboardDevice(args!!["deviceID"])
result.success(Any())
} catch (e: Exception) {
result.error("-1", e.message, "")
}
}

private fun disownDevice(args: Map<String,String>?, result: MethodChannel.Result) {
try {
sdkClient!!.disownDevice(args!!["deviceID"])
Expand Down
Binary file added android/app/src/main/res/mipmap-hdpi/App-Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file added android/app/src/main/res/mipmap-mdpi/App-Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 1 addition & 1 deletion android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.my_app">
package="dev.plgd.client">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
Binary file added assets/Poppins-BoldItalic.ttf
Binary file not shown.
Binary file added assets/Poppins-ExtraBoldItalic.ttf
Binary file not shown.
52 changes: 1 addition & 51 deletions assets/logo-long.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading