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

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1533
    • View Profile
Re: Android - has anyone tried yet?
« Reply #15 on: 2019-Aug-14 »
Thanks SF,

I did those package changes - I will try run my app in debug mode now to see if I can get some info on the crash.

My logo app project is quite straightforward and I disabled the AExtras parts but still there is issue.

I wonder if the older java call I'm using is different to the one the new projects use?

Code: GLBasic [Select]
GLOBAL Android AS AndroidExtras

?IFDEF ANDROID
        IMPORT "C" const char* android_JAVACALL(const char* string)
?ENDIF

FUNCTION JavaCall$: callStr$
        ?IFDEF ANDROID
//              IF adService.state=1 THEN RETURN
                STATIC res$
                res$ = android_JAVACALL(callStr$)
                RETURN res$
        ?ENDIF
ENDFUNCTION
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3682
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #16 on: 2019-Aug-14 »
The previous log did not started its has started the app at all. If it's a Java issue, it's should have been launched anyway when tried to call it from glbasic.

Androidextras stuff was howover not touched or checked and javacalls its self mehod has not changed.

The app name can also been set in strings. Xml
« Last Edit: 2019-Aug-14 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: 1533
    • View Profile
Re: Android - has anyone tried yet?
« Reply #17 on: 2019-Aug-14 »
Debug version Working Now on AS emulator! But not the signed version on my device ...

Does this work on anyones device?

https://www.dropbox.com/s/k70gfknoy8ykxfa/app-release.apk?dl=0


[Update: it works on my nexus tablet but not on my Samsung J3 with android 5.1.1.]

« Last Edit: 2019-Aug-14 by MrPlow »
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3682
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #18 on: 2019-Aug-14 »
Need the logcat when connected to pc or the full project (except the big build folder).
« Last Edit: 2019-Aug-14 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: 4224
    • View Profile
    • Portfolio
Re: Android - has anyone tried yet?
« Reply #19 on: 2019-Aug-15 »
Samsung Note 2 with android 4.4.2 installs, when executed, it rotates the screen to black, but after a few seconds, re-rotates back and exits.
Galaxy s5 with android 6.0.1, installs and runs all fine here.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3682
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #20 on: 2019-Aug-15 »
im want to have your project as im might have used some depreacted feature used that must been skipped on older devices. Im do NOT need the glbasic source code, just the Android Studio Project with the project cleaned.

Howover Its looks like on Samsung Note 2 does runs, but fails for some reason. So could this been a copy assests/creating folder issue in the startup?

If its that, try to do something like below start in your code to manually build up the folders:

Code: GLBasic [Select]
        ?IFDEF ANDROID
                IF DOESDIREXIST("Media")=0 THEN CREATEDIR("Media")
                IF DOESDIREXIST("Media/levels")=0 THEN CREATEDIR("Media/levels")
                IF DOESDIREXIST("Media/music/ogg")=0 THEN CREATEDIR("Media/music/ogg")
        ?ENDIF
        SETCURRENTDIR("Media") // seperate media and binaries?
 


This is something im have NOT state in the readme, but should have do that, if its that bug?

PS. Android 4.3 and below os out as least. Im wont support and no idea if its a graphics issues in Android 4.4 throught, but want to see the app first.
« Last Edit: 2019-Aug-15 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: 1533
    • View Profile
Re: Android - has anyone tried yet?
« Reply #21 on: 2019-Aug-15 »
Ok - I will try your code first and then if no joy - I will clean and send to you
:)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1533
    • View Profile
Re: Android - has anyone tried yet?
« Reply #22 on: 2019-Aug-15 »
I cleaned the project - still 400 mb maybe i did it wrong?

Update: Sorted - got it to 78mb will send a dropbox link.
« Last Edit: 2019-Aug-15 by MrPlow »
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1533
    • View Profile
Re: Android - has anyone tried yet?
« Reply #23 on: 2019-Aug-15 »
Sent that to you! Good luck! :)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline MrPlow

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

Wasnt the folder thing i think - as my Android.init() was doing that already.

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

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3682
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #25 on: 2019-Aug-17 »
oddely its works nicely here on a Android 5 and a Android 9 phones when im run it directly from Android Studio while connected. This is only that im have tried. Have you tried that to run it directly from Android Studio?

Howover there is a bug in SETACTIVEMOUSE, which is a easy bug to been fix. See the bug section.

Not sure what it happens in glb_showscreen_init_next_frame as its diddent crash and then not sure which command that do it.

you can do try in around line 20184 in lib_glbasic.cpp (search after for(int i=0; i<5; ++i)) do this (not sure its was that throught, but im do thinks its might call too early on some devices):

Code: GLBasic [Select]
#if !defined(ANDROID))
        for(int i=0; i<5; ++i) {
        SHOWSCREEN();
}
#endif
 
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: 3682
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #26 on: 2019-Aug-17 »
Also make sure to use key(1) for back and eventuelly quit the app. And the popup on start is annoying to dismiss.
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: 1533
    • View Profile
Re: Android - has anyone tried yet?
« Reply #27 on: 2019-Aug-17 »
Yes ran from Android Studio and From Playstore and both failed to run on my J3 phone.

I am gonna try it on another older phone now too - but glad to hear it works for you.

On the pop up:
That app doesn't require write permission - so wondering if there is a way to fetch how 'old' the app install is?
That way I can remove the popups after few days.


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

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3682
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #28 on: 2019-Aug-17 »
It's the app popup I'm talking about in the app its self and not a system popup. Its annoying to dismiss its seen. Which emulator did you tried to use? Im need to reproduce it first what it happens.

PS. The font can been too small too read on a small screen? But the emulators can also screw up sometimes.
« Last Edit: 2019-Aug-17 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: 3682
    • View Profile
    • Space Fractal
Re: Android - has anyone tried yet?
« Reply #29 on: 2019-Aug-17 »
I'm checking the follows days what it's happens on the surface on some devices (SHOWSCREEN) . Etc its might try to draw on a destroyed surface, property due orientation or something like that. But is not home before tomorrow.
« Last Edit: 2019-Aug-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.