BASIC

Author Topic: Android GPS disable  (Read 1454 times)

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 103
    • View Profile
Android GPS disable
« on: 2017-Jul-08 »
Hi Guys
I don't have GPS switch on
and my builds always advise me to turn it on when executed.
i guessed this would have been in the manifest.xml and just needed removing
 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
but its not

any ideas on how to kill this?

also not that important but I'm building a new app with a resolution of 720x1280, under testing with android my finger mouse reports locations normally, but windows x is normal 0-720 but y is 0-1092 and wont go any higher (using mouseatate). The photo show 1068 must have knocked it when grabbing.
Amstrad CPC 464/6128+, ATARI ST.
Acer  Ferrari One,Acer  SW5-173 & AMD FX 8350/R7-250X

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3464
    • View Profile
    • Space Fractal
Re: Android GPS disable
« Reply #1 on: 2017-Jul-09 »
im means im fixed that long time ago, if you using Android Extras. Its should not touch GPS anymore, if its does not have that permission. Make sure you have newest Android Extras.

Also some android devices reserve pixels for the onscreen buttons, which cannot covered up by the game for some devices. So here you will simply return the resolution that does not cover up the buttons. Fullscreen feature was added in Android 5 (or was its Android 6?), but its might not allways works. But not in Android 4.

Again, you need Android Extras and/or a least glbasic v14 with Android Extras for doing that.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4105
    • View Profile
    • Portfolio
Re: Android GPS disable
« Reply #2 on: 2017-Jul-09 »
Yep, the resolution thing is probably related to those on screen controls. It´s very non standard, I recall finding about 3 or 4 different sizes of bars some years ago.

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 103
    • View Profile
Re: Android GPS disable
« Reply #3 on: 2017-Jul-09 »
I'm using GLBasic IDE, Version: 14.497.
I thought android extras was now built in with v14 or do I have to update it another way?

the screen on android is fine it's the windows mouse that stop at 1092.
Amstrad CPC 464/6128+, ATARI ST.
Acer  Ferrari One,Acer  SW5-173 & AMD FX 8350/R7-250X

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3464
    • View Profile
    • Space Fractal
Re: Android GPS disable
« Reply #4 on: 2017-Jul-09 »
have you downloaded the newst android extras from the top posts?
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 103
    • View Profile
Re: Android GPS disable
« Reply #5 on: 2017-Jul-09 »
just unpacked this version
Android Extras 3.01.2 and iOS9 iOS/TVos projects:
I guess this is the right one.

Its cleared the GPS warning. and also saved 100kb in APK size
Amstrad CPC 464/6128+, ATARI ST.
Acer  Ferrari One,Acer  SW5-173 & AMD FX 8350/R7-250X

Offline Qedo

  • Mr. Polyvector
  • ***
  • Posts: 141
  • UNUS SED LEO
    • View Profile
Re: Android GPS disable
« Reply #6 on: 2017-Jul-10 »
I need help. I want to install Android Extras 3.01.2 and then I downloaded it.
Is this just enough to replace the original Android folder under "Compiler-->platform" or do I have to do something else?
Sorry i am looking into the forum but i just increased the confusion.
Thank you
Ciao

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 103
    • View Profile
Re: Android GPS disable
« Reply #7 on: 2017-Jul-10 »
all I did was exit Glbasic
goto
C:\Program Files (x86)\GLBasic_v14\Compiler\platform\android
and dragged all the new  files / folders in like for like.
takes a few minutes to unpack and copy plus overwrite warnings.
but this worked for me.



 
Amstrad CPC 464/6128+, ATARI ST.
Acer  Ferrari One,Acer  SW5-173 & AMD FX 8350/R7-250X

Offline adaz

  • Mc. Print
  • *
  • Posts: 48
    • View Profile
Re: Android GPS disable
« Reply #8 on: 2018-Feb-16 »
Also some android devices reserve pixels for the onscreen buttons, which cannot covered up by the game for some devices. So here you will simply return the resolution that does not cover up the buttons. Fullscreen feature was added in Android 5 (or was its Android 6?), but its might not allways works. But not in Android 4.

Again, you need Android Extras and/or a least glbasic v14 with Android Extras for doing that.

Dear Space Fractal,
Can you please help in this? My device doesn't allow me to touch the very bottom of the screen. Is it because the virtual buttons bar? Can I somehow override it? I use api-22.

Thanks!

Adam
« Last Edit: 2018-Feb-18 by adaz »

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1308
    • View Profile
Re: Android GPS disable
« Reply #9 on: 2018-Feb-18 »
Hey Paul

I had a that GPS notice issue for a while and after SF letting me know it was an issue with the library I had I edited it and fixed it :)

If I recall correctly I commented out line in SDLactivity.java

   // Create GPS instance
      // androidGPS = new AndroidGPS(this);

Edit : But I can see you sorted it with new files altogether... :)

« Last Edit: 2018-Feb-18 by MrPlow »
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3464
    • View Profile
    • Space Fractal
Re: Android GPS disable
« Reply #10 on: 2018-Feb-18 »
this was fixed on one of the last AndroidExtras version before im stoppede..... its should check if GPS string was set in AndroidManifest or not, and then simply just skip the code..... In a older version, just uncomment the commend by MRPlow post.

Android on some devices might reserve some screen, when its have virtual buttons. That is normal and is a system feature.
« Last Edit: 2018-Feb-18 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.