Android Development

539 readers
2 users here now

Welcome to the programming.dev Android development community!

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License

founded 1 year ago
MODERATORS
1
2
 
 

Title Thanks

3
4
 
 

I have no experience with android apps and just started working on one that needs to work with relational data. The relational data has multiple many-to-many relationships and the inbuilt ORM (Room) is leads to class explosion.

While looking at ORM libraries for android, there seem to be many that are out of date:

From 5 of the Best Android ORMs (2014) and AlexeyZatsepin/Android-ORM-benchmark (2017)

I'm leaning towards Requery because I like its API the most (hides SQL the most), but haven't looked at ObjectBox yet.

5
13
Android 15 is released to AOSP (android-developers.googleblog.com)
submitted 1 month ago by neme@lemm.ee to c/android_dev@programming.dev
6
 
 

I'm new to using reactive and functional programming in kotlin with libraries. I'm maintaining a project at my company that uses only .orNull() from the arrow.core.Option class.

My question is: why is the project returning the first type instead of the second one?

Single<Option<UserEntity>>
Single<UserEntity?>

Can't the DAO object return a null type if it doesn't find the object on a query such as SELECT * FROM users WHERE id = 1 ?

7
17
Adding 16 KB Page Size to Android (android-developers.googleblog.com)
submitted 2 months ago by neme@lemm.ee to c/android_dev@programming.dev
8
9
 
 

cross-posted from: https://lemmy.pe1uca.dev/post/1512941

I'm trying to configure some NFC tags to automatically open an app, which is easy, just have to type the package name.
But I'm wondering how I can launch the app in a specific activity.

Specifically when I search for FitoTrack in my phone I get the option to launch the app directly into the workout I want to track, so I don't have to launch the app, click the FAB, click "Record workout" and then select the workout.
So I want to have a tag which will automatically launch this app into a specific workout.

How can I know what's the data I need to put into the tag to do this?

Probably looking at the code will give me the answer, but this won't apply to closed source apps, so is there a way to get all the ways all my installed apps can be launched?

10
11
12
13
 
 

There is probably something like this already, but probably not free and open source, as quick search through F-Droid did not show it.

A fitness app where you place your phone under your face and it counts how many push ups you did.
What would be the best way to detect a push-up?
My idea is to have user touch the touchscreen with their nose. That would initiate the first part.
Second part would be more complex: use the front-facing camera to figure out if user's face is far enough to be considered a completed push-up. User would have to calibrate the app at the start, or maybe even at the start of each session, indicating how far away is the max height that they achieve. Probably no need for full facial recognition for this, some colour-matching algorithm should be enough. And use phone's gyro to check whether phone is actually in a horisontal position.

Maybe this idea has enough potential to actually get a project going.

14
 
 

I'm new (0 experience) to Android Dev, but want to contribute to one simple open-source app that I like on GitHub.

I had a spare hour today and tried to setup GitHub Codespaces environment, but so far failed to install AndroidSDK and satisfy Gradle.

So the question, what setups do you have for Android dev? What's industry standard and what YOU prefer?

And is cloud development a thing in Android world?

15
 
 

Hey, I have a function that draws a composable,

@Composable
        fun home() : @Composable RowScope.() -> Unit {
            return {
                BottomNavigationItem(
                    icon = {
                        Icon(Icons.Filled.Home, "Home")
                    },
                    onClick = {},
                    selected = false,
                    label = {
                        Text("Home")
                    }
                )
            }
        }

That doesn't draw it to the GUI I am calling it with

@Composable
fun App() {
    MaterialTheme {
        BottomAppBar {
            StaticAssets.BarButtons.home()
        }
    }
}

Does anyone know why it doesn't work?