Posts

Showing posts with the label location

sending a keyword to bring the location

Image
Clash Royale CLAN TAG #URR8PPP sending a keyword to bring the location hello every one **i want to send a keyword in a message that bring me the location of the reciever when the message will send i don t know how to add this option in my code ** i have my own map that i created with fragment that gives you your position this is my main activity import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.TextView; public class Main3Activity extends AppCompatActivity { private static final String TAG = Main3Activity.class.getSimpleName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main3); } /** * Uses an implicit intent to dial the phone with the Phone app. * Gets the phone number...

How to create Location object

Image
Clash Royale CLAN TAG #URR8PPP How to create Location object I am trying to make a new location and set its latitude/longitude like this: var targetlocation = Location("") //this example code doesn't work below targetlocation.setLatitude(55.555555) targetlocation.setLongitude(55.555555) How can I do this correctly in kotlin? Thanks. 1 Answer 1 I haven't tried this but try doing this. var targetlocation = Location("") targetlocation.latitude = 55.555555 targetlocation.longitude = 55.555555 Hi I tried that already but i get "expecting member declaration" error – Noob 4 mins ago By clicking "Post Your Answer", you acknowledge that you have read our updated terms of s...

WatchKit and Core Location Not Requesting User Permission

Image
Clash Royale CLAN TAG #URR8PPP WatchKit and Core Location Not Requesting User Permission I cannot get location services on WatchOS 4 to request user permission. My info.plist with privacy usage description in WatchKit Extension is above. My code is below. When it is run, no authorization is requested and I don't get any location updates. private let locationManager = CLLocationManager() override func willActivate() { super.willActivate() locationManager.allowsBackgroundLocationUpdates = true locationManager.delegate = self self.locationManager.requestWhenInUseAuthorization() } func locationServicesAuthorizationStatus(_ status: CLAuthorizationStatus) { locationManager.requestWhenInUseAuthorization() switch status { case .notDetermined: print("LocationServicesAuthorizationStatus: .notdetermined") self.locationManager.requestWhenInUseAuthorization() locationServicesStateNotDetermined() case .restricted, .denied: ...