Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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...

alt text

alt text

alt text

Product Version: UE 4.15
permission.png (39.1 kB)
11111.png (126.8 kB)
22222222222222.png (117.3 kB)
more ▼

asked Feb 16 '17 at 12:24 PM in Blueprint Scripting

avatar image

84 8 14 19

avatar image yanzco Feb 17 '17 at 11:14 AM

anyone? :)

avatar image TheNebelung Feb 18 '17 at 12:34 PM

im in the same boat for ios

avatar image yanzco Feb 18 '17 at 04:56 PM

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

avatar image yanzco Feb 20 '17 at 10:20 PM

anyone please?.. admins?... help? :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

what about initializing it first :D ? 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.

more ▼

answered Feb 21 '17 at 03:45 PM

avatar image

250 8 13 18

avatar image yanzco Feb 21 '17 at 04:37 PM

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... :(

avatar image yanzco Feb 21 '17 at 05:10 PM

alt text

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


gps / location settings on phone are enabled...

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

gps.png (253.4 kB)
avatar image yanzco Feb 21 '17 at 05:28 PM

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..

avatar image Adnoh Feb 21 '17 at 05:39 PM

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

avatar image yanzco Feb 21 '17 at 05:51 PM

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 http://www.mediafire.com/file/jvf2hhzh73fgaue/AndroidTest.rar

avatar image Adnoh Feb 21 '17 at 06:16 PM

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 ;) Will have a look at your project when back on pc

avatar image yanzco Feb 21 '17 at 06:22 PM

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


avatar image Adnoh Feb 21 '17 at 06:43 PM

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

avatar image yanzco Feb 21 '17 at 06:53 PM

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..

avatar image yanzco Feb 22 '17 at 04:18 AM

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...

alt text

answer.png (39.4 kB)
avatar image yanzco Feb 22 '17 at 04:28 AM

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..

alt text

answerplugin.png (149.7 kB)
avatar image Adnoh Feb 22 '17 at 08:03 AM

:-D 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 :) 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.

avatar image yanzco Feb 22 '17 at 11:32 AM

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.. :D

avatar image ZeudosFX Nov 22 '18 at 11:23 PM

Thanks guys.. this thread make me smile! I<3U

avatar image Omar Vector May 05 '17 at 10:13 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question