Is there a way to enable the iCloud Music Library through code in such a way that it calls the same functions that are called when a user tries adding a song to their playlist in Apple Music if they do not have iCloud Music Library enabled?
Just to add a bit of clarity, what I want is the same iOS Native popups that the user sees when they go to their settings and try to enable iCloud Music Library which is also called and displayed when they try to add a song to their playlist in the Apple Music App.
It's this one
https://cdn2.macworld.co.uk/cmsdata/features/3630990/2_turn_off.jpg
but instead of asking them to disable iCloud Music Library it asks them to enable it.
There is no such API now to do this.
You can only show alert to user and send him to Settings.
Related
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
I am in the process of doing my Java Coding to create delegators for my users via API. On the Google Developers page, the examples given for Java coding still use the sample.appsforyourdomain.gmailsettings.GmailSettingsService library.
My first question is, is this library or sample JAR file still usable with the new OAuth2.0? If it is, where can I download the file from?
Secondly, I am trying to register delegates for the users on my domain and after registration, I would also like to change the settings of the opened conversations to "Leave conversation unread when opened by others". Is this possible by API?
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.
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
Here's the scenario I'm seeing -
You click to post a sound from SoundCloud to Facebook
It embeds a player in the post that can either be clicked on to take you to the original item on SoundCloud OR you can click a Play icon to play the sound right in your feed.
The player is a Javascript/HTML5 player (which you can see by viewing source) HOWEVER if you take the embedded URL and put it in the Facebook open graph debugger you'll see that it appears to be directing to embed a Flash SWF
How is SoundCloud doing, what appears to be, some kind of redirect trick to get a "og:video" SWF to turn into a JS/HTML5 player?
I notice that there is an "og:type" of "soundcloud:sound" so is it some kind of whitelist/Facebook application scenario?
Try it yourself with this:
OG debug: https://developers.facebook.com/tools/debug/og/object?q=https%3A%2F%2Fsoundcloud.com%2Fsystek_music%2Fcyberoptics-sub-antix-the%3Futm_source%3Dsoundcloud%26utm_campaign%3Dshare%26utm_medium%3Dfacebook
I did find this bit of info from the SoundCloud site about how they've switched to JS players (that fall back to Flash on older browsers): http://help.soundcloud.com/customer/portal/articles/1219149-where-has-the-flash-widget-gone-
This may only be a partial answer. But there exists a special Facebook Open Graph Music program which "is only available to whitelisted partners at this time". This includes a bridge which has the goal to "enable play buttons on feed stories on Facebook.com that can play and pause tracks and indicate which is playing."
However, apparently you can include both Flash (application/x-shockwave-flash) and HTML5 video (video/mp4) formats in the og:video:type property.