Compare commits

...

5 Commits

@ -0,0 +1 @@
export PATH="$PATH:/Users/user/Documents/Flutter SDKs/flutter_3.24.3/bin"

@ -195,6 +195,7 @@ dependencies {
// implementation "com.mapbox.maps:android:10.16.6" // implementation "com.mapbox.maps:android:10.16.6"
implementation 'com.mapbox.maps:android:11.3.1' implementation 'com.mapbox.maps:android:11.3.1'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:7.3.1'
implementation files('libs/PenNavUI.aar') implementation files('libs/PenNavUI.aar')
implementation files('libs/Penguin.aar') implementation files('libs/Penguin.aar')
@ -216,4 +217,8 @@ dependencies {
implementation 'com.airbnb.android:lottie:5.2.0' implementation 'com.airbnb.android:lottie:5.2.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
// Glide library for image loading and caching
implementation 'com.github.bumptech.glide:glide:4.14.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.1'
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -5,4 +5,4 @@
# For customization when using a Version Control System, please read the # For customization when using a Version Control System, please read the
# header note. # header note.
#Sun Sep 20 09:53:03 EEST 2020 #Sun Sep 20 09:53:03 EEST 2020
sdk.dir=/Users/erababah/Library/Android/sdk sdk.dir=/Users/user/Library/Android/sdk

@ -1,4 +1,6 @@
package com.ejada.hmg package com.ejada.hmg
import android.app.Dialog
import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.os.Build import android.os.Build
@ -8,11 +10,14 @@ import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import com.cloud.diplomaticquarterapp.PenguinInPlatformBridge import com.cloud.diplomaticquarterapp.PenguinInPlatformBridge
import com.ejada.hmg.utils.* import com.ejada.hmg.utils.*
import com.peng.pennavmap.PlugAndPlaySDK
import com.peng.pennavmap.interfaces.PIEventsDelegate
import com.peng.pennavmap.models.PIReportIssue
import io.flutter.embedding.android.FlutterFragmentActivity import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterFragmentActivity() { class MainActivity: FlutterFragmentActivity(), PIEventsDelegate {
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine); GeneratedPluginRegistrant.registerWith(flutterEngine);
@ -22,6 +27,7 @@ class MainActivity: FlutterFragmentActivity() {
PlatformBridge(flutterEngine, this).create() PlatformBridge(flutterEngine, this).create()
OpenTokPlatformBridge(flutterEngine, this).create() OpenTokPlatformBridge(flutterEngine, this).create()
PenguinInPlatformBridge(flutterEngine, this).create() PenguinInPlatformBridge(flutterEngine, this).create()
PlugAndPlaySDK.setPiEventsDelegate(this);
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// val mChannel = NotificationChannel("video_call_noti", "video call", NotificationManager.IMPORTANCE_HIGH) // val mChannel = NotificationChannel("video_call_noti", "video call", NotificationManager.IMPORTANCE_HIGH)
@ -66,4 +72,29 @@ class MainActivity: FlutterFragmentActivity() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
} }
override fun onReportIssue(issue: PIReportIssue?) {
}
override fun onSharedLocation(link: String?) {
}
override fun onBackButtonPressed(mContext: Context?) {
mContext?.let{
println("onBackButtonPressed: dialog is being called ")
val builder = android.app.AlertDialog.Builder(it)
.setTitle(it.getString(R.string.confirmation))
.setMessage(it.getString(R.string.confirmation_text))
.setPositiveButton(it.getString(R.string.yes)) { _, _ ->
PlugAndPlaySDK.dismiss()
}
.setNegativeButton(it.getString(R.string.no), null)
builder.create()
builder.show()
}
}
} }

