mark attendance session expire fixed

merge-requests/137/head
Sikander Saleem 3 years ago
parent f8ae5b0987
commit 33da1a103d

@ -1,6 +1,6 @@
import UIKit import UIKit
import Flutter import Flutter
import flutter_local_notifications import Firebase
@UIApplicationMain @UIApplicationMain
@ -9,13 +9,7 @@ import flutter_local_notifications
_ application: UIApplication, _ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: registry)
}
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate
}
GeneratedPluginRegistrant.register(with: self) GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions) return super.application(application, didFinishLaunchingWithOptions: launchOptions)
} }

@ -42,14 +42,16 @@
<string>This App requires access to your location to mark your attendance.</string> <string>This App requires access to your location to mark your attendance.</string>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string>This App requires access to your location to mark your attendance.</string> <string>This App requires access to your location to mark your attendance.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires photo library access to select image as document &amp; upload it.</string>
<key>NSMicrophoneUsageDescription</key> <key>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access to for call.</string> <string>This app requires microphone access to for call.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires photo library access to select image as document &amp; upload it.</string>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
<array> <array>
<string>remote-notification</string> <string>remote-notification</string>
</array> </array>
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
@ -69,13 +71,13 @@
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
<key>com.apple.developer.nfc.readersession.felica.systemcodes</key> <key>com.apple.developer.nfc.readersession.felica.systemcodes</key>
<array> <array>
<string>0000</string> <string>0000</string>
</array> </array>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
</dict> </dict>
</plist> </plist>

@ -29,9 +29,9 @@ class ChatApiClient {
"${ApiConsts.chatLoginTokenUrl}externaluserlogin", "${ApiConsts.chatLoginTokenUrl}externaluserlogin",
{ {
"employeeNumber": AppState().memberInformationList!.eMPLOYEENUMBER.toString(), "employeeNumber": AppState().memberInformationList!.eMPLOYEENUMBER.toString(),
"password": "FxIu26rWIKoF8n6mpbOmAjDLphzFGmpG" "password": "FxIu26rWIKoF8n6mpbOmAjDLphzFGmpG",
// "isMobile": true, "isMobile": true,
// "deviceToken": AppState().deviceNotificationToken "deviceToken": AppState().deviceNotificationToken
}, },
); );

@ -15,25 +15,25 @@ class AppNotifications {
factory AppNotifications() => _instance; factory AppNotifications() => _instance;
Future<void> requestPermissions() async { // Future<void> requestPermissions() async {
if (Platform.isIOS) { // if (Platform.isIOS) {
// await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true); // await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true);
} else if (Platform.isAndroid) { // } else if (Platform.isAndroid) {
// AndroidFlutterLocalNotificationsPlugin? androidImplementation = flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>(); // AndroidFlutterLocalNotificationsPlugin? androidImplementation = flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>();
// bool? granted = await androidImplementation?.requestPermission(); // bool? granted = await androidImplementation?.requestPermission();
// if (granted == false) { // if (granted == false) {
// print("-------------------- Permission Granted ------------------------"); // print("-------------------- Permission Granted ------------------------");
// print(granted); // print(granted);
// await Permission.notification.request(); // await Permission.notification.request();
// } // }
} // }
} // }
Future<void> isAndroidPermGranted() async { // Future<void> isAndroidPermGranted() async {
if (Platform.isAndroid) { // if (Platform.isAndroid) {
// bool granted = await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>()?.areNotificationsEnabled() ?? false; // bool granted = await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>()?.areNotificationsEnabled() ?? false;
} // }
} // }
void initNotification(String? firebaseToken) async { void initNotification(String? firebaseToken) async {
// await requestPermissions(); // await requestPermissions();

Loading…
Cancel
Save