Rewrite the notification code in Kotlin
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
library moxplatform_android;
|
||||
|
||||
export 'src/isolate_android.dart';
|
||||
export 'src/media_android.dart';
|
||||
export 'src/plugin_android.dart';
|
||||
export 'src/service_android.dart';
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import 'package:media_scanner/media_scanner.dart';
|
||||
import 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart';
|
||||
|
||||
class AndroidMediaScannerImplementation extends MediaScannerImplementation {
|
||||
@override
|
||||
void scanFile(String path) {
|
||||
MediaScanner.loadMedia(path: path);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart';
|
||||
|
||||
class AndroidNotificationsImplementation extends NotificationsImplementation {
|
||||
final NotificationsImplementationApi _api = NotificationsImplementationApi();
|
||||
final MoxplatformApi _api = MoxplatformApi();
|
||||
|
||||
|
||||
@override
|
||||
|
||||
13
packages/moxplatform_android/lib/src/platform_android.dart
Normal file
13
packages/moxplatform_android/lib/src/platform_android.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart';
|
||||
|
||||
class AndroidPlatformImplementation extends PlatformImplementation {
|
||||
@override
|
||||
Future<String> getCacheDataPath() {
|
||||
return MoxplatformInterface.api.getCacheDataPath();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String> getPersistentDataPath() {
|
||||
return MoxplatformInterface.api.getPersistentDataPath();
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:moxplatform_android/src/contacts_android.dart';
|
||||
import 'package:moxplatform_android/src/crypto_android.dart';
|
||||
import 'package:moxplatform_android/src/isolate_android.dart';
|
||||
import 'package:moxplatform_android/src/media_android.dart';
|
||||
import 'package:moxplatform_android/src/notifications_android.dart';
|
||||
import 'package:moxplatform_android/src/platform_android.dart';
|
||||
import 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart';
|
||||
|
||||
class MoxplatformAndroidPlugin extends MoxplatformInterface {
|
||||
@@ -12,8 +12,8 @@ class MoxplatformAndroidPlugin extends MoxplatformInterface {
|
||||
MoxplatformInterface.contacts = AndroidContactsImplementation();
|
||||
MoxplatformInterface.crypto = AndroidCryptographyImplementation();
|
||||
MoxplatformInterface.handler = AndroidIsolateHandler();
|
||||
MoxplatformInterface.media = AndroidMediaScannerImplementation();
|
||||
MoxplatformInterface.notifications = AndroidNotificationsImplementation();
|
||||
MoxplatformInterface.platform = AndroidPlatformImplementation();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user