Merge branch 'pharmacy' into pharmacy-Fatima
# Conflicts: # lib/locator.dart # lib/pages/pharmacies/screens/pharmacy_module_page.dart # lib/pages/pharmacy/profile/profile.dartmerge-requests/249/head
@ -1,9 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\fs24 \cf0 keyPassword=HmGsa123\
|
||||
storePassword=HmGsa123}
|
||||
@ -1,11 +1,23 @@
|
||||
package com.cloud.diplomaticquarterapp
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.annotation.NonNull;
|
||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||
import com.cloud.diplomaticquarterapp.utils.FlutterText
|
||||
import com.cloud.diplomaticquarterapp.utils.PlatformBridge
|
||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant
|
||||
|
||||
class MainActivity: FlutterFragmentActivity() {
|
||||
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
|
||||
GeneratedPluginRegistrant.registerWith(flutterEngine);
|
||||
}
|
||||
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
|
||||
GeneratedPluginRegistrant.registerWith(flutterEngine);
|
||||
// Create Flutter Platform Bridge
|
||||
PlatformBridge(flutterEngine.dartExecutor.binaryMessenger, this).create()
|
||||
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.cloud.diplomaticquarterapp.geofence
|
||||
|
||||
import com.google.android.gms.location.Geofence
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
|
||||
class GeoZoneModel {
|
||||
var GEOF_ID:Int = 0
|
||||
var Radius:Int = 0
|
||||
var Type:Int = 0
|
||||
var ProjectID:Int = 0
|
||||
|
||||
var Description:String? = null
|
||||
var DescriptionN:String? = null
|
||||
var Latitude:String? = null
|
||||
var Longitude:String? = null
|
||||
var ImageURL:String? = null
|
||||
var IsCity:String? = null
|
||||
|
||||
fun identifier():String{
|
||||
return "$GEOF_ID" + "_hmg"
|
||||
}
|
||||
|
||||
fun message():String{
|
||||
return Description ?: "nil"
|
||||
}
|
||||
|
||||
fun listFrom(jsonString: String) : List<GeoZoneModel>{
|
||||
val type = object : TypeToken<List<GeoZoneModel?>?>() {}.getType()
|
||||
return Gson().fromJson(jsonString, type)
|
||||
}
|
||||
|
||||
fun toGeofence() : Geofence?{
|
||||
if (!Latitude.isNullOrEmpty() && !Longitude.isNullOrEmpty() && Radius > 50) {
|
||||
val lat = Latitude!!.trim().toDoubleOrNull()
|
||||
val long = Longitude!!.trim().toDoubleOrNull()
|
||||
val rad = Radius.toFloat()
|
||||
if(lat != null && long != null){
|
||||
|
||||
return Geofence.Builder()
|
||||
.setRequestId(identifier())
|
||||
.setCircularRegion(
|
||||
lat,
|
||||
long,
|
||||
rad
|
||||
)
|
||||
.setTransitionTypes(GeofenceTransition.ENTER_EXIT.value)
|
||||
// .setNotificationResponsiveness(0)
|
||||
.setExpirationDuration(Geofence.NEVER_EXPIRE)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
package com.cloud.diplomaticquarterapp.geofence
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
|
||||
class GeofenceBroadcastReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
GeofenceTransitionsJobIntentService.enqueueWork(context, intent)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
|
||||
|
||||
package com.cloud.diplomaticquarterapp.geofence
|
||||
|
||||
import android.content.Context
|
||||
import com.cloud.diplomaticquarterapp.R
|
||||
import com.google.android.gms.common.api.ApiException
|
||||
import com.google.android.gms.location.GeofenceStatusCodes
|
||||
|
||||
object GeofenceErrorMessages {
|
||||
fun getErrorString(context: Context, e: Exception): String {
|
||||
return if (e is ApiException) {
|
||||
getErrorString(context, e.statusCode)
|
||||
} else {
|
||||
context.resources.getString(R.string.geofence_unknown_error)
|
||||
}
|
||||
}
|
||||
|
||||
fun getErrorString(context: Context, errorCode: Int): String {
|
||||
val resources = context.resources
|
||||
return when (errorCode) {
|
||||
GeofenceStatusCodes.GEOFENCE_NOT_AVAILABLE ->
|
||||
resources.getString(R.string.geofence_not_available)
|
||||
|
||||
GeofenceStatusCodes.GEOFENCE_TOO_MANY_GEOFENCES ->
|
||||
resources.getString(R.string.geofence_too_many_geofences)
|
||||
|
||||
GeofenceStatusCodes.GEOFENCE_TOO_MANY_PENDING_INTENTS ->
|
||||
resources.getString(R.string.geofence_too_many_pending_intents)
|
||||
|
||||
else -> resources.getString(R.string.geofence_unknown_error)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Razeware LLC
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Notwithstanding the foregoing, you may not use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, create a derivative work, and/or sell copies of the
|
||||
* Software in any work that is designed, intended, or marketed for pedagogical or
|
||||
* instructional purposes related to programming, coding, application development,
|
||||
* or information technology. Permission for such use, copying, modification,
|
||||
* merger, publication, distribution, sublicensing, creation of derivative works,
|
||||
* or sale is expressly withheld.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package com.cloud.diplomaticquarterapp.geofence
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.location.Location
|
||||
import android.util.Log
|
||||
import androidx.core.app.JobIntentService
|
||||
import com.cloud.diplomaticquarterapp.utils.API
|
||||
import com.cloud.diplomaticquarterapp.utils.httpPost
|
||||
import com.cloud.diplomaticquarterapp.utils.sendNotification
|
||||
import com.github.kittinunf.fuel.core.extensions.jsonBody
|
||||
import com.github.kittinunf.fuel.core.isSuccessful
|
||||
import com.github.kittinunf.fuel.httpPost
|
||||
import com.google.android.gms.location.Geofence
|
||||
import com.google.android.gms.location.GeofencingEvent
|
||||
import com.google.gson.Gson
|
||||
|
||||
class GeofenceTransitionsJobIntentService : JobIntentService() {
|
||||
|
||||
companion object {
|
||||
private const val LOG_TAG = "GeoTrIntentService"
|
||||
|
||||
private const val JOB_ID = 573
|
||||
|
||||
fun enqueueWork(context: Context, intent: Intent) {
|
||||
enqueueWork(
|
||||
context,
|
||||
GeofenceTransitionsJobIntentService::class.java, JOB_ID,
|
||||
intent)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onHandleWork(intent: Intent) {
|
||||
val geofencingEvent = GeofencingEvent.fromIntent(intent)
|
||||
if (geofencingEvent.hasError()) {
|
||||
val errorMessage = GeofenceErrorMessages.getErrorString(this, geofencingEvent.errorCode)
|
||||
Log.e(LOG_TAG, errorMessage)
|
||||
return
|
||||
}
|
||||
|
||||
if (geofencingEvent.geofenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER || geofencingEvent.geofenceTransition == Geofence.GEOFENCE_TRANSITION_EXIT) {
|
||||
handleEvent(geofencingEvent.triggeringGeofences,geofencingEvent.triggeringLocation, GeofenceTransition.fromInt(geofencingEvent.geofenceTransition));
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleEvent(triggerGeofences: List<Geofence>, location:Location, transition:GeofenceTransition) {
|
||||
val hmg = HMG_Geofence.shared(this)
|
||||
hmg.getPatientID()?.let { patientId ->
|
||||
|
||||
hmg.getActiveGeofences({ activeGeofences ->
|
||||
|
||||
triggerGeofences.forEach { geofence ->
|
||||
// Extract PointID from 'geofence.requestId' and find from active geofences
|
||||
val pointID = activeGeofences.firstOrNull {it == geofence.requestId}?.split('_')?.first()
|
||||
if(!pointID.isNullOrEmpty() && pointID.toIntOrNull() != null){
|
||||
|
||||
val body = mapOf(
|
||||
"PointsID" to pointID.toIntOrNull(),
|
||||
"GeoType" to transition.value,
|
||||
"PatientID" to patientId
|
||||
)
|
||||
|
||||
httpPost<Map<String,Any>>(API.LOG_GEOFENCE, body, { response ->
|
||||
sendNotification(this, transition.named(), geofence.requestId, "Notified to server.😎")
|
||||
},{ exception ->
|
||||
sendNotification(this, transition.named(), geofence.requestId, "Failed to notify server.😔")
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
},null)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
package com.cloud.diplomaticquarterapp.geofence
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Handler
|
||||
import android.os.Message
|
||||
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
|
||||
import com.cloud.diplomaticquarterapp.utils.HMGUtils
|
||||
|
||||
class GeofencingRebootBroadcastReceiver : BroadcastReceiver(){
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
|
||||
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.action)) {
|
||||
val pref = context.getSharedPreferences(PREFS_STORAGE, Context.MODE_PRIVATE)
|
||||
pref.edit().putString("REBOOT_DETECTED","YES").apply()
|
||||
|
||||
HMG_Geofence.shared(context).unRegisterAll { status, exception ->
|
||||
val geoZones = HMGUtils.getGeoZonesFromPreference(context)
|
||||
HMG_Geofence.shared(context).register(geoZones)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,165 @@
|
||||
package com.cloud.diplomaticquarterapp.geofence
|
||||
|
||||
import android.Manifest
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.SharedPreferences
|
||||
import android.content.pm.PackageManager
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.google.android.gms.location.Geofence
|
||||
import com.google.android.gms.location.GeofencingClient
|
||||
import com.google.android.gms.location.GeofencingRequest
|
||||
import com.google.android.gms.location.LocationServices
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
|
||||
enum class GeofenceTransition(val value: Int) {
|
||||
ENTER(1),
|
||||
EXIT(2),
|
||||
ENTER_EXIT((ENTER.value or EXIT.value)),
|
||||
DWELL(4);
|
||||
|
||||
companion object {
|
||||
fun fromInt(value: Int) = GeofenceTransition.values().first { it.value == value }
|
||||
}
|
||||
|
||||
fun named():String{
|
||||
if (value == 1)return "Enter"
|
||||
if (value == 2)return "Exit"
|
||||
if (value == (ENTER.value or EXIT.value))return "Enter or Exit"
|
||||
if (value == 4)return "dWell"
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
const val PREFS_STORAGE = "FlutterSharedPreferences"
|
||||
const val PREF_KEY_SUCCESS = "HMG_GEOFENCE_SUCCESS"
|
||||
const val PREF_KEY_FAILED = "HMG_GEOFENCE_FAILED"
|
||||
const val PREF_KEY_HMG_ZONES = "flutter.hmg-geo-fences"
|
||||
|
||||
class HMG_Geofence {
|
||||
// https://developer.android.com/training/location/geofencing#java
|
||||
|
||||
private lateinit var context: Context
|
||||
private lateinit var preferences:SharedPreferences
|
||||
private val gson = Gson()
|
||||
|
||||
private lateinit var geofencingClient:GeofencingClient
|
||||
private val geofencePendingIntent: PendingIntent by lazy {
|
||||
val intent = Intent(context, GeofenceBroadcastReceiver::class.java)
|
||||
PendingIntent.getBroadcast(
|
||||
context,
|
||||
0,
|
||||
intent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
}
|
||||
|
||||
companion object{
|
||||
|
||||
var instance: HMG_Geofence? = null
|
||||
fun shared(context: Context) : HMG_Geofence {
|
||||
if (instance == null) {
|
||||
instance = HMG_Geofence()
|
||||
instance?.context = context
|
||||
instance?.geofencingClient = LocationServices.getGeofencingClient(context)
|
||||
instance?.preferences = context.getSharedPreferences(PREFS_STORAGE, Context.MODE_PRIVATE)
|
||||
}
|
||||
return instance!!
|
||||
}
|
||||
}
|
||||
|
||||
fun register(geoZones: List<GeoZoneModel>){
|
||||
if (geoZones.isEmpty())
|
||||
return
|
||||
|
||||
fun buildGeofencingRequest(geofences: List<Geofence>): GeofencingRequest {
|
||||
return GeofencingRequest.Builder()
|
||||
.setInitialTrigger(0)
|
||||
.addGeofences(geofences)
|
||||
.build()
|
||||
}
|
||||
|
||||
getActiveGeofences({ active ->
|
||||
|
||||
val geofences = mutableListOf<Geofence>()
|
||||
geoZones.forEach {
|
||||
it.toGeofence()?.let { geof ->
|
||||
if(!active.contains(geof.requestId)){ // if not already registered then register
|
||||
geofences.add(geof)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (checkPermission() && geofences.isNotEmpty()) {
|
||||
geofencingClient
|
||||
.addGeofences(buildGeofencingRequest(geofences), geofencePendingIntent)
|
||||
.addOnSuccessListener {
|
||||
saveActiveGeofence(geofences.map { it.requestId }, listOf())
|
||||
}
|
||||
.addOnFailureListener {
|
||||
print(it.localizedMessage)
|
||||
}
|
||||
}
|
||||
},null)
|
||||
}
|
||||
|
||||
fun unRegisterAll(completion: (status: Boolean, exception:Exception?) -> Unit){
|
||||
getActiveGeofences({ success ->
|
||||
val mList = success.toMutableList()
|
||||
mList.add("12345")
|
||||
geofencingClient
|
||||
.removeGeofences(success)
|
||||
.addOnSuccessListener {
|
||||
completion(true, null)
|
||||
}
|
||||
.addOnFailureListener {
|
||||
completion(false, it)
|
||||
}
|
||||
removeActiveGeofences()
|
||||
}, { failed ->
|
||||
// Nothing to do with failed geofences.
|
||||
})
|
||||
}
|
||||
|
||||
fun saveActiveGeofence(success: List<String>, failed: List<String>){
|
||||
val jsonSuccess = gson.toJson(success)
|
||||
val jsonFailure = gson.toJson(failed)
|
||||
preferences.edit().putString(PREF_KEY_SUCCESS, jsonSuccess).apply()
|
||||
preferences.edit().putString(PREF_KEY_FAILED, jsonFailure).apply()
|
||||
}
|
||||
|
||||
fun removeActiveGeofences(){
|
||||
preferences.edit().putString(PREF_KEY_SUCCESS,"[]").apply()
|
||||
preferences.edit().putString(PREF_KEY_FAILED,"[]").apply()
|
||||
}
|
||||
|
||||
fun getActiveGeofences(success: (success: List<String>) -> Unit, failure: ((failed: List<String>) -> Unit)?){
|
||||
val type = object : TypeToken<List<String?>?>() {}.type
|
||||
|
||||
val jsonSuccess = preferences.getString(PREF_KEY_SUCCESS, "[]")
|
||||
val success = gson.fromJson<List<String>>(jsonSuccess, type)
|
||||
success(success)
|
||||
|
||||
if(failure != null){
|
||||
val jsonFailure = preferences.getString(PREF_KEY_FAILED, "[]")
|
||||
val failed = gson.fromJson<List<String>>(jsonFailure, type)
|
||||
failure(failed)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun checkPermission() : Boolean{
|
||||
return ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED
|
||||
}
|
||||
|
||||
fun getPatientID():Int?{
|
||||
val profileJson = preferences.getString("flutter.imei-user-data", "{}")
|
||||
val type = object : TypeToken<Map<String?, Any?>?>() {}.type
|
||||
return gson.fromJson<Map<String?, Any?>?>(profileJson,type)
|
||||
?.get("PatientID")
|
||||
.toString()
|
||||
.toDoubleOrNull()
|
||||
?.toInt()
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,172 @@
|
||||
package com.cloud.diplomaticquarterapp.hmgwifi
|
||||
|
||||
import android.content.Context
|
||||
import android.net.ConnectivityManager
|
||||
import android.net.wifi.WifiConfiguration
|
||||
import android.net.wifi.WifiInfo
|
||||
import android.net.wifi.WifiManager
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import com.cloud.diplomaticquarterapp.MainActivity
|
||||
import com.cloud.diplomaticquarterapp.utils.FlutterText
|
||||
import com.cloud.diplomaticquarterapp.utils.HMGUtils
|
||||
|
||||
|
||||
class HMG_Guest(context: MainActivity) {
|
||||
private var wifiManager: WifiManager? = context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager?
|
||||
private var connectivityManager: ConnectivityManager? = context.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager?
|
||||
private var context = context
|
||||
|
||||
private val TAG = "HMG_Guest"
|
||||
private val TEST = false
|
||||
private var SSID = """"HMG-MobileApp""""
|
||||
|
||||
private lateinit var completionListener: ((status: Boolean, message: String) -> Unit)
|
||||
|
||||
fun completionOnUiThread(status: Boolean, message: String){
|
||||
completionListener(status, message)
|
||||
}
|
||||
|
||||
/*
|
||||
* Helpful:
|
||||
* http://stackoverflow.com/questions/8818290/how-to-connect-to-a-specific-wifi-network-in-android-programmatically
|
||||
*/
|
||||
fun connectToHMGGuestNetwork(completion: (status: Boolean, message: String) -> Unit) {
|
||||
wifiManager?.let { wm ->
|
||||
completionListener = completion
|
||||
|
||||
if (!wm.isWifiEnabled){
|
||||
wm.isWifiEnabled = true
|
||||
HMGUtils.popFlutterText(context,"enablingWifi");
|
||||
HMGUtils.timer(2000,false){
|
||||
connect()
|
||||
}
|
||||
}else{
|
||||
connect()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private fun connect(){
|
||||
val security = "OPEN"
|
||||
val networkPass = ""
|
||||
Log.d(TAG, "Connecting to SSID \"$SSID\" with password \"$networkPass\" and with security \"$security\" ...")
|
||||
|
||||
// You need to create WifiConfiguration instance like this:
|
||||
val conf = WifiConfiguration()
|
||||
conf.SSID = SSID
|
||||
conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE)
|
||||
conf.networkId = ssidToNetworkId(SSID)
|
||||
|
||||
val wm = wifiManager!!
|
||||
|
||||
if (conf.networkId == -1) {
|
||||
wm.addNetwork(conf)
|
||||
} else {
|
||||
Log.v(TAG, "WiFi found - updating it.\n")
|
||||
wm.updateNetwork(conf)
|
||||
}
|
||||
|
||||
conf.networkId = ssidToNetworkId(SSID)
|
||||
Log.d(TAG, "Network ID: ${conf.networkId}")
|
||||
|
||||
val networkIdToConnect = conf.networkId
|
||||
if (networkIdToConnect >= 0) {
|
||||
Log.v(TAG, "Start connecting to $SSID Wifi...")
|
||||
|
||||
// We disable the network before connecting, because if this was the last connection before
|
||||
// a disconnect(), this will not reconnect.
|
||||
wm.disableNetwork(networkIdToConnect)
|
||||
val result = wm.enableNetwork(networkIdToConnect, true)
|
||||
if(result){
|
||||
HMGUtils.timer(8000,false){
|
||||
if(wm.getConnectionInfo().getSSID() == SSID){
|
||||
completionOnUiThread(true, "successConnectingHmgNetwork")
|
||||
|
||||
}else{
|
||||
errorConnecting()
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
errorConnecting()
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
Log.v(TAG, "Cannot connect to $SSID network")
|
||||
errorConnecting()
|
||||
}
|
||||
}
|
||||
|
||||
private fun errorConnecting(){
|
||||
completionOnUiThread(false, "errorConnectingHmgNetwork")
|
||||
}
|
||||
|
||||
// If CompileSDK is greater and equals to APILevel 29
|
||||
private fun connectNewer(wm:WifiManager){
|
||||
|
||||
// Log.e(TAG, "connection wifi Q")
|
||||
//
|
||||
// val wifiNetworkSpecifier: WifiNetworkSpecifier = WifiNetworkSpecifier.Builder()
|
||||
// .setSsid(ssid)
|
||||
// .setWpa2Passphrase(password)
|
||||
// .build()
|
||||
//
|
||||
// val networkRequest: NetworkRequest = NetworkRequest.Builder()
|
||||
// .addTransportType(NetworkCapabilities.TRANSPORT_WIFI)
|
||||
// .setNetworkSpecifier(wifiNetworkSpecifier)
|
||||
// .build()
|
||||
//
|
||||
// var connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
// var networkCallback = object : ConnectivityManager.NetworkCallback() {
|
||||
// override fun onAvailable(network: Network) {
|
||||
// super.onAvailable(network)
|
||||
// connectivityManager.bindProcessToNetwork(network)
|
||||
// Log.e(TAG, "onAvailable")
|
||||
// }
|
||||
//
|
||||
// override fun onLosing(network: Network, maxMsToLive: Int) {
|
||||
// super.onLosing(network, maxMsToLive)
|
||||
// Log.e(TAG, "onLosing")
|
||||
// }
|
||||
//
|
||||
// override fun onLost(network: Network) {
|
||||
// super.onLost(network)
|
||||
// Log.e(TAG, "onLosing")
|
||||
// Log.e(TAG, "losing active connection")
|
||||
// }
|
||||
//
|
||||
// override fun onUnavailable() {
|
||||
// super.onUnavailable()
|
||||
// Log.e(TAG, "onUnavailable")
|
||||
// }
|
||||
// }
|
||||
// connectivityManager.requestNetwork(networkRequest, networkCallback)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method takes a given String, searches the current list of configured WiFi
|
||||
* networks, and returns the networkId for the network if the SSID matches. If not,
|
||||
* it returns -1.
|
||||
*/
|
||||
private fun ssidToNetworkId(ssid: String): Int {
|
||||
val currentNetworks = wifiManager!!.configuredNetworks
|
||||
var networkId = -1
|
||||
|
||||
// For each network in the list, compare the SSID with the given one
|
||||
for (test in currentNetworks) {
|
||||
if (test.SSID == ssid) {
|
||||
networkId = test.networkId
|
||||
break
|
||||
}
|
||||
}
|
||||
return networkId
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,110 @@
|
||||
package com.cloud.diplomaticquarterapp.hmgwifi
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import com.cloud.diplomaticquarterapp.utils.API
|
||||
import com.cloud.diplomaticquarterapp.MainActivity
|
||||
import com.cloud.diplomaticquarterapp.utils.FlutterText
|
||||
import com.github.kittinunf.fuel.core.extensions.jsonBody
|
||||
import com.github.kittinunf.fuel.httpGet
|
||||
import com.github.kittinunf.fuel.httpPost
|
||||
import org.json.JSONObject
|
||||
import java.util.*
|
||||
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
class HMG_Internet(flutterMainActivity: MainActivity) {
|
||||
private val TAG = "HMG_Wifi"
|
||||
private val TEST = false
|
||||
|
||||
private var context = flutterMainActivity;
|
||||
|
||||
private lateinit var completionListener: ((status: Boolean, message: String) -> Unit)
|
||||
|
||||
private var SSID = "GUEST-POC"
|
||||
private var USER_NAME = ""
|
||||
private var PASSWORD = ""
|
||||
|
||||
fun completionOnUiThread(status: Boolean, message: String){
|
||||
completionListener(status, message)
|
||||
// context.runOnUiThread {
|
||||
//
|
||||
// FlutterText.with(message){localized ->
|
||||
// completionListener(status, localized)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/*
|
||||
* Helpful:
|
||||
* http://stackoverflow.com/questions/8818290/how-to-connect-to-a-specific-wifi-network-in-android-programmatically
|
||||
*/
|
||||
fun connectToHMGGuestNetwork(patientId: String, completion: (status: Boolean, message: String) -> Unit): HMG_Internet {
|
||||
completionListener = completion
|
||||
getWifiCredentials(patientId) {
|
||||
WPA(context,SSID).connect(USER_NAME,PASSWORD) { status, message ->
|
||||
completionOnUiThread(status,message)
|
||||
}
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
private fun haveInternet(completion: ((status: Boolean) -> Unit)){
|
||||
if (TEST)
|
||||
completion(true)
|
||||
|
||||
"https://captive.apple.com".httpGet().response { request, response, result ->
|
||||
result.fold(success = {
|
||||
val html = String(it).toLowerCase(Locale.ENGLISH)
|
||||
.replace(" ", "", true)
|
||||
.replace("\n","",true)
|
||||
val have = html.contains("<title>success</title>", true)
|
||||
completion(have)
|
||||
|
||||
},failure = {
|
||||
completion(false)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun getWifiCredentials(patientId:String, success: (() -> Unit)){
|
||||
if (TEST){
|
||||
SSID = "GUEST-POC"
|
||||
USER_NAME = "0696"
|
||||
PASSWORD = "0000"
|
||||
success()
|
||||
return
|
||||
}
|
||||
|
||||
val jsonBody = """{"PatientID":$patientId}"""
|
||||
API.WIFI_CREDENTIALS.
|
||||
httpPost()
|
||||
.jsonBody(jsonBody, Charsets.UTF_8)
|
||||
.response { request, response, result ->
|
||||
|
||||
result.fold(success = { data ->
|
||||
val jsonString = String(data)
|
||||
val jsonObject = JSONObject(jsonString)
|
||||
if(!jsonObject.getString("ErrorMessage").equals("null")){
|
||||
val errorMsg = jsonObject.getString("ErrorMessage")
|
||||
completionOnUiThread(false, errorMsg)
|
||||
|
||||
}else{
|
||||
jsonObject.getJSONArray("Hmg_SMS_Get_By_ProjectID_And_PatientIDList").let { array ->
|
||||
array.getJSONObject(0).let { object_ ->
|
||||
if (object_.has("UserName") && object_.has("UserName")){
|
||||
USER_NAME = object_.getString("UserName")
|
||||
PASSWORD = object_.getString("Password")
|
||||
success()
|
||||
}else{
|
||||
completionOnUiThread(false, "somethingWentWrong")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},failure = { error ->
|
||||
completionOnUiThread(false, "somethingWentWrong" )
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.cloud.diplomaticquarterapp.hmgwifi
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.net.ConnectivityManager
|
||||
import android.net.wifi.*
|
||||
import android.net.wifi.SupplicantState.ASSOCIATED
|
||||
import android.net.wifi.SupplicantState.COMPLETED
|
||||
import android.util.Log
|
||||
import com.cloud.diplomaticquarterapp.MainActivity
|
||||
import com.cloud.diplomaticquarterapp.utils.HMGUtils
|
||||
|
||||
class WPA(mainActivity: MainActivity, SSID:String) {
|
||||
private var TAG = "WPA"
|
||||
private var SSID = "GUEST-POC"
|
||||
private var wifiManager_: WifiManager? = null
|
||||
private var connectivityManager_: ConnectivityManager? = null
|
||||
|
||||
init {
|
||||
wifiManager_ = mainActivity.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager?
|
||||
connectivityManager_ = mainActivity.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager?
|
||||
}
|
||||
|
||||
fun connect(identity:String, password:String, completion: (status: Boolean, message: String) -> Unit) {
|
||||
if(wifiManager_ == null || connectivityManager_ == null){
|
||||
completion(false,"errorConnectingHmgNetwork")
|
||||
return
|
||||
}
|
||||
|
||||
val wifiManager = wifiManager_!!
|
||||
val connectivityManager = connectivityManager_!!
|
||||
|
||||
// Initialize the WifiConfiguration object
|
||||
val enterpriseConfig = WifiEnterpriseConfig()
|
||||
val wifi = WifiConfiguration()
|
||||
wifi.SSID = """"$SSID""""
|
||||
wifi.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP)
|
||||
wifi.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X)
|
||||
enterpriseConfig.eapMethod = WifiEnterpriseConfig.Eap.PEAP
|
||||
enterpriseConfig.identity = identity
|
||||
enterpriseConfig.password = password
|
||||
wifi.enterpriseConfig = enterpriseConfig
|
||||
wifi.networkId = ssidToNetworkId(wifi.SSID)
|
||||
if (wifi.networkId == -1) {
|
||||
wifiManager.addNetwork(wifi)
|
||||
} else {
|
||||
Log.v(TAG, "WiFi found - updating it.\n")
|
||||
wifiManager.updateNetwork(wifi)
|
||||
}
|
||||
Log.v(TAG, "saving config.\n")
|
||||
wifiManager.saveConfiguration()
|
||||
wifi.networkId = ssidToNetworkId(wifi.SSID)
|
||||
|
||||
Log.v(TAG, "wifi ID in device = " + wifi.networkId)
|
||||
|
||||
var supState: SupplicantState
|
||||
val networkIdToConnect = wifi.networkId
|
||||
if (networkIdToConnect >= 0) {
|
||||
Log.v(TAG, "Start connecting...\n")
|
||||
|
||||
// We disable the network before connecting, because if this was the last connection before
|
||||
// a disconnect(), this will not reconnect.
|
||||
wifiManager.disableNetwork(networkIdToConnect)
|
||||
wifiManager.enableNetwork(networkIdToConnect, true)
|
||||
|
||||
val wifiInfo: WifiInfo = wifiManager.connectionInfo
|
||||
|
||||
HMGUtils.timer(5000,false){
|
||||
supState = wifiInfo.supplicantState
|
||||
Log.i(TAG, "WifiWizard: Done connect to network : status = $supState")
|
||||
val successStates = listOf(COMPLETED, ASSOCIATED)
|
||||
if (successStates.contains(COMPLETED /*supState*/))
|
||||
|
||||
completion(true,"Connected to internet Wifi")
|
||||
|
||||
else
|
||||
completion(false,"errorConnectingHmgNetwork")
|
||||
}
|
||||
|
||||
} else {
|
||||
Log.v(TAG, "WifiWizard: cannot connect to network")
|
||||
completion(false,"errorConnectingHmgNetwork")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method takes a given String, searches the current list of configured WiFi
|
||||
* networks, and returns the networkId for the network if the SSID matches. If not,
|
||||
* it returns -1.
|
||||
*/
|
||||
@SuppressLint("MissingPermission")
|
||||
private fun ssidToNetworkId(ssid: String): Int {
|
||||
val currentNetworks = wifiManager_!!.configuredNetworks
|
||||
var networkId = -1
|
||||
|
||||
// For each network in the list, compare the SSID with the given one
|
||||
for (test in currentNetworks) {
|
||||
if (test.SSID == ssid) {
|
||||
networkId = test.networkId
|
||||
break
|
||||
}
|
||||
}
|
||||
return networkId
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.cloud.diplomaticquarterapp.utils
|
||||
|
||||
class API {
|
||||
companion object{
|
||||
private val BASE = "https://uat.hmgwebservices.com"
|
||||
private val SERVICE = "Services/Patients.svc/REST"
|
||||
|
||||
val WIFI_CREDENTIALS = "$BASE/$SERVICE/Hmg_SMS_Get_By_ProjectID_And_PatientID"
|
||||
val LOG_GEOFENCE = "$BASE/$SERVICE/GeoF_InsertPatientFileInfo"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.cloud.diplomaticquarterapp.utils
|
||||
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugin.common.MethodChannel.Result
|
||||
|
||||
class FlutterText{
|
||||
|
||||
companion object{
|
||||
fun with(key:String, completion:(String)->Unit){
|
||||
HMGUtils.getPlatformChannel().invokeMethod("localizedValue",key, object:MethodChannel.Result{
|
||||
override fun success(result: Any?) {
|
||||
val localized = result as String?
|
||||
if (localized != null){
|
||||
completion(localized)
|
||||
}else{
|
||||
completion(key)
|
||||
}
|
||||
}
|
||||
|
||||
override fun error(errorCode: String?, errorMessage: String?, errorDetails: Any?) {
|
||||
completion(key)
|
||||
require(false){
|
||||
"'localizedValue' $errorMessage"
|
||||
}
|
||||
}
|
||||
|
||||
override fun notImplemented() {
|
||||
require(false){
|
||||
"'localizedValue' method not implemented at flutter"
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,160 @@
|
||||
package com.cloud.diplomaticquarterapp.utils
|
||||
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.Nullable
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.TaskStackBuilder
|
||||
import com.cloud.diplomaticquarterapp.BuildConfig
|
||||
import com.cloud.diplomaticquarterapp.MainActivity
|
||||
import com.cloud.diplomaticquarterapp.R
|
||||
import com.cloud.diplomaticquarterapp.geofence.GeoZoneModel
|
||||
import com.cloud.diplomaticquarterapp.geofence.PREFS_STORAGE
|
||||
import com.cloud.diplomaticquarterapp.geofence.PREF_KEY_HMG_ZONES
|
||||
import com.github.kittinunf.fuel.core.extensions.jsonBody
|
||||
import com.github.kittinunf.fuel.httpPost
|
||||
import com.google.android.gms.location.Geofence
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import java.util.*
|
||||
import kotlin.concurrent.timerTask
|
||||
|
||||
|
||||
class HMGUtils {
|
||||
|
||||
companion object{
|
||||
private lateinit var platformChannel: MethodChannel
|
||||
fun getPlatformChannel():MethodChannel{
|
||||
return platformChannel
|
||||
}
|
||||
fun setPlatformChannel(channel: MethodChannel){
|
||||
platformChannel = channel
|
||||
}
|
||||
|
||||
fun timer(delay: Long, repeat: Boolean, tick: (Timer) -> Unit) : Timer{
|
||||
val timer = Timer()
|
||||
if(repeat)
|
||||
timer.schedule(timerTask {
|
||||
tick(timer)
|
||||
}, delay, delay)
|
||||
else
|
||||
timer.schedule(timerTask {
|
||||
tick(timer)
|
||||
}, delay)
|
||||
|
||||
return timer
|
||||
}
|
||||
|
||||
fun popMessage(context: MainActivity, message: String){
|
||||
context.runOnUiThread {
|
||||
Toast.makeText(context, message, Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
|
||||
fun popFlutterText(context: MainActivity, key: String){
|
||||
context.runOnUiThread {
|
||||
FlutterText.with(key){
|
||||
Toast.makeText(context, it, Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun getGeoZonesFromPreference(context: Context):List<GeoZoneModel>{
|
||||
val pref = context.getSharedPreferences(PREFS_STORAGE, Context.MODE_PRIVATE)
|
||||
val json = pref.getString(PREF_KEY_HMG_ZONES,"[]")
|
||||
|
||||
val geoZones = GeoZoneModel().listFrom(json)
|
||||
return geoZones
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun Timer.schedule(timerTask: TimerTask) {
|
||||
|
||||
}
|
||||
private const val NOTIFICATION_CHANNEL_ID = BuildConfig.APPLICATION_ID + ".channel"
|
||||
|
||||
fun sendNotification(context: Context, title:String, @Nullable subtitle:String?, message:String?) {
|
||||
val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
|
||||
&& notificationManager.getNotificationChannel(NOTIFICATION_CHANNEL_ID) == null) {
|
||||
val name = context.getString(R.string.app_name)
|
||||
val channel = NotificationChannel(NOTIFICATION_CHANNEL_ID,
|
||||
name,
|
||||
NotificationManager.IMPORTANCE_DEFAULT)
|
||||
|
||||
notificationManager.createNotificationChannel(channel)
|
||||
}
|
||||
|
||||
val intent = Intent(context, MainActivity::class.java)
|
||||
|
||||
val stackBuilder = TaskStackBuilder.create(context)
|
||||
.addParentStack(MainActivity::class.java)
|
||||
.addNextIntent(intent)
|
||||
val notificationPendingIntent = stackBuilder.getPendingIntent(getUniqueId(), PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
|
||||
val notification = NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_ID)
|
||||
.setSmallIcon(R.mipmap.ic_launcher)
|
||||
.setContentIntent(notificationPendingIntent)
|
||||
.setAutoCancel(true)
|
||||
.setContentTitle(title)
|
||||
|
||||
subtitle.let { notification.setContentText(it) }
|
||||
message.let { notification.setSubText(it) }
|
||||
|
||||
notificationManager.notify(getUniqueId(), notification.build())
|
||||
}
|
||||
|
||||
|
||||
private fun getUniqueId() = ((System.currentTimeMillis() % 10000).toInt())
|
||||
|
||||
fun isJSONValid(jsonString: String?): Boolean {
|
||||
try { JSONObject(jsonString) } catch (ex: JSONException) {
|
||||
try { JSONArray(jsonString) } catch (ex1: JSONException) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
class HTTPResponse<T>(data: T){
|
||||
final var data:T = data
|
||||
}
|
||||
fun <T>httpPost(url: String, body: Map<String, Any?>, onSuccess: (response: HTTPResponse<T>) -> Unit, onError: (error: Exception) -> Unit){
|
||||
|
||||
val gson = Gson()
|
||||
val type = object : TypeToken<T>() {}.type
|
||||
val jsonBody = gson.toJson(body)
|
||||
url.httpPost()
|
||||
.jsonBody(jsonBody, Charsets.UTF_8)
|
||||
.timeout(10000)
|
||||
.header("Content-Type","application/json")
|
||||
.header("Allow","*/*")
|
||||
.response { request, response, result ->
|
||||
result.fold({ data ->
|
||||
val dataString = String(data)
|
||||
if(isJSONValid(dataString)){
|
||||
val responseData = gson.fromJson<T>(dataString,type)
|
||||
onSuccess(HTTPResponse(responseData))
|
||||
}else{
|
||||
onError(Exception("Invalid response from server (Not a valid JSON)"))
|
||||
}
|
||||
}, {
|
||||
onError(it)
|
||||
it.localizedMessage
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,351 @@
|
||||
//package com.cloud.diplomaticquarterapp.utils
|
||||
//
|
||||
//import android.annotation.SuppressLint
|
||||
//import android.content.Context
|
||||
//import android.net.ConnectivityManager
|
||||
//import android.net.Network
|
||||
//import android.net.NetworkCapabilities
|
||||
//import android.net.NetworkRequest
|
||||
//import android.net.wifi.ScanResult
|
||||
//import android.net.wifi.WifiConfiguration
|
||||
//import android.net.wifi.WifiManager
|
||||
//import android.util.Log
|
||||
//import com.cloud.diplomaticquarterapp.utils.API
|
||||
//import com.cloud.diplomaticquarterapp.FlutterMainActivity
|
||||
//import com.github.kittinunf.fuel.core.extensions.jsonBody
|
||||
//import com.github.kittinunf.fuel.httpGet
|
||||
//import com.github.kittinunf.fuel.httpPost
|
||||
//import org.json.JSONObject
|
||||
//import java.util.*
|
||||
//
|
||||
//
|
||||
//@SuppressLint("MissingPermission")
|
||||
//class HMG_Wifi_(flutterMainActivity: FlutterMainActivity) {
|
||||
// val TAG = "WIFI"
|
||||
// val TEST = true
|
||||
//
|
||||
// var context = flutterMainActivity;
|
||||
// var completionListener: ((status: Boolean, message: String) -> Unit)? = null
|
||||
//
|
||||
//
|
||||
// private var SSID = "HMG-GUEST"
|
||||
// private var USER_NAME = ""
|
||||
// private var PASSWORD = ""
|
||||
// var NETWORK_ID = -1 // HMG-GUEST Assigned Network ID by Android
|
||||
// private lateinit var PATIENT_ID:String
|
||||
// /*
|
||||
// * Helpful:
|
||||
// * http://stackoverflow.com/questions/5452940/how-can-i-get-android-wifi-scan-results-into-a-list
|
||||
// */
|
||||
// fun triggerWifiScan(context: Context) {
|
||||
// val wifi = context.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||
// wifi.startScan()
|
||||
// }
|
||||
//
|
||||
// /*
|
||||
// * Helpful:
|
||||
// * http://stackoverflow.com/questions/8818290/how-to-connect-to-a-specific-wifi-network-in-android-programmatically
|
||||
// */
|
||||
// fun connectToWifiNetworkWith(patientId: String): HMG_Wifi_ {
|
||||
//
|
||||
// val connectivityManager = context.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
//
|
||||
// PATIENT_ID = patientId
|
||||
//
|
||||
// val security = "OPEN"
|
||||
// val networkPass = ""
|
||||
// Log.d(TAG, "Connecting to SSID \"$SSID\" with password \"$networkPass\" and with security \"$security\" ...")
|
||||
//
|
||||
// // You need to create WifiConfiguration instance like this:
|
||||
// val conf = WifiConfiguration()
|
||||
// conf.SSID = "\"" + SSID + "\""
|
||||
//
|
||||
// if (security == "OPEN") {
|
||||
// conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE)
|
||||
// } else if (security == "WEP") {
|
||||
// conf.wepKeys[0] = "\"" + networkPass + "\""
|
||||
// conf.wepTxKeyIndex = 0
|
||||
// conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE)
|
||||
// conf.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40)
|
||||
// } else {
|
||||
// conf.preSharedKey = "\"" + networkPass + "\""
|
||||
// }
|
||||
//
|
||||
// // Then, you need to add it to Android wifi manager settings:
|
||||
// val wifiManager = context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||
//
|
||||
// NETWORK_ID = wifiManager.addNetwork(conf)
|
||||
// Log.d(TAG, "Network ID: $NETWORK_ID")
|
||||
//
|
||||
// //wifiManager.disconnect();
|
||||
// val result = wifiManager.enableNetwork(NETWORK_ID, true)
|
||||
// //wifiManager.reconnect();
|
||||
// wifiManager.saveConfiguration()
|
||||
//
|
||||
// if(result == true){
|
||||
// authNetworkConnection(NETWORK_ID);
|
||||
// }else{
|
||||
// completionListener?.let { it(false, "Error connecting to HMG network") }
|
||||
// }
|
||||
// return this
|
||||
// }
|
||||
//
|
||||
// private var authTimer:Timer? = null
|
||||
// fun authNetworkConnection(networkId: Int){
|
||||
// authTimer = Timer()
|
||||
// authTimer?.scheduleAtFixedRate(object : TimerTask() {
|
||||
// override fun run() {
|
||||
// if (connectedNetworkId() == networkId && connectedNetworkIPAddress() > 0) {
|
||||
// authServerCall()
|
||||
// authTimer?.cancel()
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }, 2000, 1000)
|
||||
//
|
||||
// // If wifi not connected in 5 sec terminate with fail status
|
||||
// Timer().schedule(object : TimerTask() {
|
||||
// override fun run() {
|
||||
// if (null != authTimer) {
|
||||
// authTimer?.cancel()
|
||||
// completionListener?.let { it(false, "Error connecting to HMG network") }
|
||||
// }
|
||||
// }
|
||||
// }, 5000)
|
||||
//
|
||||
// }
|
||||
//
|
||||
// fun authServerCall(){
|
||||
//
|
||||
// fun call(){
|
||||
//
|
||||
// forceNetworkCallOverWifi()
|
||||
//
|
||||
// val params = listOf("cmd" to "authenticate", "password" to PASSWORD, "user" to USER_NAME)
|
||||
// val serverUrl = "https://captiveportal-login.hmg.com/cgi-bin/login"
|
||||
//// val serverUrl = "http://192.168.102.223/cgi-bin/login"
|
||||
// serverUrl
|
||||
// .httpPost(params)
|
||||
// .timeout(10000)
|
||||
// .response { request, response, result ->
|
||||
// Log.v(TAG, response.statusCode.toString())
|
||||
//
|
||||
// haveInternet { have ->
|
||||
// if(have){
|
||||
// Log.v(TAG, "Connected to internet via $SSID network at HMG")
|
||||
// completionListener?.let { it(true, "Successfully connected to the internet") }
|
||||
// }else{
|
||||
// Log.e(TAG, "failed to connect to internet via $SSID network at HMG")
|
||||
// completionListener?.let { it(false, "Authentication failed or you are already using your credentials on another device") }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// haveInternet { has ->
|
||||
// if (has){
|
||||
// getAuthCredentials {
|
||||
// call()
|
||||
// }
|
||||
// }else{
|
||||
// completionListener?.let { it(false, "You must have active internet connection to connect with HMG Network") }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// fun haveInternet(completion: ((status: Boolean) -> Unit)){
|
||||
// if (TEST)
|
||||
// completion(true)
|
||||
//
|
||||
// "https://captive.apple.com".httpGet().response { request, response, result ->
|
||||
// val have = response.statusCode == 200 && String(response.data).contains("<TITLE>Success</TITLE>", true)
|
||||
// completion(have)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// fun getAuthCredentials(completion: (() -> Unit)){
|
||||
// if (TEST){
|
||||
// USER_NAME = "2300"
|
||||
// PASSWORD = "1820"
|
||||
// completion()
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// val jsonBody = """{"PatientID":$PATIENT_ID}"""
|
||||
// API.WIFI_CREDENTIALS
|
||||
// .httpPost()
|
||||
// .jsonBody(jsonBody, Charsets.UTF_8)
|
||||
// .response { request, response, result ->
|
||||
// val jsonString = String(response.data)
|
||||
// Log.d(TAG, "JSON $jsonString")
|
||||
//
|
||||
// if (response.statusCode == 200){
|
||||
//
|
||||
// val jsonObject = JSONObject(jsonString)
|
||||
// if(!jsonObject.getString("ErrorMessage").equals("null")){
|
||||
// val errorMsg = jsonObject.getString("ErrorMessage")
|
||||
// completionListener?.let { it(false, errorMsg) }
|
||||
//
|
||||
// }else{
|
||||
// jsonObject.getJSONArray("Hmg_SMS_Get_By_ProjectID_And_PatientIDList").let { array ->
|
||||
// array.getJSONObject(0).let { object_ ->
|
||||
// if (object_.has("UserName") && object_.has("UserName")){
|
||||
// USER_NAME = object_.getString("UserName")
|
||||
// PASSWORD = object_.getString("Password")
|
||||
// completion()
|
||||
// }else{
|
||||
// completionListener?.let { it(false, "Failed to get your internet credentials") }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }else{
|
||||
// completionListener?.let { it(false, "Failed to get your internet credentials") }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// fun forceNetworkCallOverWifi(){
|
||||
// val connectivityManager = context.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
//// val network = Network
|
||||
//// connectivityManager.activeNetwork
|
||||
// // Exit app if Network disappears.
|
||||
// // Exit app if Network disappears.
|
||||
//// val networkCapabilities: NetworkCapabilities = ConnectivityManager.from(context).getNetworkCapabilities(network)
|
||||
//// val networkCapabilities: NetworkCapabilities = connectivityManager.getNetworkCapabilities(network)
|
||||
//
|
||||
//// if (networkCapabilities == null) {
|
||||
//// return
|
||||
//// }
|
||||
//
|
||||
// val mNetworkCallback = object : ConnectivityManager.NetworkCallback() {
|
||||
// override fun onLost(lostNetwork: Network?) {
|
||||
//// if (network.equals(lostNetwork)){
|
||||
//// //GlyphLayout.done(false)
|
||||
//// }
|
||||
// }
|
||||
// }
|
||||
// val builder: NetworkRequest.Builder = NetworkRequest.Builder()
|
||||
//// for (transportType in networkCapabilities.getTransportTypes()) {
|
||||
//// builder.addTransportType(transportType)
|
||||
//// }
|
||||
// connectivityManager.registerNetworkCallback(builder.build(), mNetworkCallback)
|
||||
// }
|
||||
//
|
||||
// /*
|
||||
// * Helpful:
|
||||
// * http://stackoverflow.com/questions/6517314/android-wifi-connection-programmatically
|
||||
// */
|
||||
// fun getScanResultSecurity(result: ScanResult): String? {
|
||||
// val capabilities: String = result.capabilities
|
||||
// val securityModes = arrayOf("WEP", "PSK", "EAP")
|
||||
// for (securityMode in securityModes) {
|
||||
// if (capabilities.contains(securityMode)) {
|
||||
// return securityMode
|
||||
// }
|
||||
// }
|
||||
// return "OPEN"
|
||||
// }
|
||||
//
|
||||
// //connects to the given ssid
|
||||
// fun connectToWPAWiFi(ssid: String, password: String){
|
||||
//
|
||||
// WifiUtils.withContext(context)
|
||||
// .connectWith(ssid, "")
|
||||
// .setTimeout(40000)
|
||||
// .onConnectionResult(object : ConnectionSuccessListener {
|
||||
// override fun success() {
|
||||
// Log.v(TAG,"Success")
|
||||
// }
|
||||
//
|
||||
// override fun failed(@NonNull errorCode: ConnectionErrorCode) {
|
||||
// Log.v(TAG,"Failed")
|
||||
// }
|
||||
// })
|
||||
// .start()
|
||||
// if(isConnectedTo(ssid)){ //see if we are already connected to the given ssid
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
// Log.e(TAG, "connection wifi Q")
|
||||
//
|
||||
// val wifiNetworkSpecifier: WifiNetworkSpecifier = WifiNetworkSpecifier.Builder()
|
||||
// .setSsid(ssid)
|
||||
// .setWpa2Passphrase(password)
|
||||
// .build()
|
||||
//
|
||||
// val networkRequest: NetworkRequest = NetworkRequest.Builder()
|
||||
// .addTransportType(NetworkCapabilities.TRANSPORT_WIFI)
|
||||
// .setNetworkSpecifier(wifiNetworkSpecifier)
|
||||
// .build()
|
||||
//
|
||||
// var connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
// var networkCallback = object : ConnectivityManager.NetworkCallback() {
|
||||
// override fun onAvailable(network: Network) {
|
||||
// super.onAvailable(network)
|
||||
// connectivityManager.bindProcessToNetwork(network)
|
||||
// Log.e(TAG, "onAvailable")
|
||||
// }
|
||||
//
|
||||
// override fun onLosing(network: Network, maxMsToLive: Int) {
|
||||
// super.onLosing(network, maxMsToLive)
|
||||
// Log.e(TAG, "onLosing")
|
||||
// }
|
||||
//
|
||||
// override fun onLost(network: Network) {
|
||||
// super.onLost(network)
|
||||
// Log.e(TAG, "onLosing")
|
||||
// Log.e(TAG, "losing active connection")
|
||||
// }
|
||||
//
|
||||
// override fun onUnavailable() {
|
||||
// super.onUnavailable()
|
||||
// Log.e(TAG, "onUnavailable")
|
||||
// }
|
||||
// }
|
||||
// connectivityManager.requestNetwork(networkRequest, networkCallback)
|
||||
//
|
||||
// }else{
|
||||
//
|
||||
// try {
|
||||
// val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||
//
|
||||
// Log.e(TAG, "connection wifi pre Q")
|
||||
//
|
||||
// var netId: Int = wm.addNetwork(getWifiConfig(ssid))
|
||||
// if (netId == -1) netId = getExistingNetworkId(ssid);
|
||||
// wm.saveConfiguration()
|
||||
// if(wm.enableNetwork(netId, true)){
|
||||
// Log.v(TAG,"HMG-GUEST Connected")
|
||||
// }else{
|
||||
// Log.v(TAG,"HMG-GUEST failed to connect")
|
||||
// }
|
||||
// } catch (e: Exception) {
|
||||
// e.printStackTrace()
|
||||
// Log.v(TAG,"HMG-GUEST failed to connect")
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// fun connectedNetworkId():Int{
|
||||
// val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||
// return wm.connectionInfo.networkId
|
||||
// }
|
||||
//
|
||||
// fun connectedNetworkIPAddress():Int{
|
||||
// val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||
// return wm.connectionInfo.ipAddress
|
||||
// }
|
||||
//
|
||||
// fun isConnectedTo(bssid: String):Boolean{
|
||||
// val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||
// if(wm.connectionInfo.bssid == bssid){
|
||||
// return true
|
||||
// }
|
||||
// return false
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@ -0,0 +1,127 @@
|
||||
package com.cloud.diplomaticquarterapp.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.net.wifi.WifiManager
|
||||
import android.util.Log
|
||||
import com.cloud.diplomaticquarterapp.MainActivity
|
||||
import com.cloud.diplomaticquarterapp.hmgwifi.HMG_Guest
|
||||
import com.cloud.diplomaticquarterapp.hmgwifi.HMG_Internet
|
||||
import com.cloud.diplomaticquarterapp.geofence.GeoZoneModel
|
||||
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
|
||||
import io.flutter.plugin.common.BinaryMessenger
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
|
||||
class PlatformBridge(binaryMessenger: BinaryMessenger, flutterMainActivity: MainActivity) {
|
||||
private var binaryMessenger = binaryMessenger
|
||||
private var mainActivity = flutterMainActivity
|
||||
|
||||
private lateinit var channel: MethodChannel
|
||||
|
||||
companion object {
|
||||
private const val CHANNEL = "HMG-Platform-Bridge"
|
||||
private const val HMG_INTERNET_WIFI_CONNECT_METHOD = "connectHMGInternetWifi"
|
||||
private const val HMG_GUEST_WIFI_CONNECT_METHOD = "connectHMGGuestWifi"
|
||||
private const val ENABLE_WIFI_IF_NOT = "enableWifiIfNot"
|
||||
private const val REGISTER_HMG_GEOFENCES = "registerHmgGeofences"
|
||||
private const val UN_REGISTER_HMG_GEOFENCES = "unRegisterHmgGeofences"
|
||||
}
|
||||
|
||||
fun create(){
|
||||
channel = MethodChannel(binaryMessenger, CHANNEL)
|
||||
HMGUtils.setPlatformChannel(channel)
|
||||
channel.setMethodCallHandler { methodCall: MethodCall, result: MethodChannel.Result ->
|
||||
|
||||
if (methodCall.method == HMG_INTERNET_WIFI_CONNECT_METHOD) {
|
||||
connectHMGInternetWifi(methodCall,result)
|
||||
|
||||
}else if (methodCall.method == HMG_GUEST_WIFI_CONNECT_METHOD) {
|
||||
connectHMGGuestWifi(methodCall,result)
|
||||
|
||||
}else if (methodCall.method == ENABLE_WIFI_IF_NOT) {
|
||||
enableWifiIfNot(methodCall,result)
|
||||
}else if (methodCall.method == REGISTER_HMG_GEOFENCES) {
|
||||
registerHmgGeofences(methodCall,result)
|
||||
}else if (methodCall.method == UN_REGISTER_HMG_GEOFENCES) {
|
||||
unRegisterHmgGeofences(methodCall,result)
|
||||
}else{
|
||||
|
||||
result.notImplemented()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
val res = channel.invokeMethod("localizedValue","errorConnectingHmgNetwork")
|
||||
print(res)
|
||||
}
|
||||
|
||||
private fun connectHMGInternetWifi(methodCall: MethodCall, result: MethodChannel.Result){
|
||||
(methodCall.arguments as ArrayList<*>).let {
|
||||
require(it.size > 0 && (it[0] is String),lazyMessage = {
|
||||
"Missing or invalid arguments (Must have one argument 'String at 0'"
|
||||
})
|
||||
|
||||
val patientId = it[0].toString()
|
||||
HMG_Internet(mainActivity)
|
||||
.connectToHMGGuestNetwork(patientId){ status, message ->
|
||||
|
||||
mainActivity.runOnUiThread {
|
||||
result.success(if(status) 1 else 0)
|
||||
|
||||
HMGUtils.popFlutterText(mainActivity, message)
|
||||
Log.v(this.javaClass.simpleName, "$status | $message")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun connectHMGGuestWifi(methodCall: MethodCall, result: MethodChannel.Result){
|
||||
HMG_Guest(mainActivity).connectToHMGGuestNetwork { status, message ->
|
||||
mainActivity.runOnUiThread {
|
||||
result.success(if(status) 1 else 0)
|
||||
|
||||
HMGUtils.popFlutterText(mainActivity, message)
|
||||
Log.v(this.javaClass.simpleName, "$status | $message")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun enableWifiIfNot(methodCall: MethodCall, result: MethodChannel.Result) {
|
||||
val wm = mainActivity.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager?
|
||||
if (wm != null){
|
||||
if (!wm.isWifiEnabled)
|
||||
wm.isWifiEnabled = true
|
||||
result.success(true)
|
||||
}else
|
||||
result.error("101","Error while opening wifi, Please try to open wifi yourself and try again","'WifiManager' service failed");
|
||||
}
|
||||
|
||||
|
||||
private fun registerHmgGeofences(methodCall: MethodCall, result: MethodChannel.Result) {
|
||||
|
||||
channel.invokeMethod("getGeoZones",null, object : MethodChannel.Result{
|
||||
override fun success(result: Any?) {
|
||||
if(result is String) {
|
||||
val geoZones = GeoZoneModel().listFrom(result)
|
||||
HMG_Geofence.shared(mainActivity).register(geoZones)
|
||||
}
|
||||
}
|
||||
|
||||
override fun error(errorCode: String?, errorMessage: String?, errorDetails: Any?) { print(result) }
|
||||
override fun notImplemented() { print(result) }
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
private fun unRegisterHmgGeofences(methodCall: MethodCall, result: MethodChannel.Result) {
|
||||
HMG_Geofence.shared(mainActivity).unRegisterAll { status, exception ->
|
||||
if(status)
|
||||
result.success(true)
|
||||
else
|
||||
result.error("101", exception?.localizedMessage, exception);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
<resources>
|
||||
<string name="app_name">HMG Patient App</string>
|
||||
|
||||
<string name="geofence_unknown_error">
|
||||
Unknown error: the Geofence service is not available now.
|
||||
</string>
|
||||
<string name="geofence_not_available">
|
||||
Geofence service is not available now. Go to Settings>Location>Mode and choose High accuracy.
|
||||
</string>
|
||||
<string name="geofence_too_many_geofences">
|
||||
Your app has registered too many geofences.
|
||||
</string>
|
||||
<string name="geofence_too_many_pending_intents">
|
||||
You have provided too many PendingIntents to the addGeofences() call.
|
||||
</string>
|
||||
</resources>
|
||||
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 140 KiB |
@ -0,0 +1,41 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Web related
|
||||
lib/generated_plugin_registrant.dart
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
@ -0,0 +1,10 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d
|
||||
channel: stable
|
||||
|
||||
project_type: app
|
||||
@ -0,0 +1,16 @@
|
||||
# help
|
||||
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
|
||||
|
||||
For help getting started with Flutter, view our
|
||||
[online documentation](https://flutter.dev/docs), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
@ -0,0 +1,11 @@
|
||||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
@ -0,0 +1,63 @@
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPackage'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.example.help"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.help">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@ -0,0 +1,47 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.help">
|
||||
<!-- 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="help"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<!-- Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
screen fades out. A splash screen is useful to avoid any visual
|
||||
gap between the end of Android's launch screen and the painting of
|
||||
Flutter's first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
||||
@ -0,0 +1,6 @@
|
||||
package com.example.help
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
|
After Width: | Height: | Size: 544 B |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
</style>
|
||||
</resources>
|
||||
@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.help">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@ -0,0 +1,31 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.50'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
@ -0,0 +1,6 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||
@ -0,0 +1,11 @@
|
||||
include ':app'
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
||||
@ -0,0 +1,32 @@
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
||||
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1 @@
|
||||
#include "Generated.xcconfig"
|
||||
@ -0,0 +1 @@
|
||||
#include "Generated.xcconfig"
|
||||
@ -0,0 +1,495 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.help;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.help;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.help;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,13 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 564 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 68 B |
|
After Width: | Height: | Size: 68 B |
|
After Width: | Height: | Size: 68 B |
@ -0,0 +1,5 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
||||
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
||||
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>help</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||