Author Topic: Android Studio new beta 2 (ChromeBook)  (Read 237 times)

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Enable Beta in the steam:
- Right Click on Glbasic in library.
- Click on Properties.
- Click on betas.
- Select "beta - beta builds".

Now steam download this version automatic. its a small update really. Property a 1-2mb update.

Im choosen this way, as im will newer default a update that is from me, but only Gernot can do that. This also mean you might want to roll back and Gernot has a change to test it.....

First a bit of warning:
This is for the steam version of glbasic. Im cannot garentee its works on Glbasic 15 or below, so im only checked with code from Glbasic 16. Im do no longer uses external downloads.

Here is what that is fixed:
- The theme has been changed a bit, so its now launch in a pure black screen.
- Various new arguments added to androidmanifest.xml, strings.xml and some changes to other xml files (themes).
- Surface might not allways have fullscreen, which was previous happens! That could cause the game not been placed in center or can got clipped out. This was very noticable on my phone when game is in landscape mode!
- You can bring back the navigationbar, which seens its gave a much better user experience, as least for the games im tested yet. The back side is you need to checks resolution by GETDEKSTIOSIZE() runtime as resolution will change when user hide the navigation or they bring it back. Howover if you do NOT use this feature, you do can do skip it! The feature can been set in strings.xml.
- Admob has been more integrated and using it, if detected. Admob is other hand OPTIONAL.
- JOY() commands works much better in this version! Multiply gamepads is even supported!
- You can now use Tilt and Orientation using JOY() commands as well a Android TV remote.
- Assest loading should works much better since SETCURRENTDIR() now finally works correctly between c++ and java. That means c++ does no longer needs to try to guess the path anymore. This is include both relative as well full path using GETCURRENTDIR$()
- Keyboard, Touchpad (one finger) and Mouse (include right button) is now supported for ChromeBook!
- Keyboard can been mapped for pc style scankey layout for most keys. disabled by default. Set it in Strings.xml
- ChromeBook can been detected by PLATFORMINFO$("DEVICE") as well AndroidTV. "Keyboard" tag here is depreacted as im allways hated it and diddent make sense at all!
- Fullscreen is required on ChromeBook! So keep android:resizeableActivity="false" in manifest!


Property other small fixes as well! This version as still not rolled into the steam release and hopefully Gernot do that soon! Im thinks im wont wait later. So threat this as a BETA. So there can been issues here and there, but should works much better now!

Android 6 required:
Android 6 and better is required. Its look like its a grandle issue that cause its dont support png and jpg files in Android 5. Im cant do anything with it at all. So Dont ask me about it. But if you do NOT use png and jpg files at all, then you should been possible to support Android 5. Its depend of game of course.

Can im update Android Studio
Also you can SAFELY update your Android Studio, that include buildtools. But you should stays on the Grandle version we using, currectly version 3.4.1. So dont update the project its self when Android Studio is asking about it to your glbasic project!
« Last Edit: Yesterday at 04:11 PM by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Re: Android Studio new beta
« Reply #1 on: 2020-Mar-09 »
Im have choosen to clean up the Admob and gamecontroller thread as its was too much confuction and too much offtypic really. So this is so not confusion the user. So dont take this personally at all! Its was to avoid eventuelly confusion.

Gernot: im hope its ok, so we can got this tested property before a new steam update. Android Studio downloads is much smaller than its was with the Android Standalone SDL.

Im have choosen not to update the steam, until you have possible to take a look. There is a bit more c++ fixes required you hav forgot to the glbasic source code tree (im only used the merged one). they are maked by SF:, so easy to find and checkout.
« Last Edit: 2020-Mar-09 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Re: Android Studio new beta
« Reply #2 on: 2020-Mar-17 »
there was a issue wth no ads version and reupload. im cant do fix code fix in the near future due injury.

the no ads of Interstitial.java should been in android_studio\app\src\main\java\org\libsdl\app while ads version of Interstitial.java should been in android_studio\tools\extras

the glbasic tool should detect you using ads or not and then copy one of the files.

if still issues with no ads, the java file should look like this:

Code: (glbasic) [Select]
package org.libsdl.app;
import android.app.Activity;
import android.content.Context;

class Interstitial {
    public String AdsStatus = "";
    public boolean InitHasDone = false;
    public static Activity currentActivity;

