On old Mandriva Linux and NetBeans IDE 8.0 I could write simple apps to my old Android 2.x/4.x, just the Android tools and SDK needed, - and maybe that works nowadays too, - but it was easier to setup the necessary environment to Mageia Linux 9 by installing Android Studio.
Download the Android Studio from:
https://developer.android.com/studio
I've installed as root: (maybe needs this privileg for updating too)
I had got a tgz file and extracted to /usr/local folder with the following command:
tar -xf android-studio-2022.3.1.19-linux.tar.gz -C /usr/local
Run and configure at first time as user:
/usr/local/android-studio/bin/studio.sh &
So I've started to create my Android app for this website.
There are so many cross-platform development possibilities, I've just tried libGDX.
As their websites sais (https://libgdx.com/wiki/start/project-generation), there is a multiplatform empty-project generator and e.g. Android Studio can open this generated project.
I found their sample game's code there and added to this empty project to try it. (have to download free pictures and sound files too) After some changes in configuration I can run it on my Mageia Linux 9 and on Android Emulator too at the same time. I also connected my old Sony mobile and it works well on it too. And it works on a local webserver too.
A short example: developing for multiple platforms with libGDX if you need different code. (this code opens my website in the default browser, for Android & Linux)
core/main/java/eu.tothpal.www/MyWebsite.java:
package eu.tothpal.www;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.utils.ScreenUtils;
public class MyWebsite extends ApplicationAdapter {
private HelperInterface myHelper = null;
public MyWebsite( HelperInterface H) {
myHelper = H;
}
@Override
public void create () {
myHelper.OpenURLinDefaultBowser("http://www.tothpal.eu");
}
@Override
public void render () {
ScreenUtils.clear(0.05f, 0.05f, 0.4f, 1);
}
@Override
public void dispose () {
}
}
core/main/java/eu.tothpal.www/HelperInterface.java:
package eu.tothpal.www;
public interface HelperInterface {
public void OpenURLinDefaultBowser( String url );
}
android/main/java/eu.tothpal.www/AndroidHelper.java:
package eu.tothpal.www;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
public class AndroidHelper implements HelperInterface {
private Context context = null;
public AndroidHelper(Context c ) {
context = c;
};
public void OpenURLinDefaultBowser(String url) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
context.startActivity(browserIntent);
}
}
desktop/main/java/eu.tothpal.www/DesktopHelper.java:
package eu.tothpal.www;
import java.io.IOException;
public class DesktopHelper implements HelperInterface {
public void OpenURLinDefaultBowser( String url ) {
Runtime r = Runtime.getRuntime();
try {
r.exec("xdg-open "+url);
}
catch (IOException e) {};
}
}
So you just have to initialize the correct Helper class in the AndroidLauncher and DesktopLauncher classes and later the Helper class can solve your problem...
3D War game for Linux
You can play with historical vehicles (planes, tanks, ...) worldwide.
Fractal generation, Mandelbrot set, Julia set
WebGL TEST!
Simple test with a dualcone and more 3d objects:
23-07-2016
River fishing is an interesting way to catch fishes in a flowing water...
Me and my friends spent good days at Lake Warali in Baja.
17-05-2015
I tried different Lake, they say there are big fishes. Every time I had fished here I caught 4+ carps too.
may-2012
23-10-2011
03-10-2010
WARNING!!!
You can buy USB FLASH DRIVES and MP3/MP4/MP5 PLAYERS with FAKE memory sizes on the Internet!
Visitcount (since 2021-05-30): 0354