Compare commits
No commits in common. 'main' and 'ambulance_ui' have entirely different histories.
main
...
ambulance_
@ -1,165 +1,16 @@
|
||||
# HMG Patient App
|
||||
# hmg_patient_app_new
|
||||
|
||||
A comprehensive Flutter-based mobile application for HMG (Habib Medical Group) patients,
|
||||
providing seamless healthcare services and patient management features.
|
||||
New HMG Patient App
|
||||
|
||||
## 📱 Features
|
||||
## Getting Started
|
||||
|
||||
- **Patient Registration & Authentication**: Secure login and registration system
|
||||
- **Appointment Management**: Book, reschedule, and manage medical appointments
|
||||
- **Medical Records**: Access to personal health records and medical history
|
||||
- **Doctor Consultation**: Video consultations and chat with healthcare providers
|
||||
- **Health Monitoring**: Track vital signs and health metrics
|
||||
- **Prescription Management**: View and manage prescriptions
|
||||
- **Payment Integration**: Secure payment processing for medical services
|
||||
- **Multi-language Support**: Available in English and Arabic
|
||||
- **Push Notifications**: Real-time updates for appointments and health reminders
|
||||
- **Calendar Integration**: Sync appointments with device calendar
|
||||
- **Location Services**: Find nearby hospitals and clinics
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
## 🚀 Getting Started
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
### Prerequisites
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
- Flutter SDK (>=3.0.0)
|
||||
- Dart SDK (>=3.0.0)
|
||||
- Android Studio / VS Code
|
||||
- Android SDK (for Android development)
|
||||
- Xcode (for iOS development, macOS only)
|
||||
|
||||
### Installation
|
||||
|
||||
1. **Clone the repository:**
|
||||
```bash
|
||||
git clone <repository-url>
|
||||
cd HMG_Patient_App_New
|
||||
```
|
||||
|
||||
2. **Install dependencies:**
|
||||
```bash
|
||||
flutter pub get
|
||||
```
|
||||
|
||||
3. **Configure Firebase:**
|
||||
- Add your `google-services.json` file to `android/app/`
|
||||
- Add your `GoogleService-Info.plist` file to `ios/Runner/`
|
||||
|
||||
4. **Run the application:**
|
||||
```bash
|
||||
flutter run
|
||||
```
|
||||
|
||||
## 🏗️ Project Structure
|
||||
|
||||
```
|
||||
lib/
|
||||
├── core/ # Core utilities and constants
|
||||
├── extensions/ # Dart extensions
|
||||
├── features/ # Feature-based modules
|
||||
├── generated/ # Generated files (localization, etc.)
|
||||
├── presentation/ # UI screens and widgets
|
||||
├── routes/ # App navigation and routing
|
||||
├── services/ # Business logic and API services
|
||||
├── theme/ # App theming and styling
|
||||
├── widgets/ # Reusable UI components
|
||||
├── main.dart # App entry point
|
||||
└── splashPage.dart # Splash screen
|
||||
|
||||
assets/
|
||||
├── animations/ # Lottie animations
|
||||
├── fonts/ # Custom fonts (Poppins, Gess Two)
|
||||
├── images/ # PNG and SVG images
|
||||
├── json/ # JSON data files
|
||||
└── langs/ # Localization files
|
||||
```
|
||||
|
||||
## 🛠️ Technologies Used
|
||||
|
||||
- **Framework**: Flutter
|
||||
- **Language**: Dart
|
||||
- **State Management**: [Your state management solution]
|
||||
- **Backend Services**: Firebase
|
||||
- **Authentication**: Firebase Auth
|
||||
- **Database**: Cloud Firestore
|
||||
- **Push Notifications**: Firebase Cloud Messaging
|
||||
- **Maps**: Google Maps
|
||||
- **Payment**: Amazon PayFort
|
||||
- **Video Calling**: Flutter Zoom Video SDK
|
||||
- **Local Storage**: SQLite, Shared Preferences
|
||||
|
||||
## 📱 Supported Platforms
|
||||
|
||||
- ✅ Android (API level 21+)
|
||||
- ✅ iOS (iOS 12.0+)
|
||||
- ✅ Foldable devices support
|
||||
- ✅ Tablet optimization
|
||||
|
||||
## 🌐 Localization
|
||||
|
||||
The app supports multiple languages:
|
||||
|
||||
- English (en-US)
|
||||
- Arabic (ar-SA)
|
||||
|
||||
## 🔧 Configuration
|
||||
|
||||
### Environment Setup
|
||||
|
||||
1. **API Keys**: Configure your API keys in the appropriate configuration files
|
||||
2. **Firebase**: Set up Firebase project and add configuration files
|
||||
3. **Maps**: Add Google Maps API key
|
||||
4. **Payment**: Configure PayFort credentials
|
||||
|
||||
### Build Variants
|
||||
|
||||
- **Debug**: Development build with debugging enabled
|
||||
- **Release**: Production-ready optimized build
|
||||
|
||||
## 📝 Development Guidelines
|
||||
|
||||
### Code Style
|
||||
|
||||
- Follow Dart/Flutter best practices
|
||||
- Use consistent naming conventions
|
||||
- Implement proper error handling
|
||||
- Write comprehensive documentation
|
||||
|
||||
### Testing
|
||||
|
||||
```bash
|
||||
# Run unit tests
|
||||
flutter test
|
||||
|
||||
# Run integration tests
|
||||
flutter test integration_test/
|
||||
```
|
||||
|
||||
### Building for Production
|
||||
|
||||
**Android:**
|
||||
|
||||
```bash
|
||||
flutter build apk --release
|
||||
# or
|
||||
flutter build appbundle --release
|
||||
```
|
||||
|
||||
**iOS:**
|
||||
|
||||
```bash
|
||||
flutter build ios --release
|
||||
```
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch (`git checkout -b feature/new-feature`)
|
||||
3. Commit your changes (`git commit -am 'Add new feature'`)
|
||||
4. Push to the branch (`git push origin feature/new-feature`)
|
||||
5. Create a Pull Request
|
||||
|
||||
## 📄 License
|
||||
|
||||
This project is proprietary software developed for HMG Healthcare Group.
|
||||
|
||||
**Built with ❤️ for better healthcare accessibility**
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
|
||||
@ -0,0 +1,74 @@
|
||||
{
|
||||
"agcgw":{
|
||||
"backurl":"connect-drcn.hispace.hicloud.com",
|
||||
"url":"connect-drcn.dbankcloud.cn",
|
||||
"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
|
||||
"websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
|
||||
},
|
||||
"agcgw_all":{
|
||||
"CN":"connect-drcn.dbankcloud.cn",
|
||||
"CN_back":"connect-drcn.hispace.hicloud.com",
|
||||
"DE":"connect-dre.dbankcloud.cn",
|
||||
"DE_back":"connect-dre.hispace.hicloud.com",
|
||||
"RU":"connect-drru.dbankcloud.cn",
|
||||
"RU_back":"connect-drru.hispace.hicloud.com",
|
||||
"SG":"connect-dra.dbankcloud.cn",
|
||||
"SG_back":"connect-dra.hispace.hicloud.com"
|
||||
},
|
||||
"client":{
|
||||
"cp_id":"2640966000002322881",
|
||||
"product_id":"736430079244816567",
|
||||
"client_id":"563735388191982656",
|
||||
"client_secret":"650C7C799812AFFD53A10C7756CF05FB9F215A7E49032ABA8EBF3E14B77535CF",
|
||||
"project_id":"736430079244816567",
|
||||
"app_id":"102857389",
|
||||
"api_key":"CgB6e3x9DJzMgRCmnT6dyUEkp6UsIfddb6l3w0ZEXzeiRMHEFi3400Z5fJ5qaHneU0OrAI/JRpk+DMGVs3QpUxlI",
|
||||
"package_name":"com.ejada.hmg"
|
||||
},
|
||||
"oauth_client":{
|
||||
"client_id":"102857389",
|
||||
"client_type":1
|
||||
},
|
||||
"app_info":{
|
||||
"app_id":"102857389",
|
||||
"package_name":"com.ejada.hmg"
|
||||
},
|
||||
"service":{
|
||||
"analytics":{
|
||||
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
||||
"collector_url_ru":"datacollector-drru.dt.hicloud.com,datacollector-drru.dt.dbankcloud.cn",
|
||||
"collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
|
||||
"collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
|
||||
"collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
||||
"resource_id":"p1",
|
||||
"channel_id":""
|
||||
},
|
||||
"search":{
|
||||
"url":"https://search-drcn.cloud.huawei.com"
|
||||
},
|
||||
"cloudstorage":{
|
||||
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn"
|
||||
},
|
||||
"ml":{
|
||||
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
|
||||
}
|
||||
},
|
||||
"region":"CN",
|
||||
"configuration_version":"3.0",
|
||||
"appInfos":[
|
||||
{
|
||||
"package_name":"com.ejada.hmg",
|
||||
"client":{
|
||||
"app_id":"102857389"
|
||||
},
|
||||
"app_info":{
|
||||
"package_name":"com.ejada.hmg",
|
||||
"app_id":"102857389"
|
||||
},
|
||||
"oauth_client":{
|
||||
"client_type":1,
|
||||
"client_id":"102857389"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
//package com.cloud.diplomaticquarterapp
|
||||
package com.ejada.hmg
|
||||
|
||||
|
||||
import io.flutter.app.FlutterApplication
|
||||
|
||||
class Application : FlutterApplication() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
//import io.flutter.app.FlutterApplication
|
||||
//import io.flutter.plugin.common.PluginRegistry
|
||||
//import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
|
||||
//import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
|
||||
//
|
||||
//class Application : FlutterApplication(), PluginRegistrantCallback {
|
||||
// override fun onCreate() {
|
||||
// super.onCreate()
|
||||
// FlutterFirebaseMessagingService.setPluginRegistrant(this)
|
||||
// }
|
||||
//
|
||||
// override fun registerWith(registry: PluginRegistry?) {
|
||||
// FirebaseCloudMessagingPluginRegistrant.registerWith(registry)
|
||||
// }
|
||||
//}
|
||||
@ -1,51 +0,0 @@
|
||||
package com.ejada.hmg
|
||||
|
||||
import android.app.PendingIntent
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import android.view.WindowManager
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.ejada.hmg.penguin.PenguinInPlatformBridge
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant
|
||||
|
||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||
|
||||
|
||||
class MainActivity: FlutterFragmentActivity() {
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
|
||||
GeneratedPluginRegistrant.registerWith(flutterEngine);
|
||||
// Create Flutter Platform Bridge
|
||||
this.window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON or WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON)
|
||||
|
||||
PenguinInPlatformBridge(flutterEngine, this).create()
|
||||
}
|
||||
|
||||
override fun onRequestPermissionsResult(
|
||||
requestCode: Int,
|
||||
permissions: Array<out String>,
|
||||
grantResults: IntArray
|
||||
) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
||||
|
||||
val granted = grantResults.all { it == PackageManager.PERMISSION_GRANTED }
|
||||
val intent = Intent("PERMISSION_RESULT_ACTION").apply {
|
||||
putExtra("PERMISSION_GRANTED", granted)
|
||||
}
|
||||
sendBroadcast(intent)
|
||||
|
||||
// Log the request code and permission results
|
||||
Log.d("PermissionsResult", "Request Code: $requestCode")
|
||||
Log.d("PermissionsResult", "Permissions: ${permissions.joinToString()}")
|
||||
Log.d("PermissionsResult", "Grant Results: ${grantResults.joinToString()}")
|
||||
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
}
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ejada.hmg.penguin
|
||||
|
||||
import com.ejada.hmg.MainActivity
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.ejada.hmg.penguin.PenguinView
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import com.ejada.hmg.PermissionManager.HostNotificationPermissionManager
|
||||
import com.ejada.hmg.PermissionManager.HostBgLocationManager
|
||||
import com.ejada.hmg.PermissionManager.HostGpsStateManager
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
|
||||
class PenguinInPlatformBridge(
|
||||
private var flutterEngine: FlutterEngine,
|
||||
private var mainActivity: MainActivity
|
||||
) {
|
||||
|
||||
private lateinit var channel: MethodChannel
|
||||
|
||||
companion object {
|
||||
private const val CHANNEL = "launch_penguin_ui"
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
fun create() {
|
||||
// openTok = OpenTok(mainActivity, flutterEngine)
|
||||
channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
|
||||
channel.setMethodCallHandler { call: MethodCall, result: MethodChannel.Result ->
|
||||
when (call.method) {
|
||||
"launchPenguin" -> {
|
||||
print("the platform channel is being called")
|
||||
|
||||
if (HostNotificationPermissionManager.isNotificationPermissionGranted(mainActivity))
|
||||
else HostNotificationPermissionManager.requestNotificationPermission(mainActivity)
|
||||
HostBgLocationManager.requestLocationBackgroundPermission(mainActivity)
|
||||
HostGpsStateManager.requestLocationPermission(mainActivity)
|
||||
val args = call.arguments as Map<String, Any>?
|
||||
Log.d("TAG", "configureFlutterEngine: $args")
|
||||
println("args")
|
||||
args?.let {
|
||||
PenguinView(
|
||||
mainActivity,
|
||||
100,
|
||||
args,
|
||||
flutterEngine.dartExecutor.binaryMessenger,
|
||||
activity = mainActivity,
|
||||
channel
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
else -> {
|
||||
result.notImplemented()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,139 +0,0 @@
|
||||
package com.ejada.hmg.PermissionManager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.FutureTask;
|
||||
|
||||
|
||||
/**
|
||||
* This preferences for app level
|
||||
*/
|
||||
|
||||
public class AppPreferences {
|
||||
|
||||
public static final String PREF_NAME = "PenguinINUI_AppPreferences";
|
||||
public static final int MODE = Context.MODE_PRIVATE;
|
||||
|
||||
public static final String campusIdKey = "campusId";
|
||||
|
||||
public static final String LANG = "Lang";
|
||||
|
||||
public static final String settingINFO = "SETTING-INFO";
|
||||
|
||||
public static final String userName = "userName";
|
||||
public static final String passWord = "passWord";
|
||||
|
||||
private static HandlerThread handlerThread;
|
||||
private static Handler handler;
|
||||
|
||||
static {
|
||||
handlerThread = new HandlerThread("PreferencesHandlerThread");
|
||||
handlerThread.start();
|
||||
handler = new Handler(handlerThread.getLooper());
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static SharedPreferences getPreferences(final Context context) {
|
||||
return context.getSharedPreferences(AppPreferences.PREF_NAME, AppPreferences.MODE);
|
||||
}
|
||||
|
||||
public static SharedPreferences.Editor getEditor(final Context context) {
|
||||
return getPreferences(context).edit();
|
||||
}
|
||||
|
||||
|
||||
public static void writeInt(final Context context, final String key, final int value) {
|
||||
handler.post(() -> {
|
||||
SharedPreferences.Editor editor = getEditor(context);
|
||||
editor.putInt(key, value);
|
||||
editor.apply();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static int readInt(final Context context, final String key, final int defValue) {
|
||||
Callable<Integer> callable = () -> {
|
||||
SharedPreferences preferences = getPreferences(context);
|
||||
return preferences.getInt(key, -1);
|
||||
};
|
||||
|
||||
Future<Integer> future = new FutureTask<>(callable);
|
||||
handler.post((Runnable) future);
|
||||
|
||||
try {
|
||||
return future.get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
e.printStackTrace(); // Handle the exception appropriately
|
||||
}
|
||||
|
||||
return -1; // Return the default value in case of an error
|
||||
}
|
||||
|
||||
public static int getCampusId(final Context context) {
|
||||
return readInt(context,campusIdKey,-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void writeString(final Context context, final String key, final String value) {
|
||||
handler.post(() -> {
|
||||
SharedPreferences.Editor editor = getEditor(context);
|
||||
editor.putString(key, value);
|
||||
editor.apply();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static String readString(final Context context, final String key, final String defValue) {
|
||||
Callable<String> callable = () -> {
|
||||
SharedPreferences preferences = getPreferences(context);
|
||||
return preferences.getString(key, defValue);
|
||||
};
|
||||
|
||||
Future<String> future = new FutureTask<>(callable);
|
||||
handler.post((Runnable) future);
|
||||
|
||||
try {
|
||||
return future.get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
e.printStackTrace(); // Handle the exception appropriately
|
||||
}
|
||||
|
||||
return defValue; // Return the default value in case of an error
|
||||
}
|
||||
|
||||
|
||||
public static void writeBoolean(final Context context, final String key, final boolean value) {
|
||||
handler.post(() -> {
|
||||
SharedPreferences.Editor editor = getEditor(context);
|
||||
editor.putBoolean(key, value);
|
||||
editor.apply();
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean readBoolean(final Context context, final String key, final boolean defValue) {
|
||||
Callable<Boolean> callable = () -> {
|
||||
SharedPreferences preferences = getPreferences(context);
|
||||
return preferences.getBoolean(key, defValue);
|
||||
};
|
||||
|
||||
Future<Boolean> future = new FutureTask<>(callable);
|
||||
handler.post((Runnable) future);
|
||||
|
||||
try {
|
||||
return future.get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
e.printStackTrace(); // Handle the exception appropriately
|
||||
}
|
||||
|
||||
return defValue; // Return the default value in case of an error
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,136 +0,0 @@
|
||||
package com.ejada.hmg.PermissionManager;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.peng.pennavmap.PlugAndPlaySDK;
|
||||
import com.peng.pennavmap.R;
|
||||
import com.peng.pennavmap.enums.InitializationErrorType;
|
||||
|
||||
/**
|
||||
* Manages background location permission requests and handling for the application.
|
||||
*/
|
||||
public class HostBgLocationManager {
|
||||
/**
|
||||
* Request code for background location permission
|
||||
*/
|
||||
public static final int REQUEST_ACCESS_BACKGROUND_LOCATION_CODE = 301;
|
||||
|
||||
/**
|
||||
* Request code for navigating to app settings
|
||||
*/
|
||||
private static final int REQUEST_CODE_SETTINGS = 11234;
|
||||
|
||||
/**
|
||||
* Alert dialog for denied permissions
|
||||
*/
|
||||
private static AlertDialog deniedAlertDialog;
|
||||
|
||||
/**
|
||||
* Checks if the background location permission has been granted.
|
||||
*
|
||||
* @param context the context of the application or activity
|
||||
* @return true if the permission is granted, false otherwise
|
||||
*/
|
||||
|
||||
public static boolean isLocationBackgroundGranted(Context context) {
|
||||
return ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
== PackageManager.PERMISSION_GRANTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests the background location permission from the user.
|
||||
*
|
||||
* @param activity the activity from which the request is made
|
||||
*/
|
||||
public static void requestLocationBackgroundPermission(Activity activity) {
|
||||
// Check if the ACCESS_BACKGROUND_LOCATION permission is already granted
|
||||
if (!isLocationBackgroundGranted(activity)) {
|
||||
// Permission is not granted, so request it
|
||||
ActivityCompat.requestPermissions(activity,
|
||||
new String[]{Manifest.permission.ACCESS_BACKGROUND_LOCATION},
|
||||
REQUEST_ACCESS_BACKGROUND_LOCATION_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a dialog prompting the user to grant the background location permission.
|
||||
*
|
||||
* @param activity the activity where the dialog is displayed
|
||||
*/
|
||||
public static void showLocationBackgroundPermission(Activity activity) {
|
||||
AlertDialog alertDialog = new AlertDialog.Builder(activity)
|
||||
.setCancelable(false)
|
||||
.setMessage(activity.getString(R.string.com_penguin_nav_ui_geofence_alert_msg))
|
||||
.setPositiveButton(activity.getString(R.string.com_penguin_nav_ui_go_to_settings), (dialog, which) -> {
|
||||
if (activity.shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_BACKGROUND_LOCATION)) {
|
||||
HostBgLocationManager.requestLocationBackgroundPermission(activity);
|
||||
} else {
|
||||
openAppSettings(activity);
|
||||
}
|
||||
if (dialog != null) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(activity.getString(R.string.com_penguin_nav_ui_later), (dialog, which) -> {
|
||||
dialog.cancel();
|
||||
})
|
||||
.create();
|
||||
|
||||
alertDialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the scenario where permissions are denied by the user.
|
||||
* Displays a dialog to guide the user to app settings or exit the activity.
|
||||
*
|
||||
* @param activity the activity where the dialog is displayed
|
||||
*/
|
||||
public static synchronized void handlePermissionsDenied(Activity activity) {
|
||||
if (deniedAlertDialog != null && deniedAlertDialog.isShowing()) {
|
||||
deniedAlertDialog.dismiss();
|
||||
}
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setCancelable(false)
|
||||
.setMessage(activity.getString(R.string.com_penguin_nav_ui_permission_denied_dialog_msg))
|
||||
.setNegativeButton(activity.getString(R.string.com_penguin_nav_ui_cancel), (dialogInterface, i) -> {
|
||||
if (PlugAndPlaySDK.externalPenNavUIDelegate != null) {
|
||||
PlugAndPlaySDK.externalPenNavUIDelegate.onPenNavInitializationError(
|
||||
InitializationErrorType.permissions.getTypeKey(),
|
||||
InitializationErrorType.permissions);
|
||||
}
|
||||
activity.finish();
|
||||
})
|
||||
.setPositiveButton(activity.getString(R.string.com_penguin_nav_ui_go_settings), (dialogInterface, i) -> {
|
||||
dialogInterface.dismiss();
|
||||
openAppSettings(activity);
|
||||
});
|
||||
deniedAlertDialog = builder.create();
|
||||
deniedAlertDialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the application's settings screen to allow the user to modify permissions.
|
||||
*
|
||||
* @param activity the activity from which the settings screen is launched
|
||||
*/
|
||||
private static void openAppSettings(Activity activity) {
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
Uri uri = Uri.fromParts("package", activity.getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
|
||||
if (intent.resolveActivity(activity.getPackageManager()) != null) {
|
||||
activity.startActivityForResult(intent, REQUEST_CODE_SETTINGS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package com.ejada.hmg.PermissionManager;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.location.LocationManager;
|
||||
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.peng.pennavmap.managers.permissions.managers.BgLocationManager;
|
||||
|
||||
public class HostGpsStateManager {
|
||||
private static final int LOCATION_PERMISSION_REQUEST_CODE = 1;
|
||||
|
||||
|
||||
public boolean checkGPSEnabled(Activity activity) {
|
||||
LocationManager gpsStateManager = (LocationManager) activity.getSystemService(Context.LOCATION_SERVICE);
|
||||
return gpsStateManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
|
||||
}
|
||||
|
||||
public static boolean isGpsGranted(Activity activity) {
|
||||
return BgLocationManager.isLocationBackgroundGranted(activity)
|
||||
|| ContextCompat.checkSelfPermission(
|
||||
activity,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
) == PackageManager.PERMISSION_GRANTED
|
||||
&& ContextCompat.checkSelfPermission(
|
||||
activity,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION
|
||||
) == PackageManager.PERMISSION_GRANTED;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the location permission is granted.
|
||||
*
|
||||
* @param activity the Activity context
|
||||
* @return true if permission is granted, false otherwise
|
||||
*/
|
||||
public static boolean isLocationPermissionGranted(Activity activity) {
|
||||
return ContextCompat.checkSelfPermission(
|
||||
activity,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
) == PackageManager.PERMISSION_GRANTED &&
|
||||
ContextCompat.checkSelfPermission(
|
||||
activity,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION
|
||||
) == PackageManager.PERMISSION_GRANTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests the location permission.
|
||||
*
|
||||
* @param activity the Activity context
|
||||
*/
|
||||
public static void requestLocationPermission(Activity activity) {
|
||||
ActivityCompat.requestPermissions(
|
||||
activity,
|
||||
new String[]{
|
||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION,
|
||||
},
|
||||
LOCATION_PERMISSION_REQUEST_CODE
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,73 +0,0 @@
|
||||
package com.ejada.hmg.PermissionManager;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
public class HostNotificationPermissionManager {
|
||||
private static final int REQUEST_NOTIFICATION_PERMISSION = 100;
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the notification permission is granted.
|
||||
*
|
||||
* @return true if the notification permission is granted, false otherwise.
|
||||
*/
|
||||
public static boolean isNotificationPermissionGranted(Activity activity) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
try {
|
||||
return ActivityCompat.checkSelfPermission(activity, android.Manifest.permission.POST_NOTIFICATIONS)
|
||||
== PackageManager.PERMISSION_GRANTED;
|
||||
} catch (Exception e) {
|
||||
// Handle cases where the API is unavailable
|
||||
e.printStackTrace();
|
||||
return NotificationManagerCompat.from(activity).areNotificationsEnabled();
|
||||
}
|
||||
} else {
|
||||
// Permissions were not required below Android 13 for notifications
|
||||
return NotificationManagerCompat.from(activity).areNotificationsEnabled();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests the notification permission.
|
||||
*/
|
||||
public static void requestNotificationPermission(Activity activity) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
if (!isNotificationPermissionGranted(activity)) {
|
||||
ActivityCompat.requestPermissions(activity,
|
||||
new String[]{android.Manifest.permission.POST_NOTIFICATIONS},
|
||||
REQUEST_NOTIFICATION_PERMISSION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the result of the permission request.
|
||||
*
|
||||
* @param requestCode The request code passed in requestPermissions().
|
||||
* @param permissions The requested permissions.
|
||||
* @param grantResults The grant results for the corresponding permissions.
|
||||
*/
|
||||
public static boolean handlePermissionResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
if (permissions.length > 0 &&
|
||||
permissions[0].equals(android.Manifest.permission.POST_NOTIFICATIONS) &&
|
||||
grantResults.length > 0 &&
|
||||
grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
// Permission granted
|
||||
System.out.println("Notification permission granted.");
|
||||
return true;
|
||||
} else {
|
||||
// Permission denied
|
||||
System.out.println("Notification permission denied.");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package com.ejada.hmg.PermissionManager
|
||||
|
||||
import android.Manifest
|
||||
import android.os.Build
|
||||
|
||||
object PermissionHelper {
|
||||
|
||||
fun getRequiredPermissions(): Array<String> {
|
||||
val permissions = mutableListOf(
|
||||
Manifest.permission.INTERNET,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION,
|
||||
Manifest.permission.ACCESS_NETWORK_STATE,
|
||||
Manifest.permission.BLUETOOTH,
|
||||
Manifest.permission.BLUETOOTH_ADMIN,
|
||||
// Manifest.permission.ACTIVITY_RECOGNITION
|
||||
)
|
||||
|
||||
// For Android 12 (API level 31) and above, add specific permissions
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { // Android 12 (API 31) and above
|
||||
permissions.add(Manifest.permission.BLUETOOTH_SCAN)
|
||||
permissions.add(Manifest.permission.BLUETOOTH_CONNECT)
|
||||
permissions.add(Manifest.permission.HIGH_SAMPLING_RATE_SENSORS)
|
||||
// }
|
||||
|
||||
return permissions.toTypedArray()
|
||||
}
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package com.ejada.hmg.PermissionManager
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
|
||||
class PermissionManager(
|
||||
private val context: Context,
|
||||
val listener: PermissionListener,
|
||||
private val requestCode: Int,
|
||||
vararg permissions: String
|
||||
) {
|
||||
|
||||
private val permissionsArray = permissions
|
||||
|
||||
interface PermissionListener {
|
||||
fun onPermissionGranted()
|
||||
fun onPermissionDenied()
|
||||
}
|
||||
|
||||
fun arePermissionsGranted(): Boolean {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
permissionsArray.all {
|
||||
ContextCompat.checkSelfPermission(context, it) == PackageManager.PERMISSION_GRANTED
|
||||
}
|
||||
} else {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
fun requestPermissions(activity: Activity) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
ActivityCompat.requestPermissions(activity, permissionsArray, requestCode)
|
||||
}
|
||||
}
|
||||
|
||||
fun handlePermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
|
||||
if (this.requestCode == requestCode) {
|
||||
val allGranted = grantResults.all { it == PackageManager.PERMISSION_GRANTED }
|
||||
if (allGranted) {
|
||||
listener.onPermissionGranted()
|
||||
} else {
|
||||
listener.onPermissionDenied()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
package com.ejada.hmg.PermissionManager
|
||||
|
||||
// PermissionResultReceiver.kt
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
|
||||
class PermissionResultReceiver(
|
||||
private val callback: (Boolean) -> Unit
|
||||
) : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
val granted = intent?.getBooleanExtra("PERMISSION_GRANTED", false) ?: false
|
||||
callback(granted)
|
||||
}
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package com.ejada.hmg.penguin
|
||||
|
||||
enum class PenguinMethod {
|
||||
// initializePenguin("initializePenguin"),
|
||||
// configurePenguin("configurePenguin"),
|
||||
// showPenguinUI("showPenguinUI"),
|
||||
// onPenNavUIDismiss("onPenNavUIDismiss"),
|
||||
// onReportIssue("onReportIssue"),
|
||||
// onPenNavSuccess("onPenNavSuccess"),
|
||||
onPenNavInitializationError // onLocationOffCampus("onLocationOffCampus"),
|
||||
// navigateToPOI("navigateToPOI"),
|
||||
// openSharedLocation("openSharedLocation");
|
||||
}
|
||||
@ -1,97 +0,0 @@
|
||||
package com.ejada.hmg.penguin
|
||||
|
||||
import android.content.Context
|
||||
import com.google.gson.Gson
|
||||
import com.peng.pennavmap.PlugAndPlaySDK
|
||||
import com.peng.pennavmap.connections.ApiController
|
||||
import com.peng.pennavmap.interfaces.RefIdDelegate
|
||||
import com.peng.pennavmap.models.TokenModel
|
||||
import com.peng.pennavmap.models.postmodels.PostToken
|
||||
import com.peng.pennavmap.utils.AppSharedData
|
||||
import okhttp3.ResponseBody
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import android.util.Log
|
||||
|
||||
|
||||
class PenguinNavigator() {
|
||||
|
||||
fun navigateTo(mContext: Context, refID: String, delegate: RefIdDelegate,clientID : String,clientKey : String ) {
|
||||
val postToken = PostToken(clientID, clientKey)
|
||||
getToken(mContext, postToken, object : RefIdDelegate {
|
||||
override fun onRefByIDSuccess(PoiId: String?) {
|
||||
Log.e("navigateTo", "PoiId is+++++++ $PoiId")
|
||||
|
||||
PlugAndPlaySDK.navigateTo(mContext, refID, object : RefIdDelegate {
|
||||
override fun onRefByIDSuccess(PoiId: String?) {
|
||||
Log.e("navigateTo", "PoiId 2is+++++++ $PoiId")
|
||||
|
||||
delegate.onRefByIDSuccess(refID)
|
||||
|
||||
}
|
||||
|
||||
override fun onGetByRefIDError(error: String?) {
|
||||
delegate.onRefByIDSuccess(error)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun onGetByRefIDError(error: String?) {
|
||||
delegate.onRefByIDSuccess(error)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
fun getToken(mContext: Context, postToken: PostToken?, apiTokenCallBack: RefIdDelegate) {
|
||||
try {
|
||||
// Create the API call
|
||||
val purposesCall: Call<ResponseBody> = ApiController.getInstance(mContext)
|
||||
.apiMethods
|
||||
.getToken(postToken)
|
||||
|
||||
// Enqueue the call for asynchronous execution
|
||||
purposesCall.enqueue(object : Callback<ResponseBody?> {
|
||||
override fun onResponse(
|
||||
call: Call<ResponseBody?>,
|
||||
response: Response<ResponseBody?>
|
||||
) {
|
||||
if (response.isSuccessful() && response.body() != null) {
|
||||
try {
|
||||
response.body()?.use { responseBody ->
|
||||
val responseBodyString: String = responseBody.string() // Use `string()` to get the actual response content
|
||||
if (responseBodyString.isNotEmpty()) {
|
||||
val tokenModel = Gson().fromJson(responseBodyString, TokenModel::class.java)
|
||||
if (tokenModel != null && tokenModel.token != null) {
|
||||
AppSharedData.apiToken = tokenModel.token
|
||||
apiTokenCallBack.onRefByIDSuccess(tokenModel.token)
|
||||
} else {
|
||||
apiTokenCallBack.onGetByRefIDError("Failed to parse token model")
|
||||
}
|
||||
} else {
|
||||
apiTokenCallBack.onGetByRefIDError("Response body is empty")
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
apiTokenCallBack.onGetByRefIDError("An error occurred: ${e.message}")
|
||||
}
|
||||
} else {
|
||||
apiTokenCallBack.onGetByRefIDError("Unsuccessful response: " + response.code())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<ResponseBody?>, t: Throwable) {
|
||||
apiTokenCallBack.onGetByRefIDError(t.message)
|
||||
}
|
||||
})
|
||||
} catch (error: Exception) {
|
||||
apiTokenCallBack.onGetByRefIDError("Exception during API call: $error")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,376 +0,0 @@
|
||||
package com.ejada.hmg.penguin
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Context.RECEIVER_EXPORTED
|
||||
import android.content.IntentFilter
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.ejada.hmg.PermissionManager.PermissionManager
|
||||
import com.ejada.hmg.PermissionManager.PermissionResultReceiver
|
||||
import com.ejada.hmg.MainActivity
|
||||
import com.ejada.hmg.PermissionManager.PermissionHelper
|
||||
import com.peng.pennavmap.PlugAndPlayConfiguration
|
||||
import com.peng.pennavmap.PlugAndPlaySDK
|
||||
import com.peng.pennavmap.enums.InitializationErrorType
|
||||
import com.peng.pennavmap.interfaces.PenNavUIDelegate
|
||||
import com.peng.pennavmap.utils.Languages
|
||||
import io.flutter.plugin.common.BinaryMessenger
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugin.platform.PlatformView
|
||||
import com.ejada.hmg.penguin.PenguinNavigator
|
||||
import com.peng.pennavmap.interfaces.PIEventsDelegate
|
||||
import com.peng.pennavmap.interfaces.PILocationDelegate
|
||||
import com.peng.pennavmap.interfaces.RefIdDelegate
|
||||
import com.peng.pennavmap.models.LocationMessage
|
||||
import com.peng.pennavmap.models.PIReportIssue
|
||||
import java.util.ArrayList
|
||||
import penguin.com.pennav.renderer.PIRendererSettings
|
||||
|
||||
/**
|
||||
* Custom PlatformView for displaying Penguin UI components within a Flutter app.
|
||||
* Implements `PlatformView` for rendering the view, `MethodChannel.MethodCallHandler` for handling method calls,
|
||||
* and `PenNavUIDelegate` for handling SDK events.
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
internal class PenguinView(
|
||||
context: Context,
|
||||
id: Int,
|
||||
val creationParams: Map<String, Any>,
|
||||
messenger: BinaryMessenger,
|
||||
activity: MainActivity,
|
||||
val channel: MethodChannel
|
||||
) : PlatformView, MethodChannel.MethodCallHandler, PenNavUIDelegate, PIEventsDelegate,
|
||||
PILocationDelegate {
|
||||
// The layout for displaying the Penguin UI
|
||||
private val mapLayout: RelativeLayout = RelativeLayout(context)
|
||||
private val _context: Context = context
|
||||
|
||||
private val permissionResultReceiver: PermissionResultReceiver
|
||||
private val permissionIntentFilter = IntentFilter("PERMISSION_RESULT_ACTION")
|
||||
|
||||
private companion object {
|
||||
const val PERMISSIONS_REQUEST_CODE = 1
|
||||
}
|
||||
|
||||
private lateinit var permissionManager: PermissionManager
|
||||
|
||||
// Reference to the main activity
|
||||
private var _activity: Activity = activity
|
||||
|
||||
private lateinit var mContext: Context
|
||||
|
||||
lateinit var navigator: PenguinNavigator
|
||||
|
||||
init {
|
||||
// Set layout parameters for the mapLayout
|
||||
mapLayout.layoutParams = ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT
|
||||
)
|
||||
|
||||
mContext = context
|
||||
|
||||
|
||||
permissionResultReceiver = PermissionResultReceiver { granted ->
|
||||
if (granted) {
|
||||
onPermissionsGranted()
|
||||
} else {
|
||||
onPermissionsDenied()
|
||||
}
|
||||
}
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
mContext.registerReceiver(
|
||||
permissionResultReceiver,
|
||||
permissionIntentFilter,
|
||||
RECEIVER_EXPORTED
|
||||
)
|
||||
} else {
|
||||
mContext.registerReceiver(
|
||||
permissionResultReceiver,
|
||||
permissionIntentFilter,
|
||||
)
|
||||
}
|
||||
|
||||
// Set the background color of the layout
|
||||
mapLayout.setBackgroundColor(Color.RED)
|
||||
|
||||
permissionManager = PermissionManager(
|
||||
context = mContext,
|
||||
listener = object : PermissionManager.PermissionListener {
|
||||
override fun onPermissionGranted() {
|
||||
// Handle permissions granted
|
||||
onPermissionsGranted()
|
||||
}
|
||||
|
||||
override fun onPermissionDenied() {
|
||||
// Handle permissions denied
|
||||
onPermissionsDenied()
|
||||
}
|
||||
},
|
||||
requestCode = PERMISSIONS_REQUEST_CODE,
|
||||
PermissionHelper.getRequiredPermissions().get(0)
|
||||
)
|
||||
|
||||
if (!permissionManager.arePermissionsGranted()) {
|
||||
permissionManager.requestPermissions(_activity)
|
||||
} else {
|
||||
// Permissions already granted
|
||||
permissionManager.listener.onPermissionGranted()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun onPermissionsGranted() {
|
||||
// Handle the actions when permissions are granted
|
||||
Log.d("PermissionsResult", "onPermissionsGranted")
|
||||
// Register the platform view factory for creating custom views
|
||||
|
||||
// Initialize the Penguin SDK
|
||||
initPenguin()
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun onPermissionsDenied() {
|
||||
// Handle the actions when permissions are denied
|
||||
Log.d("PermissionsResult", "onPermissionsDenied")
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the view associated with this PlatformView.
|
||||
*
|
||||
* @return The main view for this PlatformView.
|
||||
*/
|
||||
override fun getView(): View {
|
||||
return mapLayout
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans up resources associated with this PlatformView.
|
||||
*/
|
||||
override fun dispose() {
|
||||
// Cleanup code if needed
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles method calls from Dart code.
|
||||
*
|
||||
* @param call The method call from Dart.
|
||||
* @param result The result callback to send responses back to Dart.
|
||||
*/
|
||||
override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
|
||||
// Handle method calls from Dart code here
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the Penguin SDK with custom configuration and delegates.
|
||||
*/
|
||||
private fun initPenguin() {
|
||||
navigator = PenguinNavigator()
|
||||
// Configure the PlugAndPlaySDK
|
||||
val language = when (creationParams["languageCode"] as String) {
|
||||
"ar" -> Languages.ar
|
||||
"en" -> Languages.en
|
||||
else -> {
|
||||
Languages.en
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// PlugAndPlaySDK.configuration = Builder()
|
||||
// .setClientData(MConstantsDemo.CLIENT_ID, MConstantsDemo.CLIENT_KEY)
|
||||
// .setLanguageID(selectedLanguage)
|
||||
// .setBaseUrl(MConstantsDemo.DATA_URL, MConstantsDemo.POSITION_URL)
|
||||
// .setServiceName(MConstantsDemo.DATA_SERVICE_NAME, MConstantsDemo.POSITION_SERVICE_NAME)
|
||||
// .setUserName(name)
|
||||
// .setSimulationModeEnabled(isSimulation)
|
||||
// .setCustomizeColor(if (MConstantsDemo.APP_COLOR != null) MConstantsDemo.APP_COLOR else "#2CA0AF")
|
||||
// .setEnableBackButton(MConstantsDemo.SHOW_BACK_BUTTON)
|
||||
// .setCampusId(MConstantsDemo.selectedCampusId)
|
||||
//
|
||||
// .setShowUILoader(true)
|
||||
// .build()
|
||||
|
||||
PIRendererSettings.styleUri = "mapbox://styles/rwaid/cm3h30b36007v01qz7ik8a0sk"
|
||||
|
||||
PlugAndPlaySDK.configuration = PlugAndPlayConfiguration.Builder()
|
||||
.setBaseUrl(
|
||||
creationParams["dataURL"] as String,
|
||||
creationParams["positionURL"] as String
|
||||
)
|
||||
.setServiceName(
|
||||
creationParams["dataServiceName"] as String,
|
||||
creationParams["positionServiceName"] as String
|
||||
)
|
||||
.setClientData(
|
||||
creationParams["clientID"] as String,
|
||||
creationParams["clientKey"] as String
|
||||
)
|
||||
.setUserName(creationParams["username"] as String)
|
||||
// .setLanguageID(Languages.en)
|
||||
.setLanguageID(language)
|
||||
.setSimulationModeEnabled(creationParams["isSimulationModeEnabled"] as Boolean)
|
||||
.setEnableBackButton(true)
|
||||
// .setDeepLinkData("deeplink")
|
||||
.setCustomizeColor("#2CA0AF")
|
||||
.setDeepLinkSchema("", "")
|
||||
.setIsEnableReportIssue(true)
|
||||
.setDeepLinkData("")
|
||||
.setEnableSharedLocationCallBack(false)
|
||||
.setShowUILoader(true)
|
||||
.setCampusId(creationParams["projectID"] as Int)
|
||||
.build()
|
||||
|
||||
|
||||
Log.d(
|
||||
"TAG",
|
||||
"initPenguin: ${creationParams["projectID"]}"
|
||||
)
|
||||
|
||||
Log.d(
|
||||
"TAG",
|
||||
"initPenguin: creation param are ${creationParams}"
|
||||
)
|
||||
|
||||
// Set location delegate to handle location updates
|
||||
// PlugAndPlaySDK.setPiLocationDelegate {
|
||||
// Example code to handle location updates
|
||||
// Uncomment and modify as needed
|
||||
// if (location.size() > 0)
|
||||
// Toast.makeText(_context, "Location Info Latitude: ${location[0]}, Longitude: ${location[1]}", Toast.LENGTH_SHORT).show()
|
||||
// }
|
||||
|
||||
// Set events delegate for reporting issues
|
||||
// PlugAndPlaySDK.setPiEventsDelegate(new PIEventsDelegate() {
|
||||
// @Override
|
||||
// public void onReportIssue(PIReportIssue issue) {
|
||||
// Log.e("Issue Reported: ", issue.getReportType());
|
||||
// }
|
||||
// // Implement issue reporting logic here }
|
||||
// @Override
|
||||
// public void onSharedLocation(String link) {
|
||||
// // Implement Shared location logic here
|
||||
// }
|
||||
// })
|
||||
|
||||
// Start the Penguin SDK
|
||||
PlugAndPlaySDK.setPiEventsDelegate(this)
|
||||
PlugAndPlaySDK.setPiLocationDelegate(this)
|
||||
PlugAndPlaySDK.start(mContext, this)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Navigates to the specified reference ID.
|
||||
*
|
||||
* @param refID The reference ID to navigate to.
|
||||
*/
|
||||
fun navigateTo(refID: String) {
|
||||
try {
|
||||
if (refID.isBlank()) {
|
||||
Log.e("navigateTo", "Invalid refID: The reference ID is blank.")
|
||||
}
|
||||
// referenceId = refID
|
||||
navigator.navigateTo(mContext, refID,object : RefIdDelegate {
|
||||
override fun onRefByIDSuccess(PoiId: String?) {
|
||||
Log.e("navigateTo", "PoiId is penguin view+++++++ $PoiId")
|
||||
|
||||
// channelFlutter.invokeMethod(
|
||||
// PenguinMethod.navigateToPOI.name,
|
||||
// "navigateTo Success"
|
||||
// )
|
||||
}
|
||||
|
||||
override fun onGetByRefIDError(error: String?) {
|
||||
Log.e("navigateTo", "error is penguin view+++++++ $error")
|
||||
|
||||
// channelFlutter.invokeMethod(
|
||||
// PenguinMethod.navigateToPOI.name,
|
||||
// "navigateTo Failed: Invalid refID"
|
||||
// )
|
||||
}
|
||||
} , creationParams["clientID"] as String, creationParams["clientKey"] as String )
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e("navigateTo", "Exception occurred during navigation: ${e.message}", e)
|
||||
// channelFlutter.invokeMethod(
|
||||
// PenguinMethod.navigateToPOI.name,
|
||||
// "Failed: Exception - ${e.message}"
|
||||
// )
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when Penguin UI setup is successful.
|
||||
*
|
||||
* @param warningCode Optional warning code received from the SDK.
|
||||
*/
|
||||
override fun onPenNavSuccess(warningCode: String?) {
|
||||
val clinicId = creationParams["clinicID"] as String
|
||||
|
||||
if(clinicId.isEmpty()) return
|
||||
|
||||
navigateTo(clinicId)
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when there is an initialization error with Penguin UI.
|
||||
*
|
||||
* @param description Description of the error.
|
||||
* @param errorType Type of initialization error.
|
||||
*/
|
||||
override fun onPenNavInitializationError(
|
||||
description: String?,
|
||||
errorType: InitializationErrorType?
|
||||
) {
|
||||
val arguments: Map<String, Any?> = mapOf(
|
||||
"description" to description,
|
||||
"type" to errorType?.name
|
||||
)
|
||||
Log.d(
|
||||
"description",
|
||||
"description : ${description}"
|
||||
)
|
||||
|
||||
channel.invokeMethod(PenguinMethod.onPenNavInitializationError.name, arguments)
|
||||
Toast.makeText(mContext, "Navigation Error: $description", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when Penguin UI is dismissed.
|
||||
*/
|
||||
override fun onPenNavUIDismiss() {
|
||||
// Handle UI dismissal if needed
|
||||
try {
|
||||
mContext.unregisterReceiver(permissionResultReceiver)
|
||||
dispose();
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Log.e("PenguinView", "Receiver not registered: $e")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onReportIssue(issue: PIReportIssue?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun onSharedLocation(link: String?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun onLocationOffCampus(location: ArrayList<Double>?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun onLocationMessage(locationMessage: LocationMessage?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1021 B |
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 1.0 KiB |
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.cloud.diplomaticquarterapp.whatsapp.WhatsAppCodeActivity">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_horizontal">
|
||||
<FrameLayout
|
||||
android:id="@+id/publisher_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FF9800" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_horizontal">
|
||||
<FrameLayout
|
||||
android:id="@+id/subscriber_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#3F51B5" />
|
||||
|
||||
<TextView
|
||||
android:text="Remote"
|
||||
android:textColor="#FFFFFF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:keep="@drawable/*,@raw/slow_spring_board" />
|
||||
@ -1,3 +0,0 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- <string name="mapbox_access_token" translatable="false" tools:ignore="UnusedResources">sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg</string>-->
|
||||
</resources>
|
||||
@ -1,23 +0,0 @@
|
||||
<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>
|
||||
<string name="GEOFENCE_INSUFFICIENT_LOCATION_PERMISSION">
|
||||
App do not have permission to access location service.
|
||||
</string>
|
||||
<string name="GEOFENCE_REQUEST_TOO_FREQUENT">
|
||||
Geofence requests happened too frequently.
|
||||
</string>
|
||||
<string name="mapbox_access_token" translatable="false">pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ</string>
|
||||
</resources>
|
||||
|
Before Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 193 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 220 KiB |
|
Before Width: | Height: | Size: 224 KiB |
|
Before Width: | Height: | Size: 353 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 273 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 30 KiB |
@ -1,5 +0,0 @@
|
||||
<svg width="35" height="36" viewBox="0 0 35 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M24.7655 2.68793e-05C22.4959 -0.000446999 20.3022 0.831603 18.5867 2.3436C16.8712 3.8556 15.7488 5.94619 15.4254 8.23203C15.4016 8.40311 15.4144 8.5774 15.4629 8.74298C15.5115 8.90856 15.5945 9.06152 15.7065 9.19141C15.8185 9.32131 15.9567 9.42506 16.1117 9.49558C16.2667 9.56611 16.4349 9.60173 16.6047 9.60003C16.8891 9.6033 17.1651 9.50187 17.3818 9.31443C17.5985 9.127 17.7414 8.86617 17.784 8.58003C18.0405 6.6832 19.027 4.96773 20.5265 3.81101C22.026 2.65428 23.9156 2.15105 25.7797 2.41203C27.6439 2.673 29.3298 3.6768 30.4665 5.20259C31.6033 6.72839 32.0979 8.6512 31.8414 10.548C31.573 12.3164 30.6823 13.9254 29.3352 15.0755C27.988 16.2256 26.276 16.8385 24.5179 16.8H1.17931C0.866538 16.8 0.566576 16.9265 0.345412 17.1515C0.124248 17.3765 0 17.6818 0 18C0 18.3183 0.124248 18.6235 0.345412 18.8486C0.566576 19.0736 0.866538 19.2 1.17931 19.2H24.4353C26.8716 19.2402 29.2327 18.3408 31.044 16.6824C32.8554 15.024 33.9829 12.7296 34.2 10.26C34.2891 8.94494 34.111 7.62528 33.6769 6.38328C33.2429 5.14127 32.562 4.00355 31.6769 3.04099C30.7918 2.07843 29.7214 1.31167 28.5323 0.788485C27.3432 0.265302 26.061 -0.00309236 24.7655 2.68793e-05Z" fill="#3B355A"/>
|
||||
<path d="M19.8006 21.5996H1.17931C0.866538 21.5996 0.566576 21.726 0.345412 21.9511C0.124248 22.1761 0 22.4814 0 22.7996C0 23.1179 0.124248 23.4231 0.345412 23.6481C0.566576 23.8732 0.866538 23.9996 1.17931 23.9996H19.8006C20.5146 23.9992 21.2194 24.1638 21.8618 24.4809C22.5041 24.7979 23.0674 25.2592 23.5091 25.83C23.9509 26.4008 24.2595 27.0662 24.4117 27.776C24.564 28.4858 24.5559 29.2215 24.3881 29.9276C24.1363 30.985 23.5389 31.924 22.6939 32.5907C21.8488 33.2573 20.8062 33.612 19.7371 33.5967C18.6679 33.5814 17.6356 33.1969 16.8093 32.5062C15.9831 31.8156 15.4119 30.8598 15.1895 29.7956C15.1418 29.5139 14.9968 29.2587 14.7805 29.0761C14.5643 28.8935 14.2912 28.7955 14.0102 28.7996C13.8393 28.7976 13.6699 28.8335 13.514 28.9047C13.358 28.976 13.2191 29.0809 13.1069 29.2121C12.9948 29.3434 12.912 29.4979 12.8643 29.665C12.8166 29.832 12.8052 30.0076 12.8309 30.1796C13.0878 31.5182 13.7131 32.755 14.6339 33.746C15.5547 34.7371 16.7332 35.4416 18.0323 35.7776C19.3313 36.1137 20.6974 36.0673 21.9716 35.644C23.2457 35.2208 24.3756 34.438 25.2295 33.3867C26.0834 32.3355 26.6264 31.0591 26.7951 29.7061C26.9639 28.3531 26.7515 26.9791 26.1827 25.7441C25.6139 24.5092 24.7121 23.464 23.5822 22.7303C22.4524 21.9965 21.141 21.6044 19.8006 21.5996Z" fill="#3B355A"/>
|
||||
<path d="M7.77155 11.8205H1.27355C0.960777 11.8205 0.660814 11.947 0.439651 12.172C0.218487 12.3971 0.0942383 12.7023 0.0942383 13.0205C0.0942383 13.3388 0.218487 13.644 0.439651 13.8691C0.660814 14.0941 0.960777 14.2205 1.27355 14.2205H7.71259C9.06084 14.2431 10.3698 13.7583 11.3884 12.8592C12.407 11.9601 13.0634 10.7099 13.2318 9.34854C13.3614 8.0124 12.9972 6.67504 12.2103 5.59734C11.4233 4.51964 10.27 3.7789 8.97535 3.51963C7.68071 3.26035 6.33757 3.50113 5.20795 4.195C4.07832 4.88887 3.24325 5.98606 2.86562 7.27253C2.81077 7.45608 2.79996 7.65032 2.83411 7.83899C2.86825 8.02765 2.94635 8.20524 3.06186 8.35686C3.17737 8.50848 3.32691 8.62971 3.49796 8.71038C3.66901 8.79106 3.85658 8.82883 4.04493 8.82054C4.31433 8.82852 4.57828 8.74238 4.79286 8.57644C5.00743 8.4105 5.15967 8.17479 5.22424 7.90854C5.44561 7.20326 5.91546 6.60618 6.54341 6.23217C7.17136 5.85817 7.91304 5.73365 8.62578 5.88257C9.33852 6.03149 9.97197 6.44333 10.4043 7.03887C10.8366 7.6344 11.0372 8.37156 10.9675 9.10854C10.865 9.88557 10.4799 10.5952 9.88817 11.0974C9.29645 11.5995 8.54118 11.8575 7.77155 11.8205Z" fill="#3B355A"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.6 KiB |
@ -1,3 +0,0 @@
|
||||
<svg width="30" height="41" viewBox="0 0 30 41" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M29.943 24.2303L29.9145 23.8321C29.4563 17.7622 26.6788 13.9572 24.2285 10.601C21.9596 7.49317 20 4.80939 20 0.849479C20 0.531496 19.825 0.24086 19.5475 0.0950652C19.2691 -0.0515247 18.9347 -0.027517 18.6816 0.159695C15.0016 2.83933 11.9312 7.35572 10.8586 11.665C10.114 14.6652 10.0155 18.0379 10.0016 20.2655C6.6032 19.5268 5.83336 14.3538 5.82523 14.2975C5.78695 14.0292 5.62586 13.7957 5.39148 13.6681C5.15469 13.5423 4.87633 13.5332 4.63625 13.6541C4.45805 13.7418 0.262031 15.9114 0.0178903 24.5748C0.000780959 24.863 0 25.1511 0 25.4401C0 33.8559 6.7293 40.7033 15 40.7033C23.2707 40.7033 30 33.8559 30 25.4401C30 25.0178 29.9716 24.6237 29.943 24.2303ZM15 39.0074C12.2428 39.0074 10 36.5762 10 33.5876C10 33.4858 9.99922 33.3831 10.0065 33.2572C10.0398 31.9969 10.2751 31.1365 10.533 30.5643C11.0165 31.621 11.8815 32.5922 13.2845 32.5922C13.7452 32.5922 14.1179 32.213 14.1179 31.7443C14.1179 30.5369 14.1423 29.1441 14.4377 27.887C14.7006 26.7716 15.3288 25.5866 16.1248 24.636C16.4788 25.8698 17.1689 26.8685 17.8427 27.8432C18.8071 29.2377 19.804 30.6793 19.979 33.1379C19.9895 33.2836 20.0002 33.4302 20.0002 33.5875C20 36.5762 17.7572 39.0074 15 39.0074ZM20.2666 37.8994C21.1316 36.6991 21.6667 35.2154 21.6667 33.5876C21.6667 33.3881 21.6545 33.2025 21.6301 32.8556C21.4323 30.0873 20.2498 28.3765 19.2058 26.867C18.3163 25.5818 17.5489 24.4714 17.5489 22.8963C17.5489 22.5742 17.3698 22.2802 17.0866 22.137C16.8051 21.9928 16.4649 22.0252 16.2134 22.2198C14.6152 23.4486 13.2821 25.5172 12.8166 27.4922C12.579 28.505 12.496 29.6005 12.4667 30.5014C11.8889 29.8688 11.7098 28.6962 11.7083 28.6805C11.6709 28.4081 11.5065 28.1704 11.2664 28.0437C11.028 27.9179 10.7423 27.9146 10.5023 28.0404C10.2923 28.1497 8.44742 29.2262 8.34164 33.1861C8.3343 33.3203 8.33352 33.4544 8.33352 33.5877C8.33352 35.2155 8.86867 36.6992 9.73367 37.8995C4.9943 35.8171 1.66687 31.0181 1.66687 25.4403C1.66687 25.186 1.66609 24.9327 1.68312 24.6502C1.82633 19.5674 3.42469 17.0468 4.46797 15.9347C5.19547 18.5846 7.10141 22.0484 10.8335 22.0484C11.2941 22.0484 11.6669 21.6691 11.6669 21.2004C11.6669 18.3626 11.7295 15.0834 12.475 12.0808C13.3213 8.679 15.6398 5.00567 18.4385 2.51897C18.9032 6.15096 20.8473 8.81406 22.8909 11.6121C25.3201 14.9393 27.8315 18.3799 28.2522 23.9513L28.2807 24.357C28.3067 24.7098 28.3336 25.0618 28.3336 25.4402C28.3334 31.0181 25.0059 35.8171 20.2666 37.8994Z" fill="#D59E95"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.5 KiB |
@ -1,3 +0,0 @@
|
||||
<svg width="27" height="35" viewBox="0 0 27 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M17.7188 6.51163C19.575 6.51163 21.0938 5.04651 21.0938 3.25581C21.0938 1.46512 19.575 0 17.7188 0C15.8625 0 14.3438 1.46512 14.3438 3.25581C14.3438 5.04651 15.8625 6.51163 17.7188 6.51163ZM12.3188 26.0465L13.3312 21.9767L16.875 25.2326V33.3721C16.875 34.186 17.55 35 18.5625 35C19.575 35 20.25 34.186 20.25 33.3721V24.2558C20.25 23.2791 19.9125 22.4651 19.2375 21.9767L16.7062 19.6977L17.7188 14.814C19.575 16.7674 22.1062 18.2326 25.1437 18.7209C26.1562 18.8837 27 18.0698 27 17.093C27 16.2791 26.325 15.6279 25.4813 15.4651C22.95 14.9767 20.7563 13.6744 19.7437 11.7209L18.0562 9.11628C17.3813 8.13953 16.3687 7.48837 15.1875 7.48837C14.6812 7.48837 14.3438 7.65116 13.8375 7.65116L7.0875 10.4186C5.7375 10.7442 5.0625 11.8837 5.0625 13.186V17.093C5.0625 18.0698 5.7375 18.7209 6.75 18.7209C7.7625 18.7209 8.4375 18.0698 8.4375 17.093V13.186L11.475 12.0465L8.775 25.2326L2.025 23.9302C1.18125 23.7674 0.16875 24.2558 0 25.2326C0 26.0465 0.50625 26.8605 1.35 27.186L8.4375 28.4884C10.125 28.814 11.9813 27.6744 12.3188 26.0465Z" fill="#6A46F5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 86 KiB |
@ -1,3 +0,0 @@
|
||||
<svg width="29" height="25" viewBox="0 0 29 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.5 25C14.3533 25 14.2066 24.9622 14.0752 24.8866C13.9325 24.8045 10.5414 22.8419 7.10161 19.8848C5.06289 18.1322 3.4355 16.3939 2.26474 14.7182C0.749726 12.5499 -0.0121446 10.4643 0.000146364 8.51917C0.014533 6.2558 0.827833 4.12725 2.2904 2.52556C3.77767 0.89688 5.76246 0 7.87928 0C10.5922 0 13.0725 1.51475 14.5 3.91429C15.9275 1.5148 18.4079 0 21.1208 0C23.1207 0 25.0287 0.809258 26.4937 2.27873C28.1013 3.89131 29.0148 6.16982 28.9998 8.5299C28.9875 10.4716 28.2113 12.5541 26.693 14.7194C25.5186 16.3942 23.8935 18.1318 21.8627 19.8838C18.4355 22.8407 15.0688 24.8032 14.9271 24.8853C14.7951 24.9617 14.6475 25 14.5 25Z" fill="#6A46F5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 764 B |
@ -1,4 +0,0 @@
|
||||
<svg width="23" height="36" viewBox="0 0 23 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.5555 6.567C15.3689 6.567 16.839 5.09693 16.839 3.2835C16.839 1.47007 15.3689 0 13.5555 0C11.742 0 10.272 1.47007 10.272 3.2835C10.272 5.09693 11.742 6.567 13.5555 6.567Z" fill="#3263B8"/>
|
||||
<path d="M21.8875 16.0899L17.66 14.6945C17.66 14.6945 15.3205 9.27668 15.2384 9.11251C14.6638 8.08642 13.5967 7.38867 12.3654 7.38867C11.8728 7.38867 11.3803 7.5118 10.9699 7.71702L5.22376 9.97443C4.81332 10.1386 4.48497 10.467 4.3208 10.8774L2.26861 15.8026C1.94026 16.6235 2.30966 17.6086 3.17157 17.9369C3.37679 18.019 3.58201 18.06 3.78723 18.06C4.44393 18.06 5.05959 17.6907 5.30585 17.034L6.98864 12.7654L8.71248 12.1087L5.88046 25.9404L0.380599 32.6306C-0.194014 33.3283 -0.111926 34.3544 0.585818 34.929C0.873124 35.1753 1.24252 35.2984 1.61191 35.2984C2.10444 35.2984 2.55592 35.0932 2.88427 34.6828L8.63039 27.7053C8.79457 27.5001 8.9177 27.2538 8.95874 27.0076L9.94379 22.2465L14.3765 25.4479V33.6567C14.3765 34.5596 15.1153 35.2984 16.0183 35.2984C16.9212 35.2984 17.66 34.5596 17.66 33.6567V24.627C17.66 24.0935 17.4138 23.601 17.0033 23.3136L13.0221 20.3995L14.1303 14.8586L14.9101 16.6646C15.1153 17.075 15.4437 17.4033 15.8951 17.5675L20.8204 19.2093C20.9846 19.2503 21.1487 19.2914 21.354 19.2914C22.0517 19.2914 22.6674 18.8399 22.9136 18.1832C23.2009 17.3213 22.7494 16.3773 21.8875 16.0899Z" fill="#3263B8"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 222 B |
|
Before Width: | Height: | Size: 412 B |
@ -1,22 +0,0 @@
|
||||
export const icons = {
|
||||
chatSend: require('./chat-send.png'),
|
||||
defaultAvatar: require('./default-avatar.png'),
|
||||
locked: require('./locked.png'),
|
||||
more: require('./more.png'),
|
||||
mute: require('./mute.png'),
|
||||
muted: require('./muted.png'),
|
||||
shareOn: require('./share-on.png'),
|
||||
shareOff: require('./share-off.png'),
|
||||
speakerOn: require('./speaker-on.png'),
|
||||
speakerOff: require('./speaker-off.png'),
|
||||
switchCamera: require('./switch-camera.png'),
|
||||
hamburger: require('./hamburger.png'),
|
||||
questionBalloon: require('./question-ballon.png'),
|
||||
talking: require('./talking.png'),
|
||||
unmute: require('./unmute.png'),
|
||||
unlocked: require('./unlocked.png'),
|
||||
videoOn: require('./video-on.png'),
|
||||
videoOff: require('./video-off.png'),
|
||||
};
|
||||
|
||||
export type IconTypes = keyof typeof icons;
|
||||
|
Before Width: | Height: | Size: 376 B |
|
Before Width: | Height: | Size: 567 B |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 877 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 384 B |
|
Before Width: | Height: | Size: 634 B |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 14 KiB |