amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

Adding endpoints from Flutter Amplify

Open bytewind-io opened this issue 6 years ago • 9 comments

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

bytewind-io avatar Nov 03 '20 11:11 bytewind-io

Hi, any updates on how to Adding endpoints for notification pinpoint using FCM token?

bostaginting avatar Feb 04 '21 10:02 bostaginting

i want to update some data through update enpoints, using this code

                AnalyticsUserProfile analyticsUserProfile = new AnalyticsUserProfile();
                final AnalyticsProperties analyticsProperties = AnalyticsProperties();
                analyticsProperties.addDoubleProperty('wallet', 100);
                analyticsProperties.addStringProperty('login', 'google');
                analyticsUserProfile.properties = analyticsProperties;
                analyticsUserProfile.email = username;
                await Amplify.Analytics.identifyUser(userId: awsId, userProfile: analyticsUserProfile);
                await Amplify.Analytics.flushEvents();

the output says getCredentials: Validated user is signed-in but I cant see anything in the console also is there any tab where i can see all the updateendpoint request in aws?

mannnish avatar Aug 10 '21 07:08 mannnish

Hi @cvalab

You can add endpoints to Amazon Pinpoint by importing them from a CSV or JSON file.

Screen Shot 2021-09-01 at 7 53 47 AM

Regards Mo

mo-malaka avatar Sep 01 '21 14:09 mo-malaka

i want to update some data through update enpoints, using this code

                AnalyticsUserProfile analyticsUserProfile = new AnalyticsUserProfile();
                final AnalyticsProperties analyticsProperties = AnalyticsProperties();
                analyticsProperties.addDoubleProperty('wallet', 100);
                analyticsProperties.addStringProperty('login', 'google');
                analyticsUserProfile.properties = analyticsProperties;
                analyticsUserProfile.email = username;
                await Amplify.Analytics.identifyUser(userId: awsId, userProfile: analyticsUserProfile);
                await Amplify.Analytics.flushEvents();

the output says getCredentials: Validated user is signed-in but I cant see anything in the console also is there any tab where i can see all the updateendpoint request in aws?

can anyone please revert on this?

mannnish avatar Sep 10 '21 09:09 mannnish

Could you please reopen this case? Looking for updateEndpoint feature in flutter.

larinnim avatar Jan 19 '22 22:01 larinnim

is that enough for adm ? I wanna push notifications using ADM and flutter? How I can add endpoints?

aydemiromer avatar Jan 28 '22 10:01 aydemiromer

Why is this issue closed? It's clear there is no adequate solution identified. It's 2022 and we are supposed to be importing tokens from JSONs just to be able to make use of the Pinpoint features?

As @larinnim mentioned we need the updateEndpoint method in the flutter library, similarly to how it is implemented for iOS and Android. I will be opening a new ticket to track this issue.

geoox avatar Feb 23 '22 10:02 geoox

@geoox - thank you for submitting #1392!

abdallahshaban557 avatar Feb 23 '22 16:02 abdallahshaban557

@cvalab This won't work for you as there is a limit for the value of a custom attribute in pinpoint endpoint. For instance: android device tokens size exceeds 100 characters so when I tried to implement this the device_toke got truncated by pinpoint :) Source https://docs.aws.amazon.com/pinpoint/latest/developerguide/quotas.html#quotas-endpoint

parad0x96 avatar May 27 '22 16:05 parad0x96