I am currently planning a Xamarin.Forms app and while doing so i came across a point which seems to have no answer.
The app will have to work with a WCF Service to get its data and also to tell the service to do certain tasks. While the application is active, doing so is easy. But there is something the App has to do. Call the Service every x Minutes to refresh data and create notifications for the user in some cases.
I've read something about backgrounding in iOS or Services in Android, but there seems to be no way for a Xamarin.Forms aplication to have a common way of doing background work. So, how can I access the WCF service, and process the data, while the app is inactive in Xamarin.Forms?
Backgrounding with Xamarin.Forms
8.7k Views Asked by EaranMaleasi At
2
There are 2 best solutions below
1
MatPag
On
This is the only solution I have found: https://robgibbens.com/backgrounding-with-xamarin-forms/
In a few words: you can't abstract background tasks in Xamarin.Forms because iOS, Android and WP works in a different way. You have to use MessagingCenter to send and receive data from specific implementations in each platform.
A similar thread (I copied my answer from here): Xamarin.forms long running background work
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in WCF
- Migrate ASMX web method to WCF which accepts string array
- Handling WCF enums when client and server have different versions of enum
- Objective tools for monitoring WCF APIs for latency, failures, and breakdowns?
- ASP.NET Core Web api + WCF
- WCF Authentification Android App - Maui WCF Webservice Basic
- WCF to WCFCore - Help Menu
- Problem with hashtag (#) character in httpclient and WCF
- How to add REST API to a .NET Framework Solution with existing WCF Services?
- How to run WCF service in VSCODE
- Adding HTTP Headers using MessageInspector in WCF (VB.NET) Not Working
- The data returned by the WCF service contains special characters, causing an error when the client attempts to receive it!"
- How to configure rest api’s in WCF project , making it hybrid solution
- WCF + PostgresQL. Npqsql connection is not open
- CORS Error that is not fixed with usual solution
- .NET project hosted on IIS is timing out in 5 minutes but works fine on localhost
Related Questions in XAMARIN
- C# Visual Studio Android App Showing a wrong not working Keypad on Entry text
- Playing local recorded video
- What changed from xcode 13.2.1 to 14.2 that would affect an app's entitlements?
- After adding the packages of "Xamarin.Firebase.Messaging", getting error related to JAVA0000 "Compilation failed"
- C# Xamarin Android | Change Contentview from class
- Why does my LINQ query in Xamarin.Forms show less than expected content?
- My .net MAUI app works in debug mode, but "dotnet publish" doesn't work
- Xamarain support for IOS 17.4.1
- Grid Items keep stacking instead of creating a new row
- .NET MAUI TapGesture Command not working in CollectionView
- Xamarin android emulate usb PC Keyboard
- Java.Lang.IllegalStateException: 'Unable to parse composition' using Lottie in splashscreen xamarin forms (android)
- add Items (FILES) from Directory to Spinner List
- AVPlayerViewController's caption options do not update in .Net 8 tvOS app
- Printing PDF generate with Itext7 on a thermal printer Model:P80D
Related Questions in XAMARIN.FORMS
- Playing local recorded video
- NavbarAnimation.Maui With TabbedPage
- Why does my LINQ query in Xamarin.Forms show less than expected content?
- Not showing Created folder in My App directory MAUI
- IOS Release version showing error "PlatformNotSupported" because of PCLCrypto.SymmetricKeyAlgorithmProvider.GetAlgorithm()
- The type was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built
- Heart shaped image clip - rotate/scale a Geometry object
- Printing with Xam.Plugin.Bluetooth
- Unable to open another app from within Xamarin Forms Android app
- XamlC error XFC0000 : Cannot resolve type "Popup" in my xct:popup xaml file
- .NET MAUI TapGesture Command not working in CollectionView
- Xamarin android Could not receive the push notification on OnMessageReceived while swipe away app
- how to avoid silence while playing audio file in xmarin forms media player
- Net Maui Property FlexLayout.Shrink does not work as expected
- Xamarin android emulate usb PC Keyboard
Related Questions in BACKGROUNDING
- Allowing Application to Run in the Background in iOS Swift
- Why do I see diminishing returns on speed of backgrounding processes in Bash?
- Xamarin iOS backgrounding app termination
- Xamarin Message Center Multiple Of The Same Message Different Results
- Xamarin Forms Background Service For Data Sync Even If App Closes
- Submitting data from Xamarin iOS when backgrounded
- How I can create a loop Background Service in Xamarin.forms
- Store (or send) data from Bluetooth device when app is in background
- How does Google Maps know my position without using a foreground service?
- Cannot background HTTPie http request with `&` in .sh script
- Xamarin - IOS - CLLocationManager: get location updates when iphone is locked or sleeping
- Xamarin - IOS: sending a web request every N minutes even when the phone is locked or sleeping
- C# Xamarin IOS Backgrounding Loop with HTML Request
- AVAssetReader failing when entering foreground again
- Creating a push or background service that checks remote server
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You do it in the same way wih Xamarin as you would do it in an Objective-C or Java app. You use the same API to register a background service.
There are also documents about it for iOS and for Android.
Xamarin uses the same native API on each system like any other native app does. So everything you want to do with Xamarin can be done the same way as you would use the vendors' original toolings. The only difference is the programming language.
Xamarin.Forms is completely irrelevant here. It is an abstraction layer for the native UI frameworks that enable developers to define the user interface once and run a truly native UI on Android, iOS, Windows Phone and Windows Store apps. It has nothing to do with backgrounding here.