android-gps

    0热度

    3回答

    getAltitude()方法的返回值始终返回0.00。许多答案表明,这可能归因于不支持高度细节的提供商。我已经检查了这个,它确实支持高度。 我想从GPS坐标中获取高度。任何帮助表示赞赏。 我的代码可以在下面看到。 LocationManager locationManager; LocationProvider locationProvider; /* Get LocationManager

    0热度

    1回答

    有一个应用程序,它会工作,而电话的GPS是在上,否则它不应该工作。 public class Gps extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(saved

    0热度

    1回答

    1.在我的应用程序中,我想跟踪用户当前位置每隔1分钟然后保存在本地数据库中。 没有得到正确的位置有时候,当用户步行时。 2.对于查找位置,我想使用Google play Services API。 我的需要: 后台服务应得的位置,在本地数据库中保存每个minute.Even应用程序被关闭。 还与低电池使用情况。 我试过一些代码一些方法已被弃用,而不是工作。 请建议我任何解决方案。

    1热度

    1回答

    我一直试图让下面的代码在最近4个小时内工作。 public void clearLocation() { LocationManager locMan = (LocationManager)getSystemService(Context.LOCATION_SERVICE); locMan.clearTestProviderLocation("gps"); 我

    0热度

    1回答

    如果这是一个非常普通或简单的问题,请道歉。 我写了一个位置监听器类为我的Android设备,并设置requestupdate如下: locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); 我看到GPS图标上来,眨眼,然后保持稳定。在我的日志中,我看到位置更新,但问题是几乎没有更新,可能一

    0热度

    2回答

    我正在使用导航抽屉,Fragment_1包含一个listview,它搜索gps位置,然后加载适配器。如果我保持Fragment_1处于打开状态,直到它完全加载,则该过程可以正常工作。但是,如果我在Fragment_1搜索位置或加载适配器时尝试打开另一个片段Fragment_2,则我的应用程序崩溃。 Fragment_2支持textview,如果单独启动,则可以正常工作。 我使用下面的代码从抽屉推出

    1热度

    1回答

    我的Android应用程序出现问题。我使用这个类: package com.example.seadog.gps; import android.app.AlertDialog; import android.app.Service; import android.content.Context; import android.content.DialogInterface; impo

    0热度

    1回答

    我有A Activity和B Activity,两者都实施LocationListener。因此,无论有 @Override public void onProviderDisabled(String provider) { // Open AlertDialog } 我开始B Activity从A Activity。当我关闭B上的GPS时,它将打开AlertDialog,如代码