    public void show(int status) {
    }

    public void init() {    // Admob mInterstitial Ads Start
    }
}
« Last Edit: 2020-Mar-17 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1660
    • View Profile
Re: Android Studio new beta
« Reply #3 on: 2020-Mar-17 »
Hi SF

Why not just let the user - use the file they need - copy it in manually...might be less of a hassle for you to do the changes to detect if the app is or isnt using ads?

For my turtle app I just commented out the interstitial java and commented out each interstitialAd.show() from SDLGlbasic file.

Also, I thin the each code file should have a version number in comments at the top - just so people know which version they are using at any one time - the amount of changes and updates might confuse some users and it make it easier for managing multiple apps etc.

:)

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

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Re: Android Studio new beta
« Reply #4 on: 2020-Mar-17 »
this is what Gernot want and im follow it. is make sense as you might not want a app that dont have ads to show this app contains ads.....

im just diddent use the right file and both used the ads version... opps.

yes im was forced to init the ads a bit later as its conflicted when detect the fullscreen resoulution....
« Last Edit: 2020-Mar-17 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Re: Android Studio new beta
« Reply #5 on: 2020-Mar-20 »
when im went back (1 month or 2). im take a look to get it working on Chromebook. Im have order a smaller one with trackball and keyboard.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1660
    • View Profile
Re: Android Studio new beta
« Reply #6 on: 2020-Mar-20 »
As long as chromebook does not affect the mobile functionality :)

What's happening with HTML5 is it still being worked on too ?

Also on the JOY() commands you metioned - is that as-well-as or instead of KEY() ?

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

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Re: Android Studio new beta
« Reply #7 on: 2020-Mar-20 »
both KEY() and JOY() can been used. KEY() can howover only been by a single player game. See the edited post in your sticky thread.

Chromebook can uses android apps, but require a few tweeks to support them property. Mostly about activity and resize thing. Its also depend what you set in androidmanifest.xml, which features you uses. Chromebook example might not have a touchscreen. So i might add a platforminfo for that to detect them.

no idea about html5.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Re: Android Studio new beta
« Reply #8 on: 2020-Mar-23 »
im can clearly see the chromebook im brought was cheap... but does is job nicely as excpeted.

Greedy Mouse does run nice on it (forced full screen), but as this ChromeBook dont have a Touchscreen, the controls dont works very well. property because etc emulate a touchscreen, which is not good with trackpad.

so im will on focus to better keyboard and trackpad support as well possible to detect them property. havent checked with a mouse. but im is still inquired, so not that fast.

also landscape is required to been supported on this ChromeBook.
« Last Edit: 2020-Mar-23 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1660
    • View Profile
Re: Android Studio new beta
« Reply #9 on: 2020-Mar-24 »
hi SF,

Will the GLB update with Android Admob files leave current builds as they are?

I.e. it wont force copy over files to existing working apps with older code?!

It have been that way in the past, but I just want to get confirmation :)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Re: Android Studio new beta
« Reply #10 on: 2020-Mar-24 »
im was forced to move the ads init a bit in this version as the app might got confusion by resoulution its should uses and could got cutoff. im no remember om forced it or not. but only wih one of the two java files.

also for steam, just dont sync when you replace the steam files. then you should been good. Is Gernot that shuld update it.

but when steam update happens, its uses this version of course. im make sure to recheck.

damn. a chromeos keyboard mapping is totally different to Windows. require remapping to the pc style board. here back, forward and refresh buttons needs remap to F keys....
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10732
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Android Studio new beta
« Reply #11 on: 2020-Mar-26 »
Is the link in 1st post the most current one? I'll try to merge and release it then.

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Re: Android Studio new beta
« Reply #12 on: 2020-Mar-26 »
im send you newest one for Chromebook support later today. works here fine. few lines for c++ needed for mouse support as right button can been used!
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3828
    • View Profile
    • Space Fractal
Re: Android Studio new beta 2 (ChromeBook)
« Reply #13 on: 2020-Mar-30 »
you can now updata via steam! Just enable the beta brance in the steam app option. See first post.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1660
    • View Profile
Re: Android Studio new beta 2 (ChromeBook)
« Reply #14 on: 2020-Mar-30 »
Gernot,
Will the update overwrite my custom code for existing apps or will it just use the "newer" code for newer projects...?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs