Android - has anyone tried yet?

Previous topic - Next topic

MrPlow

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

spacefractal

#16
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
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

#17
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.]

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

spacefractal

#18
Need the logcat when connected to pc or the full project (except the big build folder).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

erico

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.

spacefractal

#20
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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

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

MrPlow

#22
I cleaned the project - still 400 mb maybe i did it wrong?

Update: Sorted - got it to 78mb will send a dropbox link.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

Sent that to you! Good luck! :)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

Hi SF,

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

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

spacefractal

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
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

Also make sure to use key(1) for back and eventuelly quit the app. And the popup on start is annoying to dismiss.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

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

spacefractal

#28
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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

#29
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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/