gps

mSecurityInputMethodService is null in logcat

假装没事ソ 提交于 2019-12-31 13:05:24
问题 I wrote a little android app that should display the current location (last known location) of the smartphone. Although I copied the example code, and tried several other solutions, It seems to have the same error every time. My app consists of a button. Pressing the button should log the longitude and latitude, but only logs "mSecurityInputMethodService is null" . Here's the MainActivity.java : public class MainActivity extends Activity { int response; @Override public void onCreate(Bundle

Android location permissions

喜夏-厌秋 提交于 2019-12-31 11:41:53
问题 In my Android application I'm willing to use GPS locations . What are the main permissions that I should included in android manifest file in order to use GPS locations. In case of lost the GPS signal strength, is there any way to triangulate the position using mobile networks. Thank you! 回答1: The main permissions you need are android.permission.ACCESS_COARSE_LOCATION or android.permission.ACCESS_FINE_LOCATION . Only fine location will allow you access to gps data, and allows you access to

Android location permissions

南楼画角 提交于 2019-12-31 11:41:52
问题 In my Android application I'm willing to use GPS locations . What are the main permissions that I should included in android manifest file in order to use GPS locations. In case of lost the GPS signal strength, is there any way to triangulate the position using mobile networks. Thank you! 回答1: The main permissions you need are android.permission.ACCESS_COARSE_LOCATION or android.permission.ACCESS_FINE_LOCATION . Only fine location will allow you access to gps data, and allows you access to

Developing a GPS car tracking system

点点圈 提交于 2019-12-31 09:23:13
问题 I'm in the brainstorming phase to develop a GPS car tracking system requested by a customer. I myself know the directions to build some GPS system to mobile phones and etc. But sincerely I don't know how to start in that project. That is the scenario: 1) The cars will get a device with a SIM CARD that will emit GPS signals. 2) My customer will in any place (home, work, etc) with a web connection will see in the map where the car is located. For me, I have not problems at get the GPS data,

enabling GPS programmatically not working

假装没事ソ 提交于 2019-12-31 05:44:09
问题 I am trying to enable/disable (toggle) GPS programmatically in my app via a button click, but it is not working. Please help. My target devices are not rooted. Here's the code I'm using. private void gps() { Intent intent=new Intent("android.location.GPS_ENABLED_CHANGE"); Button gps = (Button)findViewById(R.id.gpsButton); if(isGPSon()) { intent.putExtra("enabled", true); gps.setText(R.string.f2_gps_deact); } else { intent.putExtra("enabled", false); gps.setText(R.string.f2_gps_act); }

Convert latitude and longitude to ECEF coordinates system

让人想犯罪 __ 提交于 2019-12-30 18:07:50
问题 I am studying pArk Apple sample code, and how it is works. anyone knows how convert the latitude and longitude to ECEF coordinates, and Covert ECEF to ENU coordinates centered at given lat, lon functions are work? I just want to understand what is going on in this function! thanks. void latLonToEcef(double lat, double lon, double alt, double *x, double *y, double *z) { double clat = cos(lat * DEGREES_TO_RADIANS); double slat = sin(lat * DEGREES_TO_RADIANS); double clon = cos(lon * DEGREES_TO

Difficulty in sending location of user 1 to user 2 and user 2's location to user 1?

流过昼夜 提交于 2019-12-30 16:17:14
问题 I have a code which sends location of user 1 to user 2 and user 2's location to user 1 . The location of user 1 is send perfectly to user 2 and user 2 is even sending a message back to user 1 but the location which it is sending is the location of user 1 not his (user 2) location. Here is my code: package com.example.gui; import android.app.Activity; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.ContentResolver; import android.content

GPS location on iOS and Android

旧巷老猫 提交于 2019-12-30 14:41:53
问题 I have limited experience programming Android apps and none at all for iOS. Part of a future project of mine is to make my app be able to record the current location using GPS possibly on both Android and iOS. Can the GPS coordinates be taken in "Universal Transverse Mercator" format like in Google Earth for both platforms? If not, is there some way to calculate the coordinates to this format? EDIT: Any chance anyone would know what format the functions in their respective APIs return? 回答1:

how to programmatically remove gps blinking icon from status bar in android (or make it never blink)?

对着背影说爱祢 提交于 2019-12-30 11:15:31
问题 In my android application which uses GPS, I have UI elemnts that should blink permanently. I was told after a couple of pilot runs that the blinking GPS icon, i.e. when GPS is actually trying to get a fix, steals completely unnecessary bit of user's attention from the main UI. Is there a way to remove the GPS antenna icon from the status bar programmatically from within the application? Or, alternatively, make it never blink? Thanks! 回答1: You could hide the Status Bar altogether: http://blog

How can a 1 year old (java) lib correctly perform an UTC Time formatting, considering a newly introduced leap second

假装没事ソ 提交于 2019-12-30 07:59:07
问题 A timestamp expressed in milliseconds since 1.1.1970 UTC is a common way to store timestamps, e.g in Java. e.g: long timestampUtc = System.currentTimeMillis(); Such a timestamp can be formated in human readle time format, e.g using this code SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US); df.setTimeZone(TimeZone.getTimeZone("UTC")); String humanTimeUtc = df.format(new Date(timestampUtc)); System.out.println(humanTimeUtc); which gives output: 2014-02-14 14:58:05