In my app I get wrong coordinates when running on Emulator.
To set coordinates I opened extended controls, found a location with the search bar and set it (also saved the point ) as suggested here
How to emulate GPS location in the Android Emulator?
but then when app starts still gets the wrong coordinates
GeolocatorUniversal.getLocation() location is Latitude: 37.4218708, Longitude: -122.0841223, which seems to be the default test location...
Where do I have to set it then if not here?
Many thanks
Related
I need help with one project based on the AR + GPS.
I have to place the model at GPS location at runtime and the player has to find that model.
I completed almost part of the project using assets AR + GPS Location to place the model at lat-long. I also use one asset named TriLib 2 - Model Loading Package to load the model from the URL.
I am facing one issue with some android devices.
The model does not appear at some distance(i.e 20 meters away) and if I am inside the range of the 20 meters then it appears on the screen.
I set the AR camera far clipping to 5000.
On iOS devices, it works perfectly fine. On some android devices, it also works fine.
What will be the issue?
https://www.youtube.com/watch?v=IDhH3SrzVFg
Please see the video(time: 3.08) for reference.
On Real Me XT, iPhone X it is working.
On Samsung Galaxy S10 and Xiaomi Redmi Note 9 Pro, The model is disappearing at some distance.
update question:
I am facing a problem when using google map flutter.
Normally in the google map application, the current position will be displayed with a blue dot and trimmed beam, but in google_maps_flutter, it will display a blue dot and an arrow indicating the direction of the compass. currently when i rotate my phone the beam on google maps app moves in the direction of the phone but the arrow on the app using google_maps_flutter doesn't move or moves very slow and wrong direction. everyone can test it with the example of google maps flutter below. Has anyone encountered this problem can give me advice or a keyword to solve. Thank you everyone for reading.
if anyone wants to try can pull directly from google_maps_flutter example. Install on device -> settings -> enable GPS permission -> open app -> user interface -> mylocation marker. tks
link git hub example:
https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter/google_maps_flutter
blue and compass arrow in google_map_flutter
blue dot and the beam that indicates in Google Maps application
This button is provided by the Google Maps Flutter plugin directly. I think, it is there for compatibility reasons and it does not play well with other widgets wich are overlapping the map and it is not customizable, as far as I know.
My suggestion is to disable this button and use your own buttons to control the GoogleMaps widget. Use Floating Action Buttons for example.
I am developing android application. To run my application I created emulator with the following configuration settings(I want to set webcam as front camera).
Configures Camera facing front : webcam0,
Device Ram Size: 512,
...
...
But when I checked if front camera available,
PackageManager pm = getPackageManager();
frontCam = pm.hasSystemFeature("android.hardware.camera.front");
rearCam = pm.hasSystemFeature(PackageManager.FEATURE_CAMERA);
I am getting frontCam value as false and rearCam value as true.
AVD screenshot is given below. How can I use webcam as front camera?
have you Configured your AVD to Configures Camera Facing Front
if not then Edit your AVD OR Create new
Add Configures Camera Facing Front
Set your Desired option
And Run your project.
Hope this Helps.
Happy coding. Thanks.
Any idea how to run the emulator in phone mode for 720x1280 res in 4.0.3 platform?
(without using avd)
Running with the parameter: emulator-x86 -skin WXGA720 starts the emulator in tablet mode. (curiously in 4.0.4 it starts in phone mode - hardware.ini and layer files have no difference)
Anybody has the answer?
Thanks,
Asi
Can you define what you mean by "phone mode" and "tablet mode"? As far as I'm aware, Android makes no such distinction.
If you want to run with a custom screen resolution, you can set the resolution manually rather than using a skin name when running the emulator creation command, e.g. to get a Nexus 7-like device, where it's in portrait by default:
android create avd --name nexus7 --target android-16 --skin 720x1280
Though as there currently isn't a way to set the screen density (or other hardware properties) from the command line; if you want to do so, it's better to do this from the android GUI.
In platform 4.0.3, when running "emulator -skin WXGA720", for some reason the emulator does not read the hardware.ini file under development/tools/emulator/skins/WXGA720/
The reason that the emulator opens in tablet mode is insufficient lcd density. In hardware.ini it is set to 320 but the emulator does not interpret that and sets density to 160.
The solution that I was able to find is hacking emulator hw load properties.
in external/qemu/vl-android.c
change the line
long density = android_hw->hw_lcd_density;
to
long density = 320;
Of course at the end, make the platform.
Note: If you would like to show the system bar (the home and back buttons)
in external/qemu/android/hardware-properties.ini
set hw.mainkeys to no
Asi Mugrabi
Here is a list of problems I have after building my app with xcode 3.2.3 and running it on simulator 4.0.
Of course, all these issues did work with the previous environment.
Location manager does not update location. It used to update with the location at Cupertino but now I get locationManager:didFailWithError: called with error 0.
I have a map view and the panning doesn't work. Moving the map around nor the pinching gesture.
When I click and hold on the map my app, sometimes, crashes and the Log says something about long touch.
Thanks,
Tzur.
The simulator no longer returns a faked location but tries to use your Mac's Airport to locate you. Do you have Airport activated?