Mobile : enabling location sevices

hello everyone, i cant seem to make the new mobile location services to work…

i was curious about it so went to try it out…
not much documentation about it…

need help…

i packaged the apk to an ETC1 to test it out…

it doesnt seem to work…
Lat and Long variables are always 0…

i then think its about the permission, but, i cant get it to work…
or i dont know the correct way to enable location permission for the device…

anyone? :slight_smile:

im in the same boat for ios

i hope they give us some samples for us to look at… >.<

anyone please?.. admins?.. help? :slight_smile:

what about initializing it first :smiley: ? I’ve just done a setup for you and it works like a charme. Only Altitute and Vert.Accuracy are 0, maybe a local problem on mine. I do a retest without explizit permissions then i share.
what exactly are your problems?

Give it a try - no need for special permissions when launching via ue or deploying via adb, for shipping I’m not shure - I think you should use the “fine” once, they include the others.
Uploaded APK to mediafire for quick test.

thank you for this… will check it out…
but i remembered i tried initializing it before…
but i dont know what value i should place in the min distance filter

currently compiling my project…
and also downloading yours… will post results in a few minutes…

edit: My initialize setup did not work…
now trying to put your work to mine… let’s see what happens, after i install apk in my test phone…

edit2: wont work on my test phone…
init location services false
start location services false

will try on another phone… maybe its the phone type… :frowning:

no success with first phone and second phone…

attached is the BP i made copying yours…
i wonder why… i build the project with ETC1 development

:frowning:

gps / location settings on phone are enabled…

EDIT : Will try out your APK now… will post result in a few minutes…
hope it works…

Strange…have you used my project and compiled it? Maybe it’s a setting or plugin in mine which makes it work. Does a
adb logcat UE4 *:S
Show anything useful? Have you connected your phone and tried “run” from the engine? Then it should build the correct version for your phone automatically.
Sorry, just starting with this android stuff ^^
If you like, give me your project and I test with it

your APK worked perfectly… but lat long is way off…
wonder whats wrong with mine, will review yours…

MORE weird is, i followed your sample perfectly…
Why is mine wont work… hmm…

im sorry, im even more a beginner in android…
i also dont know what adb logcat is, and where to find it…

when i try the apk out, i install it in the phone manually…
how do i connect my phone and “run” from the engine…

currently compiling your project here… will post result…
i will upload my test project in a moment, upload speed is slow, might take awhile

EDIT: heres my experimental test project

adb is part of the android sdk which you should have installed. Search for adb.exe it is inside of platform-tools folder. Adb is the backend to communicate with a USB (or wifi) connected phone WHICH NEEDS TO BE IN DEVELOPMENT MODE (just Google it)
adb logcat gives you all the syslog messages from your phone! With my above filter you see only UE related messages.
After you ve connected your phone in developing mode to pc, you can run your game directly from the editor! Try this.it makes your life easier and faster :wink:
Will have a look at your project when back on pc

ok got it…

Connect your device to your computer.
Open ‘cmd’
Type command ‘adb devices’

now phone can be seen in UE4 editor devices

EDIT: finished compiling your project … installed apk to my phone, it worked perfectly…

now trying to compile mine, along with adb… hope it works… :o

EDIT2 :
still init location services false
start location services false

:frowning:

I think the project settings are saved in one of the 3 (?) .ini files in the project. Try to diff (windiff) mine with yours

tried that, not much difference…
maybe because mine was 4.14 upgraded to 4.15…
ill try make a new project…

EDIT: did fresh new project, still no success…

i found it… this is definitely what is causing mine NOT to work…

Adnoh, you have this android location services plugin…
which mine does not have…
how did you get it?.. where do i get this plugin?..

alternately, if i just use your project, cleared evreything, it works fine…
because the location service plugin is present…

but when i create new project, there is no plugin like that…
i wonder where do i get this plugin…

here it is… these plugins must be enabled for location services to work…

thank you adnoh!!.. without you, i will never be able to discover it…

:smiley: sometime things can be simple. Have never thought about that, because if you don’t enable the plug in I was sure you won’t get the BP nodes-which you have :slight_smile: mystery
Do you get values for altitude and the vert accuracy? These are always 0 on my phone
I would love to see epic integrating the magnetometer/compass, this is what I m waiting for.

there were no notes on it that we need to enable a plugin to get it…
have not tested it out, was only interested with the LAT and LNG values…
will do when i get back home… :smiley:

How can I get the name of the location? :smiley: