Skip to content

Adding endpoints from Flutter Amplify #172

@bytewind-io

Description

@bytewind-io

I have configured Push notifications in Pinpoint
project. Test messages are successfully sent by specifying the Firebase token. How can I register an FCM token in Pinpoint? How do I add Adding endpoints from Flutter Amplify I'm trying to do it this way, but obviously it's not the right way.

`@override
Future upDateFcmToken(
{@required String token, @required String userId}) async {
debugPrint('@@@ upDateFcmToken userId=>$userId token=>$token ');
final AnalyticsUserProfile analyticsUserProfile = AnalyticsUserProfile();

final AnalyticsUserProfileLocation analyticsUserLocation =
    AnalyticsUserProfileLocation();
analyticsUserLocation.latitude = 5;
analyticsUserLocation.longitude = 5;
analyticsUserLocation.postalCode = '94070';
analyticsUserLocation.city = 'SanFrancisco';
analyticsUserLocation.region = 'California';
analyticsUserLocation.country = 'USA';

analyticsUserProfile.location = analyticsUserLocation;

final AnalyticsProperties analyticsProperties = AnalyticsProperties();
analyticsProperties.addStringProperty('Address', token);
//analyticsProperties.addStringProperty('OptOut', 'NONE');
analyticsProperties.addStringProperty('ChannelType', 'FCM');

analyticsUserProfile.properties = analyticsProperties;

await Amplify.Analytics.identifyUser(
    userId: userId, userProfile: analyticsUserProfile);

await Amplify.Analytics.flushEvents();

}`

Снимок экрана 2020-11-03 в 12 05 03

Metadata

Metadata

Assignees

No one assigned

    Labels

    analyticsIssues related to the Amplify Analytics Categorypending-close-response-requiredThe issue will be closed if details necessary to reproduce the issue are not provided within 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions