How to keep cookies with webview-based Chrome Hosted App - google-chrome-app

I've just built my first Chrome app (https://chrome.google.com/webstore/detail/gitter/ldhcdmnhbafhckhidlhdbeekpifobpdc) and am experiencing a problem with cookies.
The app effectively boots an index.html page in a window, which has a webview pointing at our regular web application.
If I Quit Chrome on my Mac, every time I launch the Gitter Chrome App, any cookies seem to have been wiped out and so I have to login again (and also login to GitHub again).
I can't quite exactly figure out where to start looking, if anyone has any pointers, I would much appreciate it.
PS. I've checked this question & answer out (chrome Extension : Set persistent cookie in chrome extension?) and as far as I can tell my problem isn't related to non-expiring cookies as we do set expiration on the cookies.
My manifest looks like this:
{
"app": {
"background": {
"scripts": [ "launch.js" ]
}
},
"description": "Chat for GitHub.",
"icons": {
"128": "icon-128.png",
"16": "icon-16.png"
},
"manifest_version": 2,
"name": "Gitter",
"short_name": "Gitter",
"offline_enabled": true,
"permissions": [
"unlimitedStorage",
"notifications",
"webview",
"http://*/*"
],
"version": "1.0.0.3"
}
and the page it boots into a window basically does this:
<webview id="wv1" style="width:100%; height:100%;"
src="https://gitter.im/">
</webview>

I think you need to add a partition attribute to your webview tag with a value starting with persist:
partition
Storage partition ID used by the webview tag. If the storage partition ID starts with persist: (partition="persist:googlepluswidgets"), the webview will use a persistent storage partition available to all guests in the app with the same storage partition ID. If the ID is unset or if there is no persist: prefix, the webview will use an in-memory storage partition.

Related

Flutter App Counting Google Analytics Events TWICE

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.

Simulator is not working for smart home action with all configured session

I have follow the documentation, and I created a pkg json like this and the simulator is not working I create this post to change the information with Google community.
https://plus.google.com/communities/105684267327487893574/stream/1dec6e34-163c-4f1a-883a-548cff52b522
The doc I sued to create the smart home is : https://developers.google.com/actions/smarthome/create-app#request
{
"actions": [{
"name": "actions.devices",
"deviceControl": {
},
"fulfillment": {
"conversationName": "automation"
}
}],
"conversations": {
"automation" :
{
"name": "automation",
"url": "My ACTION Handler Url API"
}
}
}
I configure the action
The simulator's default text is incorrect in the case of Smart Home actions. In a house you do not talk to your lights and ask them to turn off. You should just say "turn on my lights" without invoking any third-party app.
First, you need to go to the Home Control settings in the Google Assistant settings. There, you can link your Google account to the Smart Home server and SYNC your devices.
After that, you can directly control them without actually passing into a third-party conversation. The simulator does support these commands and will respond correctly once you do the account linking. However, it is different from a conversation.

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.

How to list a Chrome App in the Store's Offline Enabled Category?

How to take a Chrome packaged app that works offline and have it listed in the Chrome Web Store's Offline Enabled Collection?
While most app listing attributes are controlled from the Chrome Web Store Developer Dashboard, the bit to flip to indicate that it works offline is done in the app manifest file! Set offline_enabled to true:
manifest.json:
{
"name": "My App",
// ...
"offline_enabled": true,
// ...
}

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.