Notification for new photo/video upload in Google Photo API - google-photos

I'm working on a digital photo frame app with the new Google Photo Library API beta.
Assume that multiple devices are able to access the same album (shared album, or login with the same account), when there is a picture uploaded from one device, can other devices receive any notification regarding the new upload? If polling is needed for now (that's not really something efficient), what's the recommended interval for polling?
The platforms are Android (TV+Mobile)/iOS/tvOS

Right now there's no way to be notified of any changes to the library or albums.
You will need to poll an album (ie. list its contents) or the library to see if any new media has been added. For albums you could also just list the albums and check if the number of media inside it has changed.
The polling interval depends on your use case and how long of a wait is acceptable to your users. For example, you could run a manual refresh in the background every hour if your app isn't open and refresh more frequently when the user is interacting with your app. Maybe you could also include a 'refresh' button to trigger it manually?
Alternatively, if the entire process is handled through your application, you could also send a notification through a different notification service (Firebase Cloud Messaging) to notify your apps and server that a new media item has been added. This is something you'd need to implement yourself though.
This is definitely something that has come up before and I'd encourage you to file a feature request on our public issue tracker: https://developers.google.com/photos/library/support/how-to-get-help#missing-features

Related

Is there any way of creating facebook events using Facebook SDK?

I want to build an app for publicising events. Ideally I would like to create the event via my app and somehow add this as an event to a business facebook page. Every avenue I have looked at suggests that what I want to do is just not possible.
Am I correct in this conclusion?
As a workaround, can you use the facebook API to create timed posts such that they would appear on a businesses time line with date and time on?

NFC Photography Identification

There was a music event a friend of mine went to and they had a few photographers waling around out there. The photographers took photos that were instantly uploaded to the users facebook account via an NFC wristband. The workflow when it was explained to me looks like this:
Step-1 Get a nfc wristband at the Kiosk- Facebook will be encoded into the wristband.
Step-2 Walk around the event. If a photographer takes your picture, hold your wrist to the camera and the image will be watermarked with event/sponsor logos at the bottom and posted to your facebook account .
So, I was thinking how this could possibly be done- I googled and googled, but I got nothing. Here's my guess- All the FB authentication can be in the wristband. An EyeFi SD card has the ability to take a photo and transmit it. NFC Arduino reader could read the persons wristband, authenticate, then go into the images and pull the last photo that was taken and post it to the users fb page. What do you think?
We have a (beta) product that performs this exact function. It's called Flomio Kiosk. The way it works is with NFC wristbands and Android NFC terminals like the Galaxy S4 Zoom. The system lets guests associate wristbands/cards to their Facebook or Email accounts. The NFC Kiosk application has a photographer mode that allows pictures taken to be tagged and uploaded with the scanned wristband's profile.
The architecture of the stack is straightforward. The UUID of the wristbands are associated with the Facebook token of the associated guest. This needs to be stored in a cloud server so that you can effectively OAuth2.0 to Facebook and post on behalf of the guest. This setup also allows us to remain liability free of ill formed posts. Each developer that uses our system needs to create their own Facebook app and get it approved. If spam or content that violates Facebook T&C is posted then only that Facebook app will be shutdown rather than the whole Flomio Kiosk solution.
In order for us to grab the Facebook token for each guest, the guest must go to the events' landing page (we use eventname.flomio.com), enter their wristband code (5 digit number) and sign in with their Facebook credentials. The guest can then select what permissions to give the event application, such as post to "Only Me" and allow access to their "News Feed". Once this registration process is complete the wristband is considered activated and the OAuth token for accessing the guests Facebook profile is stored in the Flomio database alongside the wristband UUID.
When a wristband is scanned at an access point, the UUID is sent up to Flomio via websockets for ultra-fast responsiveness that reveals the guest name and profile picture. This way event organizers can provide a more personalized experience to guests. In photographer mode, the images are taken and then wristbands are scanned. Images are posted through Flomio where event logos are overlaid on the pictures for added brand recognition. Included are predefined post messages as well that event organizers can curate before hand. Here's a simple diagram of how things come together.
For high end cameras like the Nikon D300 we use the Transcend Wifi SDcards as they're more hacker friendly. These run Linux so we execute some scripts to tag the photos as soon as they're taken but upload them later through a background process. Our Kiosk solution is undergoing maintenance right now to add support for our FloJack and FloBLE product lines. Once complete any smartphone will be able to act as a scan terminal in a multitude of deployment scenarios. Sign up for our blog to stay tuned with our latest releases.

Navigate to the timeline (to the card with bundleId) from within an application

I have a Glass application that is activated by a voice command. The user requests a product and the request is then passed on to a node.js server, which handles the bulk logic of my application. When the node server is done, it builds some HTML templates that it passes on to the Mirror API, which then puts those cards into the timeline of the Glass app.
Now the problem I have is this:
When a user requests something from within the application, he just stays within that application but the cards from the Mirror API are put onto the timeline.
Is it possible to navigate the user from within the application to the timeline item that has just been inserted?
As I build the Mirror API timeline item, I know ahead of time what the bundleId will be on the timeline, so can I use that somehow to navigate to that item on the timeline?
I've had a look here on Stackoverflow, the Glass forums and the official documentation and couldn't see anything that would help.. Anybody here have any ideas?
Currently the only way for forcing a specific card to show in the timeline is by using a LiveCard (https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/timeline/LiveCard). Live cards will automatically be given focus when published and you can force the timeline to give your card focus after publishing by calling LiveCard.navigate().
So unfortunately unless you want to change some of the fundamentals of your app, this isn't going to be much help.
Though from the sounds of it, you may be able to use a LiveCard to show what is returned from your server. If you want to perform inserts via the mirror API, this could still be done in addition.

Add video to timeline from GDK or Add "Share" to live card

I'm using the GDK with XE16
I would like to save a video using MediaRecorder and then put it on the Timeline so I can let the user share the video to Gplus, YouTube or any contact. I am providing some additional information during the recording process as an overlay on the video preview.
I am able to save the videos into the /mnt/sdcard/Movies path. I am invoking the Intent.ACTION_MEDIA_SCANNER_SCAN_FILE to add the recorded video to the media database.
I have not been able to figure out how to add a share intent to on livecard. The previous API supported static cards, but those did not support video attachments; and the API is no longer available. I have also tried to use AccountManager and the com.google account in Glass to get an ouath token for the Mirror api to write direction via oauth2:https://www.googleapis.com/auth/glass.timeline. The authorization request shows up, but it is impossible for the user to accept the request.
I've considered sending the video file back to a proxy server that will then call mirror, but this seems like a big round trip for nothing.
I suppose I could send the credentials through this proxy, but this seems like a security nightmare.
The difference between Static Cards and a Timeline Item were large enough that the team, apparently, removed Static Cards until they could make the two of them work much more similarly. What you're trying to do is a commonly requested, and it does make sense that both should work mostly the same way.
You're on the right track for how to handle this at the moment - use the Mirror API to get it into the timeline as a Timeline Item. As you've noticed, you can't go through the auth flow since the user is unable to authenticate through Glass directly.
While you're testing, you can code in an auth token and a refresh token to be provided to the library to do this. For production through MyGlass, take a look at the auth flow that is available at https://developers.google.com/glass/develop/gdk/authentication

Opengraph and music.listen

Trying several time to use the music.listen action and ending up trying to create our own listen action and song object.
Some posts suggested that music.listen and songs built in actions and object were for now only available to launch partners.
Can anybody tell if this is true and if yes how we can become a launch partner for the music opengraph ?
Thanks.
known urls :
Using generic open graph objects and actions, and the publish_actions permission?
http://facebook.stackoverflow.com/questions/7602579/opengraph-music-music-listens-returns-error
music.listen is an action only available to selected partners at present. The music.listen action and the Song object are not available for general use.
Facebook are monitoring the ecosystem and will decide at a later date if music.listen is available beyond the existing launch partners.
In the meantime, we suggest you create your own custom 'Play' action and your own custom Song object - custom actions called 'listen' won't currently be approved by Facebook.
I don't know if it's true, but either way it sounds like you will need to have your companies business development team contact Facebook to see if there's still time to become a launch partner.