Comments (10)
Aaaaah! It is the App Target!
NSLocationAlwaysUsageDescription is for IOS 10+ I had IOS 8 set and removing this fixed the issue. But then also changing my target fixed it also.
from background_locator.
The library does not ask for permissions. Permissions should be asked in the main app(for example package location_permissions/location_permissions.
You did this?
https://github.com/rekab-app/background_locator/blob/86ef3a83714f9f2dc0e19f4fa711e39d6e2789f3/example/lib/main.dart#L174
from background_locator.
The library does not ask for permissions. Permissions should be asked in the main app(for example package location_permissions/location_permissions.
You did this?
https://github.com/rekab-app/background_locator/blob/86ef3a83714f9f2dc0e19f4fa711e39d6e2789f3/example/lib/main.dart#L174
Yes i do. see my code:
@override
Widget build(BuildContext context) {
if (!isRunning && isBackgroundActive) {
_checkLocationPermission();
}
return OKToast(
duration: Duration(seconds: Helpers.toastDuration),
position: ToastPosition.bottom,
handleTouth: true,
dismissOtherOnShow: true,
child: Visibility(
visible: (linkFetch == true),
...
void _checkLocationPermission() async {
final access = await LocationPermissions().checkPermissionStatus();
switch (access) {
case PermissionStatus.unknown:
case PermissionStatus.denied:
case PermissionStatus.restricted:
final permission = await LocationPermissions().requestPermissions(
permissionLevel: LocationPermissionLevel.locationAlways,
);
if (permission == PermissionStatus.granted) {
_startLocator();
} else {
// show error
}
break;
case PermissionStatus.granted:
_startLocator();
break;
}
}
void _startLocator() {
BackgroundLocator.registerLocationUpdate(
LocationBackground.callback,
androidNotificationCallback: LocationBackground.notificationCallback,
settings: LocationSettings(
notificationTitle: "My App",
notificationMsg: "My App Title",
notificationIcon: 'ic_background',
wakeLockTime: 20,
autoStop: false,
interval: 60 * 5, // 5 minutes (300 secs)
),
);
setState(() {
isRunning = true;
});
}
It works on android, and ask for permission... see:
But in iOS do not ask for permission, and the location permission is missing in permission list in app detail. See here:
from background_locator.
Did you followed the instruction for setting up on iOS ?
You have to add location permission in Info.plist
from background_locator.
Did you followed the instruction for setting up on iOS ?
You have to add location permission in
Info.plist
Yes i do!
When i opened this post i add the Info.plist portion that has backgrond location settings... I thing i do not miss any setting...
from background_locator.
Did you try running exactly the "example" from this repository? The Info.plist configuration looks good, but maybe there is something that the configuration is different.
If you try the "example" and it requires the permissions, we discard that it is not a problem of the library, but some missing documentation for the correct configuration.
from background_locator.
Works the example and works... weird... will investigate if something is missing here on my project.
But, in the repo "example" project is causing the same problem of this issue #55 (comment)_
from background_locator.
try with the previous version of the repo, maybe there is something in the configuration that is missing (in that case better the documentation). Then we go back to the latest version of the library and wait to solve the bug
from background_locator.
I have the same issue
from background_locator.
I think this problem is fixed, so I'm closing this issue, but feel free to open it anytime;
from background_locator.
Related Issues (20)
- İOS : Data Null HOT 1
- How can I send data from location callback to controller? HOT 1
- location_callback_handler.dart not found when run release project HOT 5
- [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'package:untitled/location_callback_handler.dart' not found. HOT 4
- Unable to build flutter release version with background_locator lastest HOT 1
- Library Update
- Issue on release build HOT 8
- Unable to capture location in release mode (Android) HOT 4
- Unable to run on iOS
- Error java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient HOT 1
- Error on init app flutter with carp_background_location HOT 5
- java.lang.IncompatibleClassChangeError: The method 'com.google.android.gms.tasks.Task com.google.android.gms.location.FusedLocationProviderClient.requestLocationUpdates(com.google.android.gms.location.LocationRequest, com.google.android.gms.location.LocationCallback, android.os.Looper)' was expected to be of type virtual but instead was found to be of type interface (declaration of 'rekab.app.background_locator.provider.GoogleLocationProviderClient' appears in /data/app/com.doa.lojisoft.saray-JqLCd0a12SEpAYQu6cUZjg==/base.apk:classes2.dex) HOT 2
- Service stopped suddenly in release mode android
- Data type mismatch (nullable type) and method implementation error in kotlin code just after adding the dependency HOT 1
- [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument: is a regular instance: Instance of 'LocationDto'
- What is speed measured in?
- How to stop service after a period of time?
- Upgrade Background_Locator
- Need Code or Library in kotlin only
- I so confused about "getting location updates even when the app is killed" !!!!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from background_locator.