robgibbens / xamarinformsbackgrounding Goto Github PK
View Code? Open in Web Editor NEWNative Backgrounding with Xamarin.Forms
Native Backgrounding with Xamarin.Forms
This approach covers Android and iOS quite nicely.
Is there also a way to support Windows Phone?
That way a single codebase will support all three platforms. Backgrounding is currently confusing and painful.
I'm also facing a service that is run when CompletedBoot broadcast is received, but the Task.Run simply doesn't work =\ (my logs go until OnStartCommand. No logs from the task itself)
The longRunningTask is working well in foreground.
But thread is cancelled about 3 mins later once app works in background.
Can you please fix this issue ?
Device.BeginInvokeOnMainThread is called before sending CancelledMessage and again upon receipt. It only needs to be called once.
visual studio version info:
Microsoft Visual Studio Community 2019
Version 16.6.2
VisualStudio.16.Release/16.6.2+30204.135
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Community
Visual C++ 2019 00435-60000-00000-AA008
Microsoft Visual C++ 2019
Azure App Service Tools v3.0.0 16.6.948.25768
Azure App Service Tools v3.0.0
C# Tools 3.6.0-4.20251.5+910223b64f108fcf039012e0849befb46ace6e66
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Extensibility Message Bus 1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
Mono Debugging for Visual Studio 16.6.17 (9692114)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 5.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Visual Basic Tools 3.6.0-4.20251.5+910223b64f108fcf039012e0849befb46ace6e66
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 10.9.1.0 for F# 4.7 16.6.0-beta.20217.4+1c969cac25e2d38d71872efe6c8226029e42bb59
Microsoft Visual F# Tools 10.9.1.0 for F# 4.7
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
VisualStudio.DeviceLog 1.0
Information about my package
VisualStudio.Foo 1.0
Information about my package
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamarin 16.6.000.1061 (d16-6@8e68aa8)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.6.0.318 (remotes/origin/d16-6@66afc5421)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 16.6.40 (1f1466f)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 10.3.1.4 (d16-6/3a10de9)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: 165f4b0
Java.Interop: xamarin/java.interop/d16-6@2cab35c
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.31.1@49232bc
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-6@bfb66f3
Xamarin.iOS and Xamarin.Mac SDK 13.18.2.1 (29c4ea7)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
compiling errors:
Severity Code Description Project File Line Suppression State
Error CS0103 The name 'InitializeComponent' does not exist in the current context FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\BackgroundPage.xaml.cs 11 Active
Error CS0111 Type 'LongRunningPage' already defines a member called 'InitializeComponent' with the same parameter types FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\obj\Debug\FormsBackgrounding.LongRunningPage.xaml.g.cs 29 Active
Error CS1061 'BackgroundPage' does not contain a definition for 'SleepDateLabel' and no accessible extension method 'SleepDateLabel' accepting a first argument of type 'BackgroundPage' could be found (are you missing a using directive or an assembly reference?) FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\BackgroundPage.xaml.cs 17 Active
Error CS1061 'BackgroundPage' does not contain a definition for 'FirstNameEntry' and no accessible extension method 'FirstNameEntry' accepting a first argument of type 'BackgroundPage' could be found (are you missing a using directive or an assembly reference?) FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\BackgroundPage.xaml.cs 24 Active
Error CS1061 'BackgroundPage' does not contain a definition for 'FirstNameEntry' and no accessible extension method 'FirstNameEntry' accepting a first argument of type 'BackgroundPage' could be found (are you missing a using directive or an assembly reference?) FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\BackgroundPage.xaml.cs 27 Active
Error CS0103 The name 'InitializeComponent' does not exist in the current context FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\DownloadPage.xaml.cs 11 Active
Error CS0103 The name 'downloadButton' does not exist in the current context FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\DownloadPage.xaml.cs 13 Active
Error CS1061 'DownloadPage' does not contain a definition for 'downloadStatus' and no accessible extension method 'downloadStatus' accepting a first argument of type 'DownloadPage' could be found (are you missing a using directive or an assembly reference?) FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\DownloadPage.xaml.cs 17 Active
Error CS0103 The name 'catImage' does not exist in the current context FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\DownloadPage.xaml.cs 24 Active
Error CS1061 'DownloadPage' does not contain a definition for 'catImage' and no accessible extension method 'catImage' accepting a first argument of type 'DownloadPage' could be found (are you missing a using directive or an assembly reference?) FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\DownloadPage.xaml.cs 32 Active
Error CS0103 The name 'longRunningTask' does not exist in the current context FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\LongRunningPage.xaml.cs 14 Active
Error CS0103 The name 'stopLongRunningTask' does not exist in the current context FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\LongRunningPage.xaml.cs 19 Active
Error CS0103 The name 'ticker' does not exist in the current context FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\LongRunningPage.xaml.cs 36 Active
Error CS0103 The name 'ticker' does not exist in the current context FormsBackgrounding C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\LongRunningPage.xaml.cs 42 Active
Error XLS0414 The type 'ContentPage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 3
Error XLS0414 The type 'ContentPage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 8
Error XLS0414 The type 'OnPlatform' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 9
Error XLS0414 The type 'Thickness' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 9
Error XLS0414 The type 'StackLayout' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 12
Error XLS0414 The type 'StackLayout' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 13
Error XLS0414 The type 'Label' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 14
Error XLS0414 The type 'Label' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 15
Error XLS0414 The type 'StackLayout' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 17
Error XLS0414 The type 'Label' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 18
Error XLS0414 The type 'Entry' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 19
Error XLS0414 The type 'Label' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding BackgroundPage.xaml 22
Error XLS0414 The type 'ContentPage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding LongRunningPage.xaml 3
Error XLS0414 The type 'ContentPage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding LongRunningPage.xaml 9
Error XLS0414 The type 'OnPlatform' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding LongRunningPage.xaml 10
Error XLS0414 The type 'Thickness' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding LongRunningPage.xaml 10
Error XLS0414 The type 'ContentPage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding LongRunningPage.xaml 13
Error XLS0414 The type 'StackLayout' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding LongRunningPage.xaml 14
Error XLS0414 The type 'Button' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding LongRunningPage.xaml 15
Error XLS0414 The type 'Button' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding LongRunningPage.xaml 16
Error XLS0414 The type 'Label' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. FormsBackgrounding LongRunningPage.xaml 17
Error CS0246 The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 1 Active
Error CS0246 The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 2 Active
Error CS0246 The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 3 Active
Error CS0246 The type or namespace name 'Android' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 4 Active
Error CS0246 The type or namespace name 'Android' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 5 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 9 Active
Error CS0518 Predefined type 'System.String' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 11 Active
Error CS0518 Predefined type 'System.Boolean' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 19 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 24 Active
Error CS0246 The type or namespace name 'Task<>' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 24 Active
Error CS0518 Predefined type 'System.String' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 24 Active
Error CS0518 Predefined type 'System.String' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 24 Active
Error CS0518 Predefined type 'System.String' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 33 Active
Error CS0518 Predefined type 'System.String' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 33 Active
Error Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author. FormsBackgrounding.Droid
Error Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author. FormsBackgrounding.Droid
Error Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author. FormsBackgrounding.Droid
Error CS1729 'object' does not contain a constructor that takes 0 arguments FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 9 Active
Error CS0518 Predefined type 'System.String' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 14 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 14 Active
Error CS0103 The name 'Environment' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 14 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 14 Active
Error CS0103 The name 'Environment' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 14 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 15 Active
Error CS0103 The name 'System' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 15 Active
Error CS0518 Predefined type 'System.String' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 15 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 21 Active
Error CS0103 The name 'File' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 21 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 26 Active
Error CS0518 Predefined type 'System.Boolean' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 26 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 27 Active
Error CS0103 The name 'Task' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 27 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 29 Active
Error CS0103 The name 'Task' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 29 Active
Error CS0518 Predefined type 'System.IDisposable' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 36 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 36 Active
Error CS0246 The type or namespace name 'MemoryStream' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 36 Active
Error CS0518 Predefined type 'System.IDisposable' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 37 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 37 Active
Error CS0246 The type or namespace name 'Java' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 37 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 38 Active
Error CS0246 The type or namespace name 'BitmapFactory' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 38 Active
Error CS0518 Predefined type 'System.Int32' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 39 Active
Error CS0518 Predefined type 'System.Boolean' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 40 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 43 Active
Error CS0103 The name 'BitmapFactory' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 43 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 44 Active
Error CS0103 The name 'Bitmap' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 44 Active
Error CS0518 Predefined type 'System.Int32' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 44 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 48 Active
Error CS0103 The name 'File' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 48 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 50 Active
Error CS0246 The type or namespace name 'Exception' could not be found (are you missing a using directive or an assembly reference?) FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 50 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 51 Active
Error CS0103 The name 'Log' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 51 Active
Error CS0518 Predefined type 'System.Object' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 51 Active
Error CS0103 The name 'LogPriority' does not exist in the current context FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 51 Active
Error CS0518 Predefined type 'System.String' is not defined or imported FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\ImageHelper.cs 51 Active
Warning The referenced component 'FormsViewGroup' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'Xamarin.Forms.Platform.Android' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'Mono.Android' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'System.Threading.Tasks' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'Xamarin.Forms.Platform' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'Xamarin.Forms.Core' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'System.Core' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'System.Runtime' could not be found. FormsBackgrounding.Droid
Warning Unable to add a reference to project 'FormsBackgrounding'. The current project's target is not one of or compatible with the targets of Portable Library project 'FormsBackgrounding'.
A Portable Library project's targets can be changed via the Library tab in the project's properties. FormsBackgrounding.Droid
Warning The referenced component 'Xamarin.Forms.Xaml' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'System' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'System.Xml' could not be found. FormsBackgrounding.Droid
Warning The referenced component 'Xamarin.Android.Support.v4' could not be found. FormsBackgrounding.Droid
Warning AndroidManifest.xml //uses-sdk/@android:minSdkVersion '15' is less than API-16, this configuration is not supported. FormsBackgrounding.Droid C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Droid\Properties\AndroidManifest.xml
Error CS0006 Metadata file 'C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\Core\bin\Debug\FormsBackgrounding.dll' could not be found FormsBackgrounding.iOS C:\Users\Weibo\Downloads\xamarin_code\XamarinFormsBackgrounding-master\XamarinFormsBackgrounding-master\iOS\CSC 1 Active
Warning Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. FormsBackgrounding.iOS
Warning Unable to add a reference to project 'FormsBackgrounding'. The current project's target is not one of or compatible with the targets of Portable Library project 'FormsBackgrounding'.
A Portable Library project's targets can be changed via the Library tab in the project's properties. FormsBackgrounding.iOS
Warning Not enough information has been provided to MSBuild in order to establish a connection to a Remote Server. The project 'FormsBackgrounding.iOS' will continue building offline FormsBackgrounding.iOS
any suggestion?
On my iPhone 6+ with iOS 12, the sample works well with debug model. But when start the app on my iPhone, start LongRunning task and lock iPhone or press iPhone's home button, the background task will be cancelled automatically after 3 minutes even though check Background model, Background fetch, Background processing on Info.plist page. Could you update your sample code to fix this issue?
Please include an UWP example
Great example! Really enjoyed it.
The current code doesn't work on iOS9. It will probably give you the following error: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
This can be solved by placing the following code in your Info.plist.
NSAppTransportSecurity
NSAllowsArbitraryLoads
More information can be found here: http://stackoverflow.com/questions/30731785/how-do-i-load-an-http-url-with-app-transport-security-enabled-in-ios-9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.