Java Game Android

0 views
Skip to first unread message

Meri Thilmony

unread,
Aug 3, 2024, 5:15:49 PM8/3/24
to coadadimo

In my current Rust/wasm32 app, I create a full sized canvas, open a WebGL context and draw everything in WebGL. Text is rendered via textures. "Buttons" consists of GL Lines, Quads, and Textures. Hover effects is by manually toggling button colors. Drag/Drag involves manually updating locations of quads.

It's a very barebones interface that is exposed by the NDK, meaning you need to do everything from loading OpenGL ES to writing (or using a preexisting) gui/drawing library. I currently use a locally modified piston clone.

In wasm32, I use set panic hook to capture panics. Then I can print out a file name / line number before it dies. On Android/NDK, on crashes, even if you don't get full stack trace, can you at least get a file name / line number before program dies?

I don't want to sound entitled here -- Is there something I can git clone? This sounds like the type of issue where copy/paste is much easier than spending a weekend trying to figure out all the cargo / compiler / linkier flags.

Be careful, since lines/points aren't stable throughout OpenGLES implementations, and I found that the one I was personally using (On a Pixel 2 for reference) had weird primitive count bugs, so I ended up having to use a quad.

Let me see if I can create essentially the project shown in the thread I mentioned above. I'll also include my local opengl_graphics clone which has been modified to allow more flexible shader interop and to make it compatible with newer OpenGL ES versions in the build script and some other places since the opengles_graphics crate is heavily out of date and my own optimisticpeach_opengles_graphics is already old and I was very inexperienced with OpenGL at the time.

I'm a big fan of Kotlin/IntelliJ (so much so it pulled me away from Emacs). However, for graphics / real time work, I really want my RAII, memory layout, and ability to control when allocations happen.

Thanks the concrete "stack traces". They look good enough. For rust code, all I need is file name + line number; and for vertex/frag shaders, all I need is just filename/line_number of compile error (during runtime of rust code).

It's not that bad; I just timed the app I pushed and it took about 23s, but that can be optimized if you don't make opengl_graphics rebuild the opengl api every time by changing line 10 of build.rs to this:

I chose ../gl.rs because the output directory I'm supposed to output to (In target) is inaccessible by IntelliJ, and putting it in ./src causes it to rebuild each time. Otherwise, there's little to be done; cargo apk rebuilds the glue every time unfortunately, and building an APK is just slow.

Full time android developer and hobbyist rust developer here. For android development I am fully Android Studio and Kotlin. I haven't done much work trying to bridge the two. My current understanding is you can access parts of the android framework though the NDK but it will be limited what you can do and the interfaces aren't terribly fun to work with when you are used to the high level abstractions. I don't have a lot of experience with it beyond just looking into it but I'm always happy to answer android / kotlin /java questions if you have any.

To get started using ARCore with Android, you can run either thehello_ar_kotlin or hello_ar_java sample app included with the ARCoreSDK. These sample apps use OpenGL, aprogramming interface for rendering 2D and 3D vector graphics. The apps displayany detected planes and allow the user to tap on a plane to place a 3D model.

You can run AR apps on a supported device orin the Android Emulator. You must update Google Play Services for ARon the emulator before running the app. SeeRun AR Apps in Android Emulator for moreinformation.

You may be prompted to install or update Google Play Services for ARif it is missing or out of date. Select CONTINUE to install it fromGoogle Play Store, or manually update it as described inUpdate Google Play Services for AR.

The hello_ar_java app lets you place a three-dimensional ARCore pawn ondetected AR plane surfaces. It is implemented with Android GL SurfaceView,which is used to render the camera preview and basic AR objects such as Planesand Anchors. hello_ar_java's sample rendering framework can be found incom/google/ar/core/examples/java/common/samplerender.

The Instant Placement API allows the user to place an AR object on the screen without having to wait for ARCore to detect surface geometry. Object placement is refined in real time as the user moves further around the environment.

Tap on the screen to place an object. Make sure to continue moving the devicearound after seeing the holographic object appear on screen, so that ARCore canget sufficient data about your surroundings to accurately anchor the virtualobject.

In Figure 1, Instant Placement is disabled and surface geometry is undefined.Objects placed on the floor to the right of the pool table (four small blue dots)appear knocked-over, their poses are undefined.

When Depth is enabled, ARCore takes into account the geometry and location of objects in the scene, and computes the location ofobjects placed in the scene relative to other objects in the scene. It allowsplaced objects to be occluded by objects in the scene, and lends realism toyour app.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

I am new to android and working on zoom android SDK. Our many users are affected with one crash which is recorded in firebase in ZmContextSessionUtils.java file which I am not able to understand and fix.

Will it work If I update to latest zoom SDK for android, Can you please help in finding how to update the zoom android SDK in android studio means steps for updating zoom android SDK or any link which help in updating?

I do not believe that updating to the latest version will resolve this, since there were no crash fixes in the last release. Generally speaking though, you can download the latest version of the SDK by signing in through the marketplace. After downloading the latest version, updating the version is just a matter of replacing the mobilertc.aar and commonlib.aar files in your project with the newer versions and performing a gradle sync.

To reiterate, the fix will be included in the next SDK version that we release, which is not one of the versions available today. Please keep an eye on the release notes in my previous reply, as that will be the best place to track when the release is made available.

Due to its open-source nature, working with the Android platform necessitates constantly learning about the Android platform. My android development course on keeps you ahead of this learning curve, with hands-on lectures on Android operating systems and more.
The Android platform is increasingly popular with developers and a dominant force in the global smartphone market. As more businesses develop mobile apps for customer engagement, Android development skills are likely to stay in high demand.

I really like the approach of this course. It first teaches you Java which is highly important for designing apps in Android. Next, the instructor focuses on the Android SDK to teach you how to build beautiful applications for smartphones. As the course title indicates, it is the complete guide.
The Android platform is increasingly popular with developers, and a dominant force in the global smartphone market. As more businesses develop mobile apps for customer engagement, Android development skills are likely to stay in high demand.

Android development is a software creation process that focuses on applications, better known as apps, that are compatible with devices running the Android operating system (OS). Because Android is an open-source project, developers have easy access to the Android software development kit (SDK). Many use this kit in conjunction with Kotlin, Java, and C++ programming languages to make their apps. The Android SDK tools compile your code along with any data and resource files into an APK, or Android package, which is an archive file that uses an .apk suffix. One APK file contains all Android app contents used by devices to install your app. When the app is complete and ready for release, Android developers can upload their apps to the Google Play Store for users to download.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages