Is there a way to get GPS information with an Android studio emulator?

Asked 1 years ago, Updated 1 years ago, 114 views

I'm making a location sharing application while studying Android, and I'm trying to test if I can share a location with one phone, but I'm trying to test it with an emulator. The problem is that I want to check that the location is shared in real time, but I don't know how to print the marker by randomly setting the latitude and longitude in the Android emulator, but I want to get the current location information and print the marker, but I don't know how.

If it's impossible with an emulator, please give me some other advice.

android gps

2022-09-22 19:55

1 Answers

Mock Location can be used to provide a virtual location. For more information, please read the article.

Or you can use an emulator to set the location (I think you've done this before) or use the Android Studio plug-in.

Since the emulator is a virtual device, it is not possible to transmit actual information like a mobile phone, but it is possible to verify whether the function works in the above way.


2022-09-22 19:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.