Beispiel #1
0
 // [START fetch_async]
 // Start a fetch request.
 // FetchAsync only fetches new data if the current data is older than the provided
 // timespan.  Otherwise it assumes the data is "recent enough", and does nothing.
 // By default the timespan is 12 hours, and for production apps, this is a good
 // number. For this example though, it's set to a timespan of zero, so that
 // changes in the console will always show up immediately.
 public Task FetchDataAsync()
 {
     DebugLog("Fetching data...");
     System.Threading.Tasks.Task fetchTask = Firebase.RemoteConfig.FirebaseRemoteConfigDeprecated.FetchAsync(
         TimeSpan.Zero);
     return(fetchTask.ContinueWithOnMainThread(FetchComplete));
 }
 // Start a fetch request.
 // FetchAsync only fetches new data if the current data is older than the provided
 // timespan.  Otherwise it assumes the data is "recent enough", and does nothing.
 // By default the timespan is 12 hours, and for production apps, this is a good
 // number. For this example though, it's set to a timespan of zero, so that
 // changes in the console will always show up immediately.
 static Task FetchDataAsync(Action <Task> FetchComplete)
 {
     Debug.Log("Fetching data...");
     System.Threading.Tasks.Task fetchTask = Firebase.RemoteConfig.FirebaseRemoteConfig.FetchAsync(
         TimeSpan.Zero);
     return(fetchTask.ContinueWithOnMainThread(FetchComplete));
 }
 public Task FetchDataAsync()
 {
     System.Threading.Tasks.Task fetchTask = Firebase.RemoteConfig.FirebaseRemoteConfig.FetchAsync(
         TimeSpan.Zero);
     return(fetchTask.ContinueWithOnMainThread((Task task) =>
     {
         isFirebaseFetched = true;
     }));
 }
Beispiel #4
0
 // Start a fetch request.
 public Task FetchDataAsync()
 {
     DebugLog("Fetching data...");
     // FetchAsync only fetches new data if the current data is older than the provided
     // timespan.  Otherwise it assumes the data is "recent enough", and does nothing.
     // By default the timespan is 12 hours, and for production apps, this is a good
     // number.  For this example though, it's set to a timespan of zero, so that
     // changes in the console will always show up immediately.
     System.Threading.Tasks.Task fetchTask = Firebase.RemoteConfig.FirebaseRemoteConfig.FetchAsync(
         TimeSpan.Zero);
     return(fetchTask.ContinueWithOnMainThread(FetchComplete));
 }