提问人:husky 提问时间:10/22/2023 更新时间:10/22/2023 访问量:11
静默后台应用或服务,通过 post 方法(第 php 页)将当前位置发送到服务器,并且在停用时必须启用 GPS 按钮
Silent background app or service that sends current location to a server via post method (page php) and must enable the GPS button if deactivated
问:
我想创建一个在后台运行的静默应用程序。
- 必须通过 POST 方法将当前位置发送到服务器(发送到 PHP 页面)。
- 不必要求用户提供权限来启用和获取 GPS 位置。
- 如果 GPS 切换已停用或用户已停用,则必须启用该切换开关。
- 智能手机已扎根。
fusedLocationProviderClient.requestLocationUpdates(locationRequest, locationCallback, Looper.myLooper());
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); startActivity(意向);
我尝试了这段代码的一部分,但通过这种方式,我创建了一个成熟的应用程序,我无法隐藏它,它会要求我允许使用 GPS。
答: 暂无答案
评论