我如何使用locationclient类requestLocationUpdates(LocationRequest, LocationListener)来获取android中的位置更新?我已经尝试了以下代码,但它无法正常工作.谁能帮我这个?哪里是错误,提前谢谢.
public class MainActivity extends FragmentActivity implements GooglePlayServicesClient.ConnectionCallbacks,GooglePlayServicesClient.OnConnectionFailedListener {
private final static int CONNECTION_FAILURE_RESOLUTION_REQUEST = 9000;
LocationClient mLocationClient;
Location mCurrentLocation;
LocationRequest mLocationRequest;
ArrayList<Location> list = new ArrayList<Location>();
private static String msg;
private static final int MILLISECONDS_PER_SECOND = 1000; // Milliseconds per second
public static final int UPDATE_INTERVAL_IN_SECONDS = 300;// Update frequency in seconds
private static final long UPDATE_INTERVAL = MILLISECONDS_PER_SECOND * UPDATE_INTERVAL_IN_SECONDS; // Update frequency in milliseconds
private static final int FASTEST_INTERVAL_IN_SECONDS = 60; // …Run Code Online (Sandbox Code Playgroud) 我正在尝试导出使用Google Play服务库的应用程序.但是有一个lint警告,即使我已经清理了项目,也会阻止我导出应用程序.但它在模拟器中运行良好.这是它显示的警告:
"common_google_play_services_install_title" is translated here but not found in default locale
Issue: Checks for translations that appear to be unused (no default language string)
Id: ExtraTranslation
If a string appears in a specific language translation file, but there is no corresponding string in the default locale, then this string is probably unused. (It's technically possible that your application is only intended to run in a specific locale, but it's still a good idea to provide a fallback.).
Note that …Run Code Online (Sandbox Code Playgroud)