I am creating a xamarin form app which require user location after every 10 meter.
I am able to get location when app is running in foreground but unable to get location when app get into background.
Any advice will be great.
You need to create a background service in Xamarin.Android and then call that using dependency services. You could also look at Shiny. It is a good plugin built for this purpose.
https://github.com/shinyorg/shiny
Background updates are handled a bit different on each platform. For Android, you will want to integrate a foreground service that subscribes to location changes and the user interface binds to.
You could use the Xamarin.Essentials and MessagingCenter for this.
For more details, please check the code sample in the link below. https://stackoverflow.com/a/63665571/11850033
Related
I am creating a Store Build for my UWP app. I would like the app to run automatically (without user intervention) once installed on end-user device. Is that possible? If so, how?
I’m afraid you can’t let the app run automatically after installation.
Currently, uwp doesn’t provide such api to do this. If you do want this feature, please feel free to submit your feature requirement with Windows Feedback Hub app.
My app setup is a basic new app with default viewController with the default classes for share extension on iOS 11.2.
The host AppDelegate class FinishedLaunching never gets called.
Just shows the launch screen and closes the app.
The sample Xamarin app provided also has the same issue.
Link to the sample app:
Share Extension sample
Any idea whats going wrong?
Do you want to open the app which you created with the share extension, when user clicks the share button to use this share extension? If so, this app should be called Containing App.
But unfortunately, there's no way to do this on iOS8.3+ except Today Extension. From this post we know that:
The intended approach for share extensions is that they handle all of
the necessary work themselves.
Also from the Apple documentation about extension:
An extension’s UI should be simple, restrained, and focused on
facilitating a single task.
Apple doesn't recommend us to open its containing app from extensions, actually it avoids that. If you want to retrieve data in containing app, you can set up an app group so that data can be shared between these two apps.
I have found that "Services..." a very useful place to add functionality via AppleScript.
I have written a small OS X app that uploads documents to a web based service (it requires OAuth2) and thought it would be great to add this functionality to the "Services" submenu. For example, when I am viewing a pdf in Preview to upload directly from a Services item.
I have tried wading through Apple's documentation on "Services", but I don't see how to add one outside of the Automator. I would be happy to use that but:
Do I need to make my app AppleScript-able? If so, how?
Is there another way to add Services outside of the Automator?
Thanks!
AppleScript/Automator are not needed, there's a couple steps involved (Info.plist entry and handler in your app). See the Services Implementation Guide for details.
I have an app that captures photos, add some additional details and send the images to my server that is currently used in an enterprise setup. I would like to add DJI Framework so the images captures thru the drone (thinking of Phantom 3) go thru the same workflow.
I DO NOT want the user to use 2 different apps (DJI GO to control the drone and capture photos) and our custom app to (import from DJI) and upload the photos to server. Would rather have everything as part of my custom App.
In the DJI SDK, most of the features are supported in the framework. Also, there is a sample app which is involved in the framework. I suggest to go through the code and find out which feature you want to use and implement in your app. Technically, you could implement you own 'DJI Go App' except some of features which require respond from DJI Sever.
You are trying to make custom image manipulation after recording the images from DJI drone
Following are the steps you have to consider for the app
Use DJI SDK for image capture
After capturing the image is finished then manipulate the images using OpenCV framework.
Post the data to server
You can also follow tutorial provided by them:
https://developer.dji.com/mobile-sdk/documentation/ios-tutorials/PanoDemo.html
I'm making an app where I would like to generate a new tile from inside the app, and then change it - no web service involved, and no need to change it when the app is not running.
Anyone know how to do this?
Cheers!
as #Derek said, you can update the tile using the tile schedule, but will take an hour minimum before the phone updates the tile.
i have written a tutorial on how to update the tile instantly here:
http://www.diaryofaninja.com/blog/2011/04/03/windows-phone-7-live-tile-schedules-ndash-executing-instant-live-tile-updates
basically it involves opening a push/toast update channel and then getting the phone to send "itself" a live tile update request. this will trigger the phone to go and get the tile "right now"
hope this helps
You can update the background image for a Live tile by using the ShellTileSchedule as documented in How to: Update Your Tile Without Push Notifications for Windows Phone. However, the image that is used for that background must come from a remote location, it cannot be provided directly by your application (unless you generate the image and send it to your own web service).
If you do go down the Microsoft Push Notification Services route, you may want to take a look at the Windows Push Notification Server Side Helper Library provided by the Windows Phone team.
You can generate and send a tile push notification message from the applicaiton itself. Not sure if it will work with an image in the app though. - Let us know if you try.
Thanks for the info!
It won't be an image from the app, as the xml files I'm downloading are pointing to the correct image. Not sure about the format, but I guess setting up my own server to proxy the request and resize the icon as needed wouldn't be too hard.
But it's really sad we cannot manipulate the tile image for 'this' from within our own app...