I had developed gmail contaxtual gadget spec file and uploaded it on my HTTP server. And configured "google apps marketplace sdk" on google developer console. But my gadget is stll not showing in gmail inbox massage. I might be some mistakes in gadget spec file.
I tried a lot but not getting any solution. The googel developer doc is still showing old process of manifest file which is not working right now.
Below is my gadget spec code.
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs
author="Pragmatic techsoft"
author_email="pragtech.co.in"
height="200"
author_location="India">
<Require feature="dynamic-height"/>
<Require feature="google.contentmatch">
<Param name="extractors">
google.com:EmailBodyExtractor
google.com:SenderEmailExtractor
</Param>
</Require>
</ModulePrefs>
<Content type="html" view="card">
<![CDATA[
hello
]]>
</Content>
</Module>
So, can any one guide me for how to configure all fields in marketplace sdk and also writting gadget spec file.
Any suggestions are most welcome.
Thanks in advance.
To help you on the Marketplace SDK configuration part, you may want to check Configure the Google Apps Marketplace SDK. With this, use the Enabled APIs link in the API section of the [Google API Console] to see a list of all your enabled APIs. In the list, locate the Google Apps Marketplace SDK, then click on its configuration icon. You'll need to configure each of the following settings:
- Application Info: enter the following details for your app:
- a short description for the app
- icons for each size
- select "Allow individual install" if you wish to allow installation by individual end users
- Support URLs: enter a URL for your app's terms of service, and optionally for the other URL types listed
- Scopes: enter the OAuth2 scopes for the services your app will access
- Extensions: these settings enable app extensions
Click Save changes when you are done.
Then, for the gadget spec file, you may want to also check writing the gadget spec. Please also note of the following when writing your gadget spec:
- Gmail contextual gadgets are written using the gadgets.* API.
- be sure you are using the security best practices described in Using the right frameworks for security.
And, it will really help if you read through Gmail Contextual Gadgets and noting on the right framework for security and limitations in using extractors to avoid encountering other issues.
Pay attention to below hints:
Add an app to chrome web store and link it to your Google project, which you describe contextual gadget, with project ID. After publish this app, add it to test Google Domain. Since your gadget is in development stage so, don’t publish your app to Public. There are different "Visibility options" that you can choose.
To disable cache use nogadgetcache=1 (e.g. https://mail.google.com/?nogadgetcache=1)
- Login with admin account which you want to test it, otherwise take more time to update manifest.
- After Modify “Google Apps Marketplace SDK” click on “Test Installation Flow” to be sure there is no new permission.
I did these part and works for me:
- Define google.com:MessageIDExtractor as first extension, however you don’t need that.
I recommend that select every scopes which you want to use in other extensions here! I don’t know why put it seems the google just ask these permission for my gadget
- Define Param extractor in gadget.xml separately not with comma:
<Require feature="google.contentmatch">
<Param name="extractors">
google.com:MessageIDExtractor
</Param>
<Param name="extractors">
google.com:SenderEmailExtractor
</Param>
</Require>
来源:https://stackoverflow.com/questions/40805631/gmail-contaxtual-gadget-is-now-showing-in-gmail-message