Coder Social home page Coder Social logo

mobile-samples's Introduction

Xamarin cross-platform mobile samples

==============

This repository contains a number of samples that show how to share code between Xamarin.iOS and Xamarin.Android.

License

See the license file and any additional license information attached to each sample.

Samples submission guidelines

This repository welcomes contributions and suggestions. If you want to create a new sample, you need to work with an employee to help bring the new sample into the repository. Start by raising a GitHub issue in this repository that outlines your proposed sample. Please note that samples in the MASTER branch of this repository shouldn't rely on preview or pre-release NuGet packages.

The Xamarin sample gallery is powered by this repository, and therefore each sample needs to comply with the following requirements:

  • Screenshots - a folder called Screenshots that has at least one screen shot of the sample on each platform (preferably a screen shot for every page or every major piece of functionality). For an example of this, see ios11/MapKitSample.

  • Readme - a README.md file that explains the sample, and contains metadata to help customers find it. For an example of this, see ios11/MapKitSample. The README file should begin with a YAML header (delimited by ---) with the following keys/values:

    • name - must begin with Xamarin -

      • description - brief description of the sample (< 150 chars) that appears in the sample code browser search

      • page_type - must be the string sample.

      • languages - coding language/s used in the sample, such as: csharp, fsharp, vb, objc

      • products: should be xamarin for every sample in this repo

      • urlFragment: although this can be auto-generated, please supply an all-lowercase value that represents the sample's path in this repo, except directory separators are replaced with dashes (-) and no other punctuation.

      Here is an example:

      ---
      name: Xamarin - Cross-Platform Sample
      description: Brief 150 character or less description of the sample
      page_type: sample
      languages:
      - csharp
      products:
      - xamarin
      urlFragment: crossplatformsample
      ---
      # Heading 1
      
      rest of README goes here, including screenshot images and requirements/instructions to get it running

      NOTE: This must be valid YAML, so some characters in the name or description will require the entire string to be surrounded by " or ' quotes.

  • Buildable solution and .csproj file - the project must build and have the appropriate project scaffolding (solution + .csproj files).

This approach ensures that all samples integrate with the Microsoft sample code browser.

If you have any questions, don't hesitate to ask on the Xamarin Forums.

GitHub Integration

We integrate tightly with Git to make sure we always provide working samples to our customers. This is achieved through a pre-commit hook that runs before your commit goes through, as well as a post-receive hook on GitHub's end that notifies our samples gallery server when changes go through.

