-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listfound in release: 2.10Found to occur in 2.10Found to occur in 2.10found in release: 2.11Found to occur in 2.11Found to occur in 2.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: shared_preferencesPlugin to read and write Shared PreferencesPlugin to read and write Shared Preferencespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
I'm working on a Flutter app in which I'm using the shared_preferences: ^2.0.13 package.
Flutter version : 2.10.1 (latest)
gradle version: 6.7
Android gradle plugin version: 4.1.3
kotlin version: 1.6.10
flutterEmbedding 2 (in android menifiest)
MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences).
While getting FCM message received in background.
Kindly refer the below code
main.dart
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
await Firebase.initializeApp();
print('Got a message onBackgroundMessageHandler_');
print("Handling a background message: ${message.messageId}");
print('Shared pref process starts');
SharedPreferences sf = await SharedPreferences.getInstance();
sf.setString("key", "Value");
print('${sf.getKeys()}');
print('Shared pref process ends');
}
void main() async{
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
runApp(const MyApp());
}
MainActivity.kt
class MainActivity: FlutterActivity() {
}
Gabanelli, maximilienGilet, kuhnroyal, MariaMelnik, absar and 13 moreTom3652 and ViniciusSossela
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listfound in release: 2.10Found to occur in 2.10Found to occur in 2.10found in release: 2.11Found to occur in 2.11Found to occur in 2.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: shared_preferencesPlugin to read and write Shared PreferencesPlugin to read and write Shared Preferencespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version