use of GCKDeviceProvider from Google-cast-sdk - google-cast-sdk

Use of GCKDeviceProvider in google-cast-sdk.
How to get the list of already discovered device?
Can we store the discovered device list from google-cast-sdk in NSUserDefault, to use it in for app background to foreground handling?

Related

Geofencing in React Native

At the time of this post I believe that there are no geofencing modules available for react native so I would like to implement an alternative poor man's strategy. I discovered react native's geolocation module however the official doc is not clear:
1) Does the Geolocation module run in the background and get the current user coordinates automatically (even if the app is in the background)? If yes, are these stored in a variable or a state?
2) If (1) is true, how can I detect a change in state? Because once I detect a change in state (i.e. user's location) I would like to push this new location to a remote server and store it in a database. On the other hand I do not want to store each and every inch the user is moving!
Does this strategy make sense at all? My concerns are battery consumption as well of course..
1) You need to enable this feature in xcode Then save the location you get from the 'navigator.geolocation.getCurrentPosition' callback somewhere in you app e.g. in your AsyncStorage
2) The callback is only getting called if the location is changed. So you don't need explicitly detect any location change.

How do I notify users of new content available in tvOS apps from the home screen?

Push notifications have been left out of tvOS (understandably so) but the docs seem to contradict themselves in alerting users to the fact that there is something new available in your tvOS app.
Here it seems to say that you can add an app badge: https://developer.apple.com/library/prerelease/tvos/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/WhatAreRemoteNotif.html
Here it says they've been removed from UIKit: https://developer.apple.com/library/prerelease/tvos/releasenotes/General/tvOS90APIDiffs/Objective-C/UIKit.html
Removed UIApplication.applicationIconBadgeNumber
Assuming the badge approach is not supported in this release, does anyone know the best practice for alerting a user that there is new content in your app without the user taking an explicit action? ie focusing on the app and showing them something in TopShelf?
I encountered the same problem and dived into this. Probably your best way is to update the topshelf with latest items, which is my way to solve this for now. You can use network calls to update the topshelf with content from your backend.
This depends on the type of application. E.g. showing the latest top movies for a movies app.
You can trigger an update of the topshelf after your network call completed using the following code:
NSNotificationCenter.defaultCenter().postNotificationName(TVTopShelfItemsDidChangeNotification, object: nil)
Make sure to implement the TVTopShelfProvider which should be clear using the following documentation:
This protocol is adopted by the principal class of an app’s TV Services extension. Apps that implement this extension can provide dynamic content to the Top Shelf element rather than having the system use the static image submitted with the app. The topShelfStyle property specifies the interface style you want, and the topShelfItems property specifies the content items to display. Whenever you change the content provided by the extension, post a TVTopShelfItemsDidChangeNotification notification to prompt the system to reload your content.
Icon badges are removed for app icons, push notifications as well (except for silent push notifications).

How do I send notifications on an AndroidTV?

I have been reading the documentation pages for Notifications for Android devices but I want to build and display notifications on an Android-TV. I have used several apps in the AndroidTV and none of them shows notifications, instead sometimes they appear in the recommendations bar,which leads me to believe that it may not be possible to display notifications on this family of devices.
My end goal is to dispatch a Heads-up notification (priority flag set to MAX) so it can be shown regardless of what the user is doing.
Can someone help me to achieve this, maybe pointing me to some more specific docs?
UPDATE I have found this application that displays notifications, but I cannot understand how it works. Is it possible that it is mimicking notifications without working with Android's API?
I also think notification will appear as "recommendation" and not appear as "notification".
For the Notifications for Android TV app, I guess it is using custom designed Toast instead of Notification.

How can i change the background of my App after it approved and already in App Store

I am new in Xcode and IOS development.
i have designed and finished my app and i connected with Parse for push notification and core data.
the problem is what i didn't understand is: if in future i want to change the background of my app or add new event or to change the palace of button my app, how can i do that? i have to rebuild and submit it again or there is any way to do by online a website like parse?
i couldn't find the answer any where, help please...
Thanks ,
If you had designed your app to load the background data from Parse, then you could just put the new background on Parse and your app would load it. There is no need to submit a new app to do that. If you did it this way, you'd want to have a default background in the case when the network is not available.
You can't add new code to your application with this method (that is not allowed), but you can add data such as images, text, etc. The key point here is that you have to design your app from the start to work this way, then it is simply a matter of putting the new data on Parse where your app can find it.
Expanding on #vacawama's very good answer:
For this version you are out of luck, since it sounds like you did not design it to use a background that is loaded from your Parse server.
What you need to do is to code an update to your app that has these new abilities, and submit that to the app store. Once that version is approved then you should be able to change the background from the server.

WP8: Can this (PhoneApplicationService.RunningInBackground ) be used outside of location based app?

From this link below, it seems that your app can still get event when app is switched to background. But it seems it is used only for location based app. Can normal app do that? I had tried to declare ID_CAP_LOCATION but still Application_RunningInBackground not get called when switch to background.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.shell.phoneapplicationservice.runninginbackground(v=vs.105).aspx
The app doesn't execute in background, unless it is continously tracking the location.
This section lists the conditions under which the operating system
will deactivate an app running in the background....
The app stops actively tracking location. An app stops tracking location by removing event handlers for the PositionChanged and
StatusChanged events of the Geolocator class or by calling the Stop()
method of the GeoCoordinateWatcher class.
Source: Running location-tracking apps in the background for Windows Phone 8
You will find complete info of how to run apps in background here:
How to run location-tracking apps in the background for Windows Phone 8