@ -1,6 +1,7 @@
package com.cloud.diplomaticquarterapp.penguin package com.cloud.diplomaticquarterapp.penguin
import android.app.Activity import android.app.Activity
import android.app.AlertDialog
import android.content.Context import android.content.Context
import android.content.Context.RECEIVER_EXPORTED import android.content.Context.RECEIVER_EXPORTED
import android.content.IntentFilter import android.content.IntentFilter
@ -51,6 +52,8 @@ internal class PenguinView(
private val permissionResultReceiver: PermissionResultReceiver private val permissionResultReceiver: PermissionResultReceiver
private val permissionIntentFilter = IntentFilter("PERMISSION_RESULT_ACTION") private val permissionIntentFilter = IntentFilter("PERMISSION_RESULT_ACTION")
private companion object { private companion object {
const val PERMISSIONS_REQUEST_CODE = 1 const val PERMISSIONS_REQUEST_CODE = 1
} }
@ -216,17 +219,31 @@ internal class PenguinView(
// } // }
// Set events delegate for reporting issues // Set events delegate for reporting issues
// PlugAndPlaySDK.setPiEventsDelegate(new PIEventsDelegate() { PlugAndPlaySDK.setPiEventsDelegate(object : PIEventsDelegate {
// @Override override fun onReportIssue(issue: PIReportIssue?) {
// public void onReportIssue(PIReportIssue issue) {
// Log.e("Issue Reported: ", issue.getReportType()); }
// }
// // Implement issue reporting logic here } override fun onSharedLocation(link: String?) {
// @Override
// public void onSharedLocation(String link) { }
// // Implement Shared location logic here
// } override fun onBackButtonPressed(mContext: Context?) {
// }) mContext?.let{
val builder = AlertDialog.Builder(it)
.setTitle((creationParams["dialogTitle"] as String))
.setMessage((creationParams["dialogMessage"]as String))
.setPositiveButton((creationParams["dialogPositiveBtnTxt"] as String)) { _, _ ->
PlugAndPlaySDK.dismiss()
}
.setNegativeButton((creationParams["dialogNegativeBtnTxt"] as String), null)
builder.create()
builder.show()
}
}
})
// Start the Penguin SDK // Start the Penguin SDK
PlugAndPlaySDK.start(mContext, this) PlugAndPlaySDK.start(mContext, this)

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="confirmation">تأكيد</string>
<string name="confirmation_text">هل أنت متأكد من أنك تريد الخروج؟</string>
<string name="yes">نعم</string>
<string name="no">لا</string>
</resources>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="confirmation">تأكيد</string>
<string name="confirmation_text">هل أنت متأكد من أنك تريد الخروج؟</string>
<string name="yes">نعم</string>
<string name="no">لا</string>
</resources>

@ -20,4 +20,9 @@
Geofence requests happened too frequently. Geofence requests happened too frequently.
</string> </string>
<string name="mapbox_access_token" translatable="false">sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg</string> <string name="mapbox_access_token" translatable="false">sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg</string>
<string name="confirmation">Confirmation</string>
<string name="confirmation_text">Are you sure you want to exit?</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<!-- <string name="mapbox_access_token" translatable="false">pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ</string>-->
</resources> </resources>

@ -19,8 +19,8 @@ buildscript {
credentials { credentials {
username = 'mapbox' username = 'mapbox'
// password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg" password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
password = "pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ" // password = "pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ"
if (password == null || password == "") { if (password == null || password == "") {
throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the enviroment variables.") throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the enviroment variables.")
} }
@ -41,6 +41,7 @@ buildscript {
classpath 'com.google.gms:google-services:4.3.8' classpath 'com.google.gms:google-services:4.3.8'
// classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' // classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
classpath 'com.huawei.agconnect:agcp:1.5.2.300' classpath 'com.huawei.agconnect:agcp:1.5.2.300'
classpath("com.android.tools:r8:8.2.42")
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12' classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
classpath "com.mapbox.gradle.plugins:access-token:0.4.0" classpath "com.mapbox.gradle.plugins:access-token:0.4.0"
} }

@ -0,0 +1,44 @@
<?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>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>PenNavUI.framework/PenNavUI</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>PenNavUI.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>PenNavUI.framework/PenNavUI</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>PenNavUI.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

@ -0,0 +1,18 @@
//
// PenNavUI.h
// PenNavUI
//
// Created by Fawzi Rifai on 18/08/2023.
//
#import <Foundation/Foundation.h>
//! Project version number for PenNavUI.
FOUNDATION_EXPORT double PenNavUIVersionNumber;
//! Project version string for PenNavUI.
FOUNDATION_EXPORT const unsigned char PenNavUIVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <PenNavUI/PublicHeader.h>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save