Flutter App Counting Google Analytics Events TWICE - flutter

I am logging some predefined event and custom events on my flutter app using Google Analytics through the below way:
FirebaseAnalytics.instance.logEvent(
name: "select_content",
parameters: {
"content_type": "BusinessProfile",
"item_id": selectedbusinessprofileid,
"user_id": globaluserid,
"Access_Method": "Ad",
"Ad_Method": "CategoriesBoard",
"Gender": globalusergender,
"City": globaluserdefaultcity,
},
);
FirebaseAnalytics.instance.logEvent(
name: "New_Business_Profile",
parameters: {
"category": bpaddselectedcategory,
"Gender": globalusergender,
"City": globaluserdefaultcity,
},
);
the problem is that each event is logged TWICE in google analytics dashboard, in both debug view and production view. the behavior is for both predefined events like "select_content" and any other customer event I create like "New_Business_Profile".
I did some search, some mentioned I need to remove the events I've created from Google Analytics Admin. I did and delete it, the events are still counting twice like this.
any idea what is the reason of this problem or how can I solve it?
Edit: Solved in Debug mode, Removing the events from Google Analytics Admin solved the issue in Debug mode but it took around two hours to be corrected.
will check the production mode in 24 hours and report if solved too.
Edit: Worked fine on live too.

I suggest you to use Dart Debugger and breakpoints. Most likely your code is invoked more than once.

Related

Actions on Google Simulator not working

I follow the actions on Google instruction, just have one action which is the default welcome intent.
I always get this error when I type "talk to XXX ".
Also, I tried the google smart home action example, I could see my devices on mobile assist APP - home control, but I had some error when I test on the simulator like "turn on my lights".
Anyone know what could cause this issue? Thanks!
{
"response": "We're sorry, but something went wrong. Please try again.",
"expectUserResponse": false,
"conversationToken": "",
"audioResponse": "",
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "Sorry, this action is not available in simulation"
}
}
],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 4,
"is3pResponse": false
}
UPDATE
Hi, this issue is fixed. It is because APP activity control is turned off by the company account Administrator, even though I enabled web & App activity on my account.
When you are simulating a conversational action, are you making sure that the project is currently in a 'test draft' state? You may want to disable and re-enable testing by clicking on the testing button in the top right corner of the console.
If you are testing a smart home action, you can't make calls such as "talk to X" as there is no conversational entrypoint for a smart home action. However, after you do account linking commands like "turn on lights" should correctly send the command to your endpoint only for the currently tested action.

Still cannot find google action using Action SDK on Google Home App

I am developing a Google Smart Home App, and I follow the official development document.
Create my project in Google Console
'gactions update --action_project action.json --project {myproject}'
Complete the necessary information,including App Information, Account Linking;
'gactions test --action_project action.json --project {myproject}'
I have tried many times, even I used the other accout, and created it. But the result was same that my smart home app still not appear in my google home.
Someone said they created their app, and it would appear in Home Control section like [test]{project_name} after 'gactions test'. But it not work for me. It is very frustrated. And This step has blocked my further work for many days.
Further more, I want to confirm the following question:
When I created my smart home app, the section is like this:
Actions added from Actions SDK
Actions: (this place is emtpy, is it normal? or lack of something like agent or else)
The Smart Home App in test mode, it is required that voice-only conversations with the Google Home speaker, or directly appear in Google Home App after 'gactions test'?
Any help will be appreciated!
My action.json: { "actions": [{ "name": "actions.devices", "deviceControl": { }, "fulfillment": { "conversationName": "automation" } }], "conversations": { "automation" : { "name": "automation", "url": "https://xxxxx" } } }
running it the first time could be a bit painful. Below is what I do to get it working.
Make sure you have filled in all details on the action console.
Click on the Test button to start your app.
From the simulator, type Talk to . It might ask you to login.
If you can see the response from your app. Then it should work on your google home.
Please note that your test app will expire if you leave it idle for too long. You need to click on the test button to run it again or your google home won't be able to lunch your app.
Also, in your action.json, if you are pointing your intend to a webhook, please make sure your webhook is accessible from google.

