InboxSDK get all attachments in a thread - google-chrome

Is there any way to get the title of all attachments in an email thread with InboxSDK? I see there is a method getTitle under AttachmentCardView but if the message itself is not loaded, the attachment card view does not show up. I have tried using messageView.getFileAttachmentCardViews() on unloaded messages, but it just returns an empty array. Is there any way to do this natively with InboxSDK? the next thing I can think of is using the Gmail API, but I don't want to make multiple requests for every email in any thread that the user opens.

Related

DocuSign API creates duplicate entries for the document

enter image description here
We have used DocuSign Rest API and at times we are seeing duplicate entries against one receiver in DocuSign account under "Sent Items". Though the receiver is receiving the email once only. See attached image for reference. What does the "waiting for others" status indicates and under which scenarios this status will be generated?
waiting for others means that one or more of the signing recipients and/or certified copy recipients has not yet completed their action on the envelope.
The multiple rows in the Sent list means that you have sent the envelope more than once, you'll need to check your code to see how that is happening. I suggest that you have your code make a log entry every time your code calls the DocuSign eSignature API (and for create envelope calls, record the envelope id.)
If you can't figure out how your app is sending multiple envelopes when you expect that only one is being sent, use the API Request Logger to see what is being sent to DocuSign from your app.
Re: only one email was sent even though there were two or more envelopes:
Using the DocuSign web app, examine the envelopes that are in flight to check their recipients. It could be that the email address is incorrect in some of the cases.
Check your email tool. The two email notifications for two different DocuSign envelopes will be very similar and are collapsed by some email agents.

How to reload gmail add-on through background process using app-script

May i get some help on the below points where i am using app-script to develop a gmail add-on:
How can we refresh gmail add-on with back ground process?
=> Here is my case, I need to display card with multiple sections which is the process of hitting multiple apis to fetch data and to display the card. For this initially we will show a card with minimal information to the user once i get information from api, i need to update the basic cards with complete information.
How can we trigger a function on every mail thread open?
=> Currently it works once for a mail, here as explained above point need to refresh a card once we fetch the data. If not, user will be seeing same basic information card every time he opens the mail.
From above mentioned issues for point one we are trying to get solution where we can hit service for certain interval of time to check data availability and if data exists then fetch data and update cards, i mean to say need a setTimeout function kind of thing, unfortunately we did'nt found this in app script and We found sleep/waitLock functions in app-script, but my services may take little time to fetch data as it connects though multiple services so we cant make the user to wait until the whole process is to be completed. So that we will show a card with basic information required then after need to auto refresh the cards once we fetch the data. we tried of keeping refresh button for the user to click and fetch the updated data but here we are losing user experience, trying for auto refresh with out user interference to get updated information.
Need a process / solution where we can auto refresh the card with out user interference after the data available at our end instead of making user to wait until the process to be completed.
Earliest reply will be more helpful for us.
Thanks.
If a data status on a third-party backend changes as the result of a user interaction with your add-on UI, it is recommended that the add-on set a 'state changed' bit to true so that any existing client side cache is cleared. See the ActionResponseBuilder.setStateChanged() method description for additional details.
The card-based interface in Gmail Addons is an Apps Script Service.
You can interlink it with other Apps Script services as well as implement API calls - everything within the same Apps Script file.
Gmail Addons contents automatically update every time the user opens a different e-mail or refreshes his browser.
Within your Apps Script code you can install time-driven triggers to run the data availability check with a customized frequency.
Consider to install for your users an Auto Refresh extension if you do not want them to refresh the card themselves.

Launch 2 SMS Compose tasks in Windows Phone 8.1 RT App

I have a button in my Windows Phone 8.1 RT app. When the user clicks the button, 2 SMS are supposed to be sent to two different users.
I can launch one SMS Task using the following code
var message = new ChatMessage();
message.Recipients.Add("1231233");
message.Body = "This is a text message from an app!";
await ChatMessageManager.ShowComposeSmsMessageAsync(message);
But when I do this multiple times, the app crashes. The Task complete event fires on task launch, is there a way to know if the user has returned to the app after sending SMS so the next one can be fired?
If the ShowComposeSmsMessageAsync is anything like the MessageDialog.ShowAsync method, which seems true as both return IAsyncInfo objects (..Action/..Operation is different, but the async part is important for us), this problem could be solved like the problem of showing multiple message dialogs. A quick search yielded this question, with multiple correct solutions: How to allow for multiple popups at once in WinRT?
If the above doesn't work, you could - for example - subscribe to the VisibilityChanged event of the app Window (https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.window.aspx), as it should provide you with an event about the user returning from the sms task.
So basically 1. subscibe to event, 2. send 1st sms, 3. wait for event, 4. send 2nd sms.

Partial GET request for Google Calendar html download

Hi I'm working on an Arduino project and I'd like to display the next event from a Google calendar on a small display. I want to know if there's a way to limit the size of a HTML request from Google. Right now when I do the request I'm getting my full calendar's data. This significantly slows down the time it takes to get the event. I tried using a GET request and Range bytes 1000-3000 but this doesn't seem to work. Does anyone know any workarounds for this without going through Oauth?
You want the "maxResults" parameter and you may also like to limit the fields returned using the "fields" parameter as well. Check the events > list docs for details.

How does Facebook detect when a user receives a new message & make changes to the html?

I'm new to AJAX and PHP but I know that PHP is a server-side scripting language and so there will not be any changes to the html unless the user refreshes the page or the user submits a form. Therefore I suppose the change of the number in <span id="mercurymessagesCountValue"> when a facebook user receives a message
is AJAX-related.
And this is my guess:
The change of the number is triggered when it is detected that another user [the sender] has inserted a new row into a particular table and each column contains different data: the time, the message, the sender id and the receiver id.
So here's my question... In this case, how is the changes in the database detected and how does it trigger a javscript [or something else] to make changes to the html? Or if I'm wrong... can I know how Facebook does that? Thanks very much!!
If I got the question right, you should check out about pull and push models. Facebook works under the push model: facebook server knows when new message is received and it pushes the notification to the client (website open in the browser).
Let me clear a few things up for you here,
AJAX is simply a type of request being sent by the browser to go grab data from another page dynamically. In facebook's case, they actually have a special type of connection to the client computer to keep the page 'alive'. This way, they can push dynamic updates to the client without the need to constantly poll/refresh a single page on the server (would make large amounts of load).
So, let's just pretend, they are constantly refreshing the page on the server to determine how many notifications are unread -
Client -> Ajax Call -> Server PHP Page -> Ajax Return -> Client
So, in order, the client sends a request for the page to be generated by the server.
The server's php page will then count the number of 'unread' notification rows in the database for that particular user. It will then output the number of unread rows in plain html.
The client then recieves this plain HTML from the Ajax call, and simply updates the DOM with the new number of unread notifications
PLEASE NOTE: This is not how facebook works, but it's a good example of how to set up your own basic notification system if you are new to dynamic coding.
My guess is that requests are sent frequently from the client via Javascript, to the host, asking "has anything new happend since last time i asked?". The answer is responded by the server, with PHP, if it is yes, the new data is delivered in the respond and JavaScript updates the DOM (HTML) with the new data, like showing the red flag or something.
javascript:location.load(t);
(t=time interval)
i guess ,, refreshing a page in every several seconds will pop up the notifications recieved..!!