To you, as a sample committer, this means that before you push to the repos, you should run the "install-hook.bat" or "install-hook.sh" (depending on whether you're on Windows or macOS/Linux, respectively). These will install the Git pre-commit hook. Now, whenever you try to make a Git commit, all samples in the repo will be validated. If any sample fails to validate, the commit is aborted; otherwise, your commit goes through and you can go ahead and push.

This strict approach is put in place to ensure that the samples we present to our customers are always in a good state, and to ensure that all samples integrate correctly with the sample gallery (README.md, Metadata.xml, etc). Note that the master branch of each sample repo is what we present to our customers for our stable releases, so they must always Just Work.

Should you wish to invoke validation of samples manually, simply run "validate.windows" or "validate.posix" (again, Windows vs macOS/Linux, respectively). These must be run from a Bash shell (i.e. a terminal on macOS/Linux or the Git Bash terminal on Windows).

If you have any questions, don't hesitate to ask!

Other samples

Galleries

We love samples! Application samples show off our platform and provide a great way for people to learn our stuff. And we even promote them as a first-class feature of the docs site. You can find our two sample galleries here:

Sample GitHub Repositories

These sample galleries are populated by samples in our six sample GitHub repos:

The mobile-samples repository is for samples that are cross-platform. The mac-ios-samples repository is for samples that are Mac/iOS only.

mobile-samples's People

Contributors

brendanzagaeski avatar bryancostanich avatar bubudrc avatar chrisblackman avatar clancey avatar conceptdev avatar dalexsoto avatar dylankelly5 avatar ericmartel avatar gonzalonm avatar gourikumari avatar jescriba avatar joelmartinez avatar johnpilczak avatar jonpryor avatar lobrien avatar mykyta-bondarenko avatar nathancastle avatar olegoid avatar pjbeaman avatar pjcollins avatar praeclarum avatar radekdoulik avatar robertpkruger avatar rolfbjarne avatar spouliot avatar timeyoutakeit avatar topgenorth avatar vchelaru avatar vyedin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobile-samples's Issues

WheatherApp not opening in solution

Windows app project is not loading, I get following error. What can be wrong with csproj file?

I'm using latest VS2017 Community edition

Microsoft Visual Studio Community 2017
Version 15.2 (26430.16) Release
VisualStudio.15.Release/15.2.0+26430.16
Microsoft .NET Framework
Version 4.7.02558
Visual Studio Tools for Universal Windows Apps 15.0.26430.06
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin 4.5.0.486 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK 7.3.1.2 (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 10.10.0.37 (ad35de4)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Log in browser:
WeatherApp\WeatherApp.WinPhone\WeatherApp.WinPhone.csproj: The application which this project type is based on was not foun

Pop up window:

Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- WeatherApp.WinPhone, "D:\mobile-samples\Weather\WeatherApp\WeatherApp.WinPhone\WeatherApp.WinPhone.csproj"

No changes required
These projects can be opened in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
- WeatherApp.Droid, "D:\mobile-samples\Weather\WeatherApp\WeatherApp.Droid\WeatherApp.Droid.csproj"
- WeatherApp.iOS, "D:\mobile-samples\Weather\WeatherApp\WeatherApp.iOS\WeatherApp.iOS.csproj"
- WeatherApp, "D:\mobile-samples\Weather\WeatherApp\WeatherApp\WeatherApp.csproj"
- WeatherApp, "D:\mobile-samples\Weather\WeatherApp.sln"

SQLite errors with WP7.1

I'm trying to compile the MWC.WP7.sln using VS 2010 or 2012, but it doesn't compile because of SQLite. I get

Error 6 Argument 1 must be passed with the 'ref' keyword ..\Visual Studio 2012\Projects\Temp\mobile-samples\MWC\MWC.Core\DL\SQLite.cs 2543 44 MWC.Core.WP7

I have the WP7.1 and 8.0 SDK. No modifications were used, the latest version of the master branch was retrieved from GitHub. The references are all valid.

For security reasons DTD is prohibited in this XML document

In this Sample,I am using same sample -WCF walkthrough-

I am developing an app which has PCL,where I am calling a WCF service.
I have followed step wise step from

https://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/walkthrough_working_with_WCF/

private async void button_Clicked(object sender, EventArgs e)
{

            objService.InsertAsync(c.name, c.OP);

}

but I am not able to insert ,getting following error in InsertCompleted event-

For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property
on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

Could you please help urgently.

Advanced Data Solution ( so far all others also) not opening in VS2015 or VS2013

*VS2015 Reports the following: *"D:\Solutions 2015\mobile-samples-master\mobile-samples-master\ContentControls\iOSContentControls\iOSContentControls.csproj : error : The project file 'D:\Solutions 2015\mobile-samples-master\mobile-samples-master\ContentControls\iOSContentControls\iOSContentControls.csproj' cannot be opened."
The project type is not supported by this installation.

I found this error related identification on a another Xamarin GitHub project. Go to the bottom to see the resolution for this Visual Studio error. [https://groups.google.com/forum/#!msg/SpecFlow/D9B66kUlfJc/tqiCR1WtWncJ] "one or more projects in the solution were not loaded correctly"

Apparently nobody is using Xamarin Visual Studio 2015 2013 or 2010 but me.

I have attached a screen shot of the error and the specific projects, I would imagine that all of the master projects solutions have the same problem, so if you are wondering why no Microsoft Visual Studio users are commenting it is probably because they cant open the projects. It may only be the project files because the sln seems to find the project with no trouble.

ScreenShot
Looking forward to using the samples!

Best regards
Robert Morgan

Resuorce

In the project Wheaterapp.droid the file MainActivity.cs have an error, Resuroce don't exist in the current contests, why? how can i fix ?

Phoneword sample has out-of-date API targets

The current phoneword sample has out-of-date API targets. It currently is set to target API 8, which is no longer supported as of Android 5.1 per: https://developer.xamarin.com/releases/android/xamarin.android_5/xamarin.android_5.1/#Removal_of_API_Levels

I made a Pull Request that could be used to update these: https://github.com/xamarin/mobile-samples/pull/32/files (Though I think by now they might be updated further, considering our latest releases.)

MWC.Droid project missing files

In MWC.Droid.csproj, these files are reference in the project but not in HEAD:

MWC.Droid Resources/Values/PrivateStrings.xml
MWC.Droid Resources/Resource.Designer.cs

First use data sync (tested on Nexus S)

On the first use when data had not been synced I clicked on speakers and a please wait message popped up. Waited a few minutes ans nothing. Exited app and re-started and the speakers were there. I don't know if the back-end server was just waking up, just though I would mention it here.

Can't pick a date

Hi,

using iOS 7 on iPhone I can't pick a date. When I scroll Month, Day, Year it won't stop where I stop.

If I scroll from January to May, for example, once I release my finger it scrolls on its own and doesn't pick the month I wanted.

What's wrong?

Error opening RazorTodo and RazorNativeTodo in Xamarin Studio 4.2.3

Opening these solutions in Xamarin Studio 4.2.3 reports:
Load Operation Failed. Version string portion was too short or too long

Mananged to get them opening by removing these two lines from the solution files...

VisualStudioVersion = {0}
MinimumVisualStudioVersion = {0}

The target "Build" does not exist in the project

using Visual Studio Community 2017

How do I fix this?
C:\My Projects\AndroidStudioProjects\AnalogClock\AnalogClock.Common\AnalogClock.Common.csproj : error MSB4057: The target "Build" does not exist in the project.

ALittleStory.txt does not contain a haiku

Sample

mobile-samples/EmbeddedResources/SharedLib/ALittleStory.txt

Description

  mobile-samples/EmbeddedResources/SharedLib/ALittleStory.txt
  does not contain a haiku

Expected Behavior

Expected a haiku

Actual Behavior

This is not a haiku
(should be 5-7-5 syllables)

Suggested Haiku

I like to eat soup
I did not used to like soup
but now I like soup

Error restoring Xamarin.UITest

Hello, I was trying to get this sample(TaskyPro) to work and when I open the solution and starts restoring packages I get de following error:

Unable to find version '0.5.1' of package 'Xamarin.UITest'.

What I have to do to restore this package? I tried to remove it but it says it can't.

Location not works on iOS 9

I checked out source code here and tried to run <BackgroundLocationDemo> project but on-screen lat-lng are not updated.

MWC.iOS: compilation exceptions

Building Solution: MWC.iOS (Debug|iPhoneSimulator)

Generazione: MWC.Core.MT (Debug|iPhoneSimulator)
Performing main compilation...
/Developer/MonoTouch/usr/bin/smcs /noconfig "/out:/
mobile-samples/MWC/MWC.Core/bin/iPhoneSimulator/Debug/MWCCoreMT.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.Linq.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 "/define:DEBUG" /t:library "/mobile-samples/MWC/MWC.Core/DL/MwcDatabase.cs" "/mobile-samples/MWC/MWC.Core/DL/SQLite.cs" "/mobile-samples/MWC/MWC.Core/BL/Session.cs" "/mobile-samples/MWC/MWC.Core/BL/Exhibitor.cs" "/mobile-samples/MWC/MWC.Core/BL/Speaker.cs" "/mobile-samples/MWC/MWC.Core/BL/Contracts/BusinessEntityBase.cs" "/mobile-samples/MWC/MWC.Core/DAL/DataManager.cs" "/mobile-samples/MWC/MWC.Core/BL/Managers/SessionManager.cs" "/mobile-samples/MWC/MWC.Core/BL/Managers/UpdateManager.cs" "/mobile-samples/MWC/MWC.Core/BL/Managers/SpeakerManager.cs" "/mobile-samples/MWC/MWC.Core/BL/Managers/ExhibitorManager.cs" "/mobile-samples/MWC/MWC.Core/BL/Managers/TwitterFeedManager.cs" "/mobile-samples/MWC/MWC.Core/SAL/MwcSiteParser.cs" "/mobile-samples/MWC/MWC.Core/BL/Managers/NewsManager.cs" "/mobile-samples/MWC/MWC.Core/BL/Contracts/IBusinessEntity.cs" "/mobile-samples/MWC/MWC.Core/SAL/Tweet.cs" "/mobile-samples/MWC/MWC.Core/SAL/RSSEntry.cs" "/mobile-samples/MWC/MWC.Core/SAL/XmlFeedParserBase.cs" "/mobile-samples/MWC/MWC.Core/SAL/TwitterParser.cs" "/mobile-samples/MWC/MWC.Core/SAL/RSSParser.cs" "/mobile-samples/MWC/MWC.Core/BL/Conference.cs" "/mobile-samples/MWC/MWC.Core/BL/Managers/FavoritesManager.cs" "/mobile-samples/MWC/MWC.Core/BL/Favorite.cs" "/mobile-samples/MWC/MWC.Core/BL/SessionTimeslot.cs" "/mobile-samples/MWC/MWC.Core/Constants.cs" "/mobile-samples/MWC/MWC.Core/BL/Managers/DaysManager.cs" "/mobile-samples/MWC/MWC.Core/BL/Managers/UpdateFinishedEventArgs.cs" "/mobile-samples/MWC/MWC.Core/BL/SessionSpeaker.cs"
Compilation failed: 2 error(s), 0 warnings

/mobile-samples/MWC/MWC.Core/DL/MwcDatabase.cs(90,60): error CS1061: Type 'T' does not contain a definition for Id' and no extension method 'Id' of type 'T' could be found (are you missing a using directive or an assembly reference?)
/mobile-samples/MWC/MWC.Core/DL/MwcDatabase.cs(79,33): (Location of the symbol related to previous error)
/mobile-samples/MWC/MWC.Core/DL/MwcDatabase.cs(79,33): error CS0161: `MWC.DL.MwcDatabase.GetItem(int)': not all code paths return a value

Scrolling through exhibitors or sessions forces close

On both a Nexus S and iPhone 4S when scrolling through the list of exhibitors or sessions the app stops responding and then closes. On iPhone the app just closes and on Android the app shows a force close dialogue box. When clicking on wait, the app closes anyway.

AndroidMultiThreading leaks progress dialog

In the MultiThreading project, the Android MainScreen.cs file tries to close the progress dialog in the task's ContinueWith. If you rotate the screen while the progress dialog is visible, the application complains that you've leaked a window. Is there any way to use parallel tasks that's safe for activity restarts?

Here's the error:

Activity androidmultithreading.screens.MainScreen has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40536a00

snow particles disappear when it showed for second time

I have 2 pages ,In first page when I click one of the item in listview,it should navigate to 2nd page and here in 2nd page snow particles are appeared.After that when I click back button,As usual it goes to first page and again when I click any of the listview items ,when it navigates to 2nd page ,snow particles disappear,It just show a black screen.

For detail codes,I am following this- https://github.com/codemillmatt/forms-particle Please help me..............

BluetoothLEExplorer.zip - error found by customer

Downloaded the 'BluetoothLEExplorer.zip' but when I run the App via Xamarin studio, it compiler stops at the following line:

public override void OnConnectionStateChange (BluetoothGatt gatt, GattStatus status, ProfileState newState)

with the following error: "no suitable method found to override"

No clean way to stop the Android foreground service in background location demo

Sample

https://github.com/xamarin/mobile-samples/tree/main/BackgroundLocationDemo

Description

In the background location demo, when the app is swiped away, the OnDestroy is called as expected, and this method then proceeds to clean up the foreground service. Ostensibly the service is no longer running, as indicated by the running services in the developer section of the device. However, the visual Studio debugger stays attached indicating that the app is still running, and in list of apps on the device, the force close button is enabled for the app, also indicating running. Moreover, when the app is restarted on the device, the UI subscribes a second event handler to the foreground service, resulting in duplicate events in the UI after each location change. This suggests that the service instance has not been cleaned between the app executions.

The issue is that I have not been able to determine a clean way to stop the foreground service in the sample programmatically. All the documentation and related discussion would seem to suggest that this should be possible.

Now, in principle the described behavior would be fine, as the foreground service seems to stop providing the location updates when the app is closed, thus resulting in no wasted cycles when the app is not running. However, an existing and running foreground service should be handled in the main activity OnCreate when the application starts, or we risk creating duplicate resources, or at least setting unneeded event subscriptions.

This behavior happens both on device and emulator; and is not unique to the background location demo, the same behavior is present in a similar foreground service with no actual functionality.

I have attempted to clean up the foreground service with the following methods:

  • unsubscribed -= from all events
  • unbound the service with Application.Context.UnbindService
  • deleted the notification channel with DeleteNotificationChannel on notification manager
  • called RemoveUpdates on LocationManager
  • cancelled the Task used to start the location service
  • called StopService in OnDestroy
  • called StopSelf in OnDestroy
  • called StopForeground with StopForegroundFlags.Remove and StopSelf in OnTaskRemoved (OnTaskRemoved on LocationService is being executed as expected)
  • called Dispose on all disposable objects (binder, location manager, location service) - although disposing the location service results in a NotSupportedException (Unable to activate instance from native handle) soon after the disposal, crashing the application (and finally terminating the process, but arguably not the way it should).

I may have not gotten the order of operations right, but it seems that I have exhausted most of the avenues available. Perhaps someone with more detailed knowledge of Xamarin resource management could modify the sample project in a way that cleanly shutdowns the service.

I am opening the ticket here as the sample may just be missing something, and if we are not able to find a set of steps to cleanly shutdown the foreground service, we may want to open another on xamarin-android or Xamarin.Forms.

Alternatively, if not cleaning the foreground service is ok (it still seems strange to have to terminate the debugging session manually) we should at least have an example where the OnCreate cleanly handles an existing foreground service.

Steps to Reproduce

  1. Run the background location demo from Visual Studio with debugger attached, wait for a GPS update on UI
  2. Swipe the application away
  3. Run the background location demo from the device or emulator, wait for a GPS update on UI
  4. Swipe the application away

Expected Behavior

  • Debugger stops in VS
  • Settings - Developer options - Running Services - Location.Droid: changes from "1 process and 1 service" to "Not Active"
  • Settings - Apps - Location.Droid - Force stop: changes from enabled to disabled
  • The service is created such that the main activity receives an update request per location change. This can be seen in the logs as follows:
[LocationService] Speed is 0
[LocationService] Accuracy is 61.47781
[LocationService] Bearing is 0
[MainActivity] Foreground updating
[LocationService] Latitude is ...

Actual Behavior

  • Debugger does not stop in VS
  • Settings - Developer options - Running Services - Location.Droid: changes from "1 process and 1 service" to "Not Active"
  • Settings - Apps - Location.Droid - Force stop: stays enabled
  • The service is created such that the main activity receives a multiple update requests per location change. This can be seen in the logs as follows:
[LocationService] Speed is 0
[LocationService] Accuracy is 61.47781
[LocationService] Bearing is 0
[MainActivity] Foreground updating
[MainActivity] Foreground updating
[LocationService] Latitude is ...

Information

Microsoft Visual Studio Professional 2019 Version 16.11.2 VisualStudio.16.Release/16.11.2+31624.102
Microsoft .NET Framework Version 4.8.04084
Mono Debugging for Visual Studio 16.10.15 (552afdf)
Xamarin 16.11.000.174 (d16-11@e8f56f1)
Xamarin Designer 16.11.0.17 (remotes/origin/11e0001f0b17269345e80b58fb3adf1ba4efe2cd@11e0001f0)
Xamarin Templates 16.10.5 (355b57a)
Xamarin.Android SDK 11.4.0.5 (d16-11/7776c9f)
Xamarin.Android Reference Assemblies and MSBuild support. Mono: c633fe9 Java.Interop: xamarin/java.interop/d16-11@48766c0 ProGuard: Guardsquare/proguard@912d149 SQLite: xamarin/sqlite@85460d3 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-11@683f375
Android 11.0 (R) / API 30
Xamarin.Android.Support.x 28.0.0.3 -or- Xamarin.Forms 5.0.0.2083 and Xamarin.Essentials 1.7.0
Samsung SM-T725 (Android 11.0 - API 30)

Workaround

As a workaround, per https://stackoverflow.com/a/18450763, we may use Android.OS.Process.KillProcess(Android.OS.Process.MyPid()); which does not allow a controlled cleanup of resources, but may be fine if executed as the last step on the OnDestroy of the main activity.

UWP (Windows) target not found at/in oldest commits... So strange.

Sample

E.g., https://github.com/xamarin/mobile-samples/tree/main/BouncingGame

Description of issue

I explored the whole "mobile-samples" solution content. I detected UWP (Windows) target not found at/in oldest commits... even more then 8 years ago.
Microsoft stopped/"killed" Windows 10 Mobile os/platform only in 2017-2018 (4--5 years ago). The Xamarin did first steps for this honor process. :(

IMHO

I think the Xamarin team specially ignored Windows (platform) platform all the time (now and in past/last)! Too bad. :(

Effect of boumerang

MAUI, instead of "multi-platform" Xamarin.

Question - Can we get street name or anything rather than just GPS coordinates?

I don't know if this is the ideal place to ask such a question, if not please let me know where I can ask this and future tech questions.

I'm just looking into the feasibility of a new app and this is a new area for me. I'd like to know what components or libraries or services one must have in order to get a user's location as a street name or something rather than raw latitude/longitude coordinates.

I'm a very experienced .Net developer but brand new to mobile and Xamarin. I'm hoping to use Visual Studio Enterprise 2019 to build this application, this is simply a question that's come up as I define the requirements for the app.

TaskyWin8.csproj loading not supported in Visual Studio 2017

What do I need to do to build it with Visual Studio 2017 ?

Tasky.Win81\Tasky.Win81.csproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=BC8A1FFA-BEE3-4634-8014-F334798102B3

Tasky.WinPhone8\Tasky.WinPhone8.csproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=C089C8C0-30E0-4E22-80C0-CE093F111A43

Class not fine Error.

locationServiceConnection = new LocationServiceConnection(null);

{System.TypeInitializationException: The type initializer for 'OnTheGo_MEX.App' threw an exception. ---> Java.Lang.ClassNotFoundException: Didn't find class "md5d5d750a34af61f7094880cf981046376.LocationServiceConnection" on path: DexPathList[[zip file "/mnt/asec/OnTheGo_MEX.OnTheGo_MEX-3/base.apk"],nativeLibraryDirectories=[/mnt/asec/OnTheGo_MEX.OnTheGo_MEX-3/lib/arm, /vendor/lib, /system/lib]]
at Java.Interop.JniEnvironment+Types.FindClass (System.String classname) [0x00114] in <438784097c4b4b56a7da6ca9301bc3c6>:0
at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <438784097c4b4b56a7da6ca9301bc3c6>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods..ctor (System.Type declaringType) [0x00064] in <438784097c4b4b56a7da6ca9301bc3c6>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.GetConstructorsForType (System.Type declaringType) [0x0002c] in <438784097c4b4b56a7da6ca9301bc3c6>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.StartCreateInstance (System.String constructorSignature, System.Type declaringType, Java.Interop.JniArgumentValue* parameters) [0x00032] in <438784097c4b4b56a7da6ca9301bc3c6>:0
at Java.Lang.Object..ctor () [0x00034] in <6cd2e94ef7194c66b7c92ab5ab0d33b6>:0
at OnTheGoMEX.GPSServices.LocationServiceConnection..ctor (OnTheGoMEX.GPSServices.LocationServiceBinder binder) [0x00025] in D:\Development\OnTheGo MEX\OnTheGo MEX\GPSServices\LocationServiceConnection.cs:19
at OnTheGo_MEX.App..ctor () [0x00038] in D:\Development\OnTheGo MEX\OnTheGo MEX\App.cs:47
at OnTheGo_MEX.App..cctor () [0x00001] in D:\Development\OnTheGo MEX\OnTheGo MEX\App.cs:4

Problems while running the iOS app of BluetoothLEExplorer

Can't run the app on a iOS 10.1 device (tested with iPhones 5 and 6). The problem is very generic, it says:

System.NullReferenceException at line 16 of Main.cs
UIApplication.Main (args, null, "AppDelegate");

If I show details and expose all the code, it gives me:

at (wrapper managed-to-native)
UIKit.UIApplication.Main(...) - UIApplication.cs:79
UIKit.UIApplication.Main(....) - UIApplication.cs:63
BluetoothLEExplorer.iOS.Application.Main(...) Main.cs:16

Any fixes?

EDIT: I've discovered that the culprit is the line where the tableSource variable is connected to the UITableView:

BleDevicesTable.Source = tableSource;

[BackgroundLocationDemo: location.Android] - StartService not supported in Android 8+

Sample

Within https://github.com/xamarin/mobile-samples/blob/master/BackgroundLocationDemo/location.Android/App.cs

Android.App.Application.Context.StartService (new Intent (Android.App.Application.Context, typeof(LocationService)));

Description

Context.StartService() was replaced with Context.StartForegroundService() as of Android 8.0.

The application needs to check the devices OS version and run the desired method to support both newer devices while being backward compatible.

Also, a check needs to be added in the LocationService.cs class as well for Android 8.0 and if so, call StartForeground() and pass an on-going notification along to it.

Refer to the foreground documents here. The StartForegroundServiceComapt() method is a good example of this.

Steps to Reproduce

Run the current code on an Android device running 8.0 or higher

Expected Behavior

Location should continue to be logged in the background

Actual Behavior

Location only logs in the foreground

Information

  • IDE and IDE version: Visual Studio 2017 v15.7.5
  • Platform with the issue:
    • Android: 8.0 or higher (SDK API Level 26+)
  • Device or simulator/emulator: OnePlus 5T (Android 8.1)

A few questions about the game CoinTime

Hello!

Does the character from the game CoinTime have more moves besides jump?
Are you planning to make a guide or tutorial?

Keep up the great work! Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.