Facebook tab HTTPS iFrame issue with scrolling

I have an app (https://www.facebook.com/claritycomms/app_483675254991438)
It works fine when using http, however when moving to HTTPS the page no longer scrolls down, it is cut off by the iFrame.
I am not a coder - I built this app using Hype for Mac - the app worked fine for 3 days and now just doesn't :(
Can anyone help please
I have tried changing the setsize parameters in dashboard but the options arent even there
HELP!
I have 1300 fans who want to use the app!!
This is a known issue - https://developers.facebook.com/live_status
Taken from - https://www.facebook.com/feeds/api_status.php
{
"push": {
"status": "Complete",
"updated": "2012-07-03T18:50:48-07:00",
"id": 10156288
},
"current": {
"health": 3,
"subject": "Issues resizing Page Tab applications",
"post_time": "2012-07-03T19:19:42-07:00"
}
}
This issue is confirmed and Facebook are handling it. The fix should be out soon.

CocoaSoundCloudAPI crashes when I connect to company FaceBook account. Fix required

(I've previously tried SoundCloud GoogleGroups (defunct?), and directly to my SoundCloud contact for this. Told to post the issue here.)
Just trying to get to grips with SoundCloudAPI on iOS and I found a nasty error. Either this is a bug in the API, or a bug in SoundCloud, or (most likely) I'm doing something wrong. :) But the end result would be a broken app, so I'm keen to understand what is going wrong here.
I set up a new iOS project, following the Tobias video, and the CocoaSoundCloudAPI readme.
Using theSCShareViewController I connect to a test SoundCloud account I made for my company. I then create a new connection within the app to a test company FaceBook account. I click install, and Allow All permissions.
The app then hangs, with Terminating app due to uncaught exception 'NSInvalidArgumentException'
on the line (in SCRecordingSaveViewController.m) :
cell.textLabel.text = [connection objectForKey:#"display_name"];
Whenever I run the app now, it crashes on this line.
When I dump out the contents of the connection NSDictionary, it looks like there are two connections listed in self.availableConnections, a "facebook_page" connection with the display_name I gave for my company FaceBook page. But also a second "facebook_profile" with a null display_name. It's this second connection that is causing the API to crash. Presumably the API developers were never expecting a null display_name, but also I don't understand why it's listing two FaceBook connections at all.
If I investigate the value of "display_name" further then Xcode tells me "Variable is not a CFString" and indeed if I look at the class then it is not.
Going into SoundCloud in a browser, I can list the connections, and it shows two of them. One with the name of my company FB account, and a second one:
"http://facebook.com/profile.php?id=***** is your primary Facebook user account"
If I disconnect both of these I can use the SoundCloudAPI again without it crashing.
I then created new personal test SoundCloud and FaceBook accounts, and did the same thing again within the app. This time it did not crash (and in fact worked great), and the connection NSDictionary has one connection "facebook_profile" with a valid display_name. SoundCloud via a browser also lists just one connection.
Note that this also happens with CocoaSoundCloudDemo with no code changes.
I can also hack around with the code to avoid crashing when connecting to my company account:-
// cell.textLabel.text = [connection objectForKey:#"display_name"];
id displayName = [connection objectForKey:#"display_name"];
if ([displayName isKindOfClass:[NSString class]])
{
cell.textLabel.text = (NSString*)displayName;
}
...which gives me two rows with FB connections, but the second is blank. With some effort I can work out what they are doing here in the code, and not show a row if the display_name is invalid, but obviously I'd rather not have to do that and use the standard API code.
SO, long story short:-
1) Does SoundCloud allow you to connect to a company FaceBook account? Is there some special setup you need to do on that FaceBook account so that SoundCloud only sees the "Facebook_profile" and not also "Facebook_page"? The problem seems to be within SoundCloud itself, and not the iOS API, but it is the API that crashes.
2) From my test app, if a user tries to connect a SoundCloud account to a company FaceBook account (at least, with the minimal setup that I have in mine), then the SoundCloudAPI will crash with an exception, and my entire app will continue to crash until the user logs on with a browser to SoundCloud and removes the two connections manually. Surely this can't be good, but I've Googled for anyone with a similar issue and found nothing. Without finding a fix for this I can't use the full API in my app for fear my users will hit the same crash bug, and perhaps will have to create a cut-down custom UI that avoids the need to share to FaceBook etc.
sorry that we have not come back to you earlier.
It is always good to receive feedback from our SDK users and yes we should check
against nil values and handle this case accordingly.
However, I investigated the situation you are describing and actually it worked
flawlessly for me. Two rows for Facebook were displayed properly as soon as I
connected my SoundCloud account w/ the new Facebook page in my SoundCloud profile settings.
You can also check which accounts are connected by running
curl "https://api.soundcloud.com/me/connections.json?oauth_token=<YOUR_OAUTH_TOKEN>
In my case I received something like this
{
"kind": "connection",
"id": 12345678,
"created_at": "2013/01/10 15:55:20 +0000",
"display_name": "Testpage",
"post_publish": true,
"post_favorite": true,
"type": "facebook_page",
"service": "facebook_page",
"uri": "https://api.soundcloud.com/connections/12345678"
},
{
"kind": "connection",
"id": 12345679,
"created_at": "2013/01/10 11:07:56 +0000",
"display_name": "Rob",
"post_publish": true,
"post_favorite": true,
"type": "facebook_profile",
"service": "facebook_profile",
"uri": "https://api.soundcloud.com/connections/12345679"
}
So while uploading a new sound via the SDK, I got two Facebook rows in
the sharing section. Are you still experiencing this issue?
We will release an update to our iOS SDK soon, so stay tuned and thanks for your feedback.

Interfacing with wall/feeds

This is the first time I'm trying to develop a facebook app so sorry in advance if my question is too naive.
What I need to do is making a chat-like facebook application where:
the user can write something on the wall
the app should be able to detect this event and send an HTTP request to an external web service of my own which will provide a response (text)
publish that text as a comment
the user should be able to continue the dialog by entering another comment(s) (in which case we go back to step #2)
Basically, this would be very similar to:
https://www.facebook.com/SkyscannerFlightSearch
I think one (ugly) way to do this would be making a script which searches for new wall entries/comments and posts replies in an infinite loop by using the Graph API but it's obviously sub-optimal and expensive.
Is there any way to have facebook call a certain url every time a wall post/comment is entered?
Or maybe something like Twitter's streaming API based on long-polling technique?
Am I in the right direction by assuming such kind of solutions or I'm totally missing the point?
Thanks in advance.
Giampaolo
I am working on something very similar myself.
So far i have the "loop" which can be set to any page, group or app on facebook.
SAMPLE: https://shawnsspace.com/plugins/wallfeed.php My page wall.
SAMPLE: https://shawnsspace.com/plugins/wallfeed.php?pageid=19292868552&ptype=feed&limit=40 Facebook Platform Wall.
With some perms, a form and user access_tokens i can make the wall postable. Asper UGLY - you do not need to run this in a loop, Facebook supports realtime updates and will send a response to your app when a user, or page has made a change.
MORE: http://developers.facebook.com/docs/api/realtime
Thanks for the input.
I tried to use the real-time API by using object=user and fields=feed.
If I understood the doc correctly this should result in my callback url being called (POST) every time a user writes something on my app's wall.
I received the initial GET request but never POST.
This is the current configuration:
{
"data": [
{
"object": "user",
"callback_url": "http://XXX.XXX.XXX.XX:8888/",
"fields": [
"feed"
],
"active": true
},
{
"object": "page",
"callback_url": "http://XXX.XXX.XXX.XX:8888/",
"fields": [
"picture"
],
"active": true
}
]
}
I've noticed various user comments reporting different concerns about the reliability of this API.
Also, here:
http://developers.facebook.com/docs/reference/api/page/
it says: "Note: Real-time updates are not yet supported for the total number of Page checkins."
...which I'm not sure what it means exactly.
For the record, my app's page I'm using for tests is:
http://www.facebook.com/pages/testgiamp/187148861354102?sk=wall