yayaa / LocationManager

Simplify getting user's location for Android
806 stars 187 forks source link

system crash #102

Closed zhongshuiyuan closed 4 years ago

zhongshuiyuan commented 4 years ago

...DEFINE YOUR ISSUE... Hello, when using this class library to locate, it will cause program jam and system crash. Could you tell me if my configuration is wrong and print the log once in a few milliseconds.

Configuration

mOption = new LocationConfiguration.Builder() .keepTracking(true) .askForPermission(new PermissionConfiguration.Builder(). requiredPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}) .build()) .useDefaultProviders(new DefaultProviderConfiguration.Builder() .requiredTimeInterval(5 60 1000) .requiredDistanceInterval(5) .acceptableAccuracy(1.0f) .acceptableTimePeriod(5 60 1000) .setWaitPeriod(ProviderType.GPS, 10 1000) .setWaitPeriod(ProviderType.NETWORK, 10 1000) .build()) .build();

Logs

04-02 13:40:06.773 19903-19903/? I/MetokLocationProvider: setRequest: request =ProviderRequest[ON interval=+5m0s0ms] ; client =WorkSource{10282 joint.android.police} 04-02 13:40:06.776 19903-10319/? I/MetokLocationProvider: onSetRequest 04-02 13:40:06.777 19903-19903/? I/MetokLocationProvider: setRequest: request =ProviderRequest[ON interval=+5m0s0ms] ; client =WorkSource{10282 joint.android.police} 04-02 13:40:06.805 19903-20715/? I/NetworkLocationManager: start get current Location 04-02 13:40:06.807 19903-19903/? I/MetokLocationProvider: report position from 2 04-02 13:40:06.811 19903-19959/? I/MetokLocationProvider: onSetRequest 04-02 13:40:06.812 19903-19903/? I/MetokLocationProvider: setRequest: request =ProviderRequest[ON interval=+5m0s0ms] ; client =WorkSource{10282 joint.android.police} 04-02 13:40:06.816 19903-10319/? I/MetokLocationProvider: onSetRequest 04-02 13:40:06.816 19903-19903/? I/MetokLocationProvider: setRequest: request =ProviderRequest[ON interval=+5m0s0ms] ; client =WorkSource{10282 joint.android.police} 04-02 13:40:06.842 19903-20715/? I/NetworkLocationManager: start get current Location 04-02 13:40:06.843 19903-19903/? I/MetokLocationProvider: report position from 2 04-02 13:40:06.848 19903-19959/? I/MetokLocationProvider: onSetRequest 04-02 13:40:06.848 19903-19903/? I/MetokLocationProvider: setRequest: request =ProviderRequest[ON interval=+5m0s0ms] ; client =WorkSource{10282 joint.android.police} 04-02 13:40:06.852 19903-10319/? I/MetokLocationProvider: onSetRequest

yayaa commented 4 years ago

Could you share your stacktrace for the crash as well? And the logcat output for location manager. From the info you share it is not possible to say what is the problem.

zhongshuiyuan commented 4 years ago

When using locationmanager, the app will become more and more stuck until the system crashes, and not when not in use. Can only see the logcat's continuous output gps log, without any other information。

zhongshuiyuan commented 4 years ago

And CPU usage and memory usage are increasing.

yayaa commented 4 years ago

Sorry, I cant help if you dont share any stacktrace or log output about what library is printing. 🤷‍♂️