BASIC

Author Topic: DPI for Samsung Galaxy S4  (Read 10727 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10708
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
DPI for Samsung Galaxy S4
« on: 2013-Jun-08 »
Hi,
Has anyone got such a device to test?
Can you use V11 and tell me what Platforminfo$("DPI") returns?

Many thanks

Offline Jonás Perusquía

  • Mr. Polyvector
  • ***
  • Posts: 170
    • View Profile
    • Ditrabox
Re: DPI for Samsung Galaxy S4
« Reply #1 on: 2013-Jun-11 »
It has to be a Samsung Galaxy S4? because my current device is a Samsung Galaxy Ace, and i plan to buy a INCO QUOS tablet with Android 4.2
<HTML><BASIC><EC>
Be free and do good things

Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 908
  • 96A285CC
    • View Profile
    • my youtube channel
Re: DPI for Samsung Galaxy S4
« Reply #2 on: 2013-Jun-11 »
Maybe its better to create a app and host it on a server .
Many friends have many devices but cant give it you for testing .
Send the result as email after testing is imho ok .

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10708
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
DPI for Samsung Galaxy S4
« Reply #3 on: 2013-Jun-17 »
someone with that device complained about tiny buttons. But myGCK should be DPI aware now. I might send him an debug app. Or, we should make one "Platforminfo" App for people who complain, that give us the proper information we need.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3624
    • View Profile
    • Space Fractal
Re: DPI for Samsung Galaxy S4
« Reply #4 on: 2013-Jun-17 »
as im a aware, its should return 0.50 -> 2.00 (not remember correctly)?

Howover also alternative, you could do possible let user resize thier buttons in a option, so eventuelly tiny button (or ther other way) could have been fixed by user.... Some times im have seen, even in correct size, im fell they sometimes is too big. That can ben pretty annoying.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline PaLe

  • Mr. Drawsprite
  • **
  • Posts: 58
    • View Profile
R: DPI for Samsung Galaxy S4
« Reply #5 on: 2013-Jun-18 »
Hi,
glb 11.414 return a strange result = 1 on  1080x1920 desktop ...

this is the simple code that I use:

// --------------------------------- //
// Project: TEST
// Start: Tuesday, June 18, 2013
// IDE Version: 11.414


SETCURRENTDIR("Media") // go to media files

TYPE coord
   x
   y
ENDTYPE

LOCAL desk AS coord
LOCAL font AS coord

LOADFONT "smalfont.png" ,0
SETFONT 0
GETFONTSIZE  font.x, font.y

GETDESKTOPSIZE desk.x, desk.y

LOCAL dpi$ = PLATFORMINFO$("DPI")

PRINT "  X: " + desk.x, 0, font.y
PRINT "  Y: " + desk.y, 0, font.y * 2

PRINT "DPI: " + dpi$ , 0, font.y * 4


SHOWSCREEN

MOUSEWAIT

Inviato dal mio GT-I9505 con Tapatalk 2


Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3624
    • View Profile
    • Space Fractal
Re: DPI for Samsung Galaxy S4
« Reply #6 on: 2013-Jun-18 »
1 = no scaling. You cant scaling on a desktop, that why you get that number. on Android the number you get is not DPI(if he uses DisplayMetrics), but more the scaling factor you should use, so DPI its self as name is a bit wrong. Howover im do have some trouble doing that in Greedy Mouse, due im used scaling in the other way, howover butttons is resizeable, so no big deal....
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline PaLe

  • Mr. Drawsprite
  • **
  • Posts: 58
    • View Profile
Re: DPI for Samsung Galaxy S4
« Reply #7 on: 2013-Jun-19 »
damn my English!
spacfractal I'm sorry, I should not write "strange" (strange).
I answered Gernot on command on S4, but I did not know because it is the first time I use the beta version V11.

Anyone who needs to test on S4 (4.2.2), I am available .

Regards

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4202
    • View Profile
    • Portfolio
Re: DPI for Samsung Galaxy S4
« Reply #8 on: 2013-Jun-19 »
 :offtopic:
...
Anyone who needs to test on S4 (4.2.2), I am available .
...

Super thanks PaLe! I might come to pester you on the offer. :good:

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10708
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: DPI for Samsung Galaxy S4
« Reply #9 on: 2013-Jun-19 »
The S4 returned 1? Like "ONE"? Or the windows desktop?
Can you send me the console output of the Android log?

Offline PaLe

  • Mr. Drawsprite
  • **
  • Posts: 58
    • View Profile
R: DPI for Samsung Galaxy S4
« Reply #10 on: 2013-Jun-19 »
yes ONE .

how I do kitty ?

Inviato dal mio GT-I9505 con Tapatalk 2


Offline Jonás Perusquía

  • Mr. Polyvector
  • ***
  • Posts: 170
    • View Profile
    • Ditrabox
Re: DPI for Samsung Galaxy S4
« Reply #11 on: 2013-Jun-19 »
Gonna test the command on Android to see what it returns
<HTML><BASIC><EC>
Be free and do good things

MrTAToad

  • Guest
Re: DPI for Samsung Galaxy S4
« Reply #12 on: 2013-Jun-19 »
Could someone create a program which lists all values returned from PLATFORMINFO$ and stick it in the Play store - would save everyone some time then!

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2621
    • View Profile
Re: DPI for Samsung Galaxy S4
« Reply #13 on: 2013-Jun-20 »
someone with that device complained about tiny buttons. But myGCK should be DPI aware now. I might send him an debug app. Or, we should make one "Platforminfo" App for people who complain, that give us the proper information we need.
Similarly, I have a nexus 10 and the GACK GUI is minuscule on it (10%'ish of the screen area), making it unusable unfortunately.
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Jonás Perusquía

  • Mr. Polyvector
  • ***
  • Posts: 170
    • View Profile
    • Ditrabox
Re: DPI for Samsung Galaxy S4
« Reply #14 on: 2013-Jun-20 »
I confirm that on Samsung Galaxy Ace (Android 2.3.7)(3.5")(hvga)(320x480) the PLATFORMINFO$("DPI") returns "1"

On desktop compuer with Windows 7 (18")(1366x768) the PLATFORMINFO$("DPI") returns "96"
« Last Edit: 2013-Jun-20 by jonaspm »
<HTML><BASIC><EC>
Be free and do good things