Author Topic: Android - has anyone tried yet?  (Read 2089 times)

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3669
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #75 on: 2019-Aug-26 »
Im think im have finally found the main issue of the Android 5 :-D what its really happens, but im do just not sure how im will fix it, but im do know the main reason:

The files does simply just not closed correctly when its try to open op the next format in order, here bmp, png and to the last jpg. So if you try to open a png, then its try first open it as bmp, but then its fails, the glbasic try to open op on png and so on. But actuelly this can crashout on system instead.

What we needs to do a file ending checking on each loader and do NOT try to open op a wrong format, then its would work. So now im finally knows what its happens with the file system.

btw if im removed bmp and jpg from trying to load, then the png files actuelly loaded.
« Last Edit: 2019-Aug-26 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1520
    • View Profile
Re: Android - has anyone tried yet?
« Reply #76 on: 2019-Aug-26 »
YAY! When for the fix   :booze:
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3669
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #77 on: 2019-Aug-26 »
not extractly that throught :-(.....

But more future testing, its just bmp files that loads very fine, while both png and jpg does not works on Android 5.

This is what im came with and im have no clue what its does in the png loader, so Gernot might need to help here. But its all about to getting the png and jpg to work again. bmp files works fine.

Im have pm you the project, so you can see, where im have changed the back.png to back.bmp, and that one loads fine (and that also why font also loads as they was in the bmp format too), while all pngs might fails.

So nothing about file permissions and im also removed the Setcurrentpath("Media/") as on android, allways best to load from main path.
« Last Edit: 2019-Aug-26 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3669
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #78 on: 2019-Aug-26 »
more precision, png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); fails....... Dannet. It's a libpng issue. No idea how to fix, but it's that line that Bork. Some sort of a wrong compiler setting..

BMP works actuelly fine. JPG might have crashed due above issue.
« Last Edit: 2019-Aug-26 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1520
    • View Profile
Re: Android - has anyone tried yet?
« Reply #79 on: 2019-Aug-26 »
Hey is the libpng library the updated one that Google requested a year or so ago...is it possible the old version of the libpng is in the project?

Can't seem to locate the libpng file - maybe in a different place under the Steam version?

Or is it combined in another lib file?
« Last Edit: 2019-Aug-26 by MrPlow »
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3669
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #80 on: 2019-Aug-26 »
We use the latest possible security version and we use the source code version of it, so no precompiled libs is used. But not sure why it's fails on andoid 5, while it's works on later versions, except we do use a newer compiler, which can also been the reason. etc wrong build compuiler configuration.
« Last Edit: 2019-Aug-26 by spacefractal »
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: 4212
    • View Profile
    • Portfolio
Re: Android - has anyone tried yet?
« Reply #81 on: 2019-Aug-26 »
warning!...a wild hunch approaches....

Could it be that certain settings on the PNG and JPG creation are causing trouble?
Like if the file is not generated a certain way it will fail security and not load?

Sorry if it sounds stupid, but I have to try to chip in one way or the other. :)

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3669
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #82 on: 2019-Aug-26 »
Im thinks PNG fail is more the why while jpg crash because the file seens not have been closed correctly (its still open). so im believe when possible to get the PNG compiling to work, then jpg would do too. So jpg has not a focus at all yet.

my believe is there is some compiler setting (libpng is wrote in c, not c++) issue as some source code require some compiler settings sometimes to get it working property. Im have no really clue here what settings its want and where to set it. its do weird as its does work on Android 6.0, but could simply due how the compiler compiles and works.

As its per now, the file will NOT open, etc its fails to set a pointer to read the file and libpng code does not out a error, so im have no clue what to do and what a kind of error its is. That would been nice. Im just hate when no error output is shown.

There was nothing wrong with haveing GETCURRENTDIR() which might have a little bit different SETCURRENTDIR() path, both was actuelly pointed to the same folder anyway.

Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1520
    • View Profile
Re: Android - has anyone tried yet?
« Reply #83 on: 2019-Aug-27 »
Hi SF,

Just to remind that SOUND assets failed to load on Android 5.x too - until I used GETCURRENTDIR() but maybe you fixed that with your update to assets copying etc.

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3669
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #84 on: 2019-Aug-27 »
as allready tried various ideas with that kind (one assets loaded in different ways as other). also bmps does works, but not png, and its dont output a error from libpng or dont know how to get it output its error.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1520
    • View Profile
Re: Android - has anyone tried yet?
« Reply #85 on: 2019-Aug-29 »
Let's know when you or Gernot have a fix for this ...
I am keen to fix a bug in one of my Android apps - but need to have the Asset load issues sorted beforehand. :)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3669
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #86 on: 2019-Aug-30 »
waiting also, but dont hold your breath as Android 5 is actuelly old (Android 10 is close to release), and you could reenable it again when its got fixed, or by only use bmp files if png did not got loading (you can check if a sprite got loaded or not).

This is a libpng issue and no idea what to do without seing any errors why.
« Last Edit: 2019-Aug-30 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1520
    • View Profile
Re: Android - has anyone tried yet?
« Reply #87 on: 2019-Sep-04 »
Maybe Gernot can figure out the compiler issue?  :noggin:

I am on holidays soon and wanted to update a bug in an app, looks like android won't be really ready for while yet.

I might try update an app with a small userbase and see how it goes...can't risk this yet on apps with tens of thousands of users.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3669
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #88 on: 2019-Sep-04 »
Apple do force update as well. For best practical simply set Api to been minimum Android 6.0 by now. When/if its got fixed, then a another update can been done to enable Android 5 again. By now im do still have focus on a Spectrum Next game.

Anyway if im do port Genius Greedy Mouse again to Android, then im would require Android 6+ anyway. For me missing Android 5 is not a biggue at all.

But if you can, convert all your images to bmp (its not much bigger than png when compressed to the apk really). yes you might miss some features, but just disable those.

You game was still playable by using bmp for the title screen and then playing the b&w version.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3669
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #89 on: 2019-Sep-04 »
im have wrote to gernot as im cant do anything with it and not sure how to do it sadly why libpng fails to open as its diddent out error, but have not checked it due im got distracted by a game named "Tyvarian" on Spectrum Next.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.