Skip to main content

Questions tagged [android]

Android is Google's software stack for mobile devices. For non-developer questions, see http://android.stackexchange.com

Filter by
Sorted by
Tagged with
4 votes
1 answer
41 views

Sharing UI logic between fragments and activity

I have tried to make my code more modular and reusable by utilizing fragments in activity. The purpose is to have a static activity with a FragmentContainerView that hosts various fragments. Each ...
1 vote
1 answer
112 views

Android TCP server that maps data to an object and sends it to a service

This is a code for an android thread. This is a tcp server and gets data from socket, maps it to an object and sends that object back to the main service. If there is anything I'm doing wrong or if ...
2 votes
0 answers
30 views

Jetpack Compose registration screen

I’ve created a Jetpack Compose function called RegisterName for a registration screen where users input a nickname and agree to an EULA before proceeding. The function works as intended, but I’m ...
-1 votes
0 answers
47 views

Trying to pass a functionality to a composable

I have a biometric prompt implementation as below: ...
5 votes
2 answers
2k views

Detecting if image taken by camera is too dark

I am trying to build functionality to check if an image taken by the camera is too dark. So I added the following 2 functions to a utility class: ...
3 votes
1 answer
114 views

Auth0 Credentials Manager in Android app

I am building an Android app that communicates with a REST API using Retrofit2 and uses Auth0 for authentication. The Android app needs to store access token from Auth0 and use it to authorize its ...
3 votes
0 answers
299 views

Android BMI calculator using LiveData

I have made a Body mass index-calculator using ViewModel and LiveData. Source-code of the MainActivity: ...
3 votes
1 answer
230 views

Jetpack Compose: Length-Units Converter

I have made a length-units converter with Jetpack Compose. Here's the source-code: ...
2 votes
1 answer
10k views

Android: Make a Quiz-App

Task description Make an quiz-app based upon a topic you feel familiar with! Following requirements Has at least four questions. Following controls are all used at least one time: Button, TextView,...
3 votes
1 answer
150 views

Logic to check if app was launched for the first time using DataStore

I have written a dummy code to check if an app was launched for the time using DataStore. It is working however i want to know if this can be optimised and i also observed a small glitch initially ...
2 votes
1 answer
79 views

Handling View State & Side Effects with Lifecycle Awareness in Jetpack Compose MVI Composable

I'm working on a stateful Jetpack Compose composable that follows the MVI architecture. I'm using collectAsStateWithLifecycle() to observe the view state from a view model, but I'm unsure about the ...
3 votes
0 answers
58 views

Trying to properly modelize app settings in a MAUI app following MVVM architecture

Context: I am working on a relatively simple MAUI app, which includes a Setting page allowing to customize the UX/UI of the app. I am trying to make the best use of the functionalities of MAUI, while ...
5 votes
1 answer
99 views

Compose Grid With Lists

I have created a Grid out of using the new concept of List in Kotlin. I'm open to any feed back to how this code could be improved. It functions as expected and I'm happy with the results. ...
3 votes
0 answers
1k views

Android APP FTP downloading file implementation in Java

This is a follow-up question for Android APP connect to FTP server in Java and Android APP FTP uploading file implementation in Java. I am attempting to perform the download operation to specified FTP ...
0 votes
0 answers
91 views

React Native (expo) mobile application publishing to stores in Azure DevOps pipeline using different backends for different app versions

Mobile development is quite new for me, and I would like to ask about a solution review. I'm not sure the way I publish the application is correct, I think good companies may do it differently. I have ...
0 votes
1 answer
94 views

Implementation of Conway's Game Of Life on Android

I ended up using 2x 2D arrays with a one element border around everything to simplify the kernel logic. ...
2 votes
2 answers
122 views

Simple service that wraps access to json file

I'm wondering if this is the best way to write the Java code I have written. It works, but looks overly verbose, is it possible to rewrite any of the code to make it more concise? Please ignore the ...
2 votes
1 answer
393 views

Android: Navigation with Hilt + Jetpack Compose

The project is simple: Login screen and a forgot password screen. You can navigate from Login to ForgotPassword. I feel like I overcomplicated things, but I don't know if (and how) it can be ...
2 votes
0 answers
218 views

Flutter Cubit: 2 Screens and Listview

I try to program a small app to track my cost spendings. As state management I use Cubit. As I am a flutter beginner, I wanted to verify if I implemented it correctly. The UI consists of 2 screens: 1 ...
4 votes
0 answers
911 views

Wrap location API in coroutines

In my app I need to query location and scan wifi periodically. To conserve power I need to change the rate dynamically, depending on the distance to the target. Also I want to wait for both ...
4 votes
1 answer
2k views

Correct flow between Kotlin, Realm and ViewModels using Coroutines

I'm stepping back into Android after being away from it for about a year. Trying to get an out of date app of mine back on its feet, and continuing work on it. The app was written using Java, MVP, ...
4 votes
1 answer
219 views

Storing icons in Room Database

I want to store some 512x512 icons for my Android app in a Room database. This is so each item in a list can have all the text data along with the image data stored in a single record. The answers to ...
3 votes
0 answers
133 views

MVVM signing in using firebase

I'm new to MVVM architecture. I want to have authentication with email + password, google and Facebook. I'm not sure if there should be separate view models for each authentication way: ...
0 votes
0 answers
39 views

Good way to coding on React-Native?

I'm new on this field of coding, and I start to create by myself a project for iOS and Android. I'm a bit lost of how I supposed to organize my code, I saw different persons on YouTube doing their ...
0 votes
0 answers
273 views

Jetpack Compose: Items-list with Item-Details-view

The app is based upon an exercise from a Udemy-course. The purpose is to become familiar with LazyColumns. I've enhanced the exercise with a Details-view and a navigation between LazyColumn and ...
2 votes
1 answer
264 views

MutableLiveList class for android

I have wrote a MutableLiveList class for android, similar to existing MutableLiveData, but this class instead handles a list and ...
0 votes
3 answers
219 views

Android - A way to show/hide loader without writting false/true in every viewmodelScope.launch

I have been writting a lot of code that looks like this ...
4 votes
1 answer
916 views

Android + Kotlin advanced color picker (HSV and RGB)

For almost the past year, I have been working on a pixel art editor for Android. My pixel art editor was relying on an external library for its color picker. For 0.2.0, I wanted to change this by ...
2 votes
1 answer
52 views

Observe LiveData to indicate whether or not to display TextViews in MVVM

In the context of MVVM, is this an efficient way to communicate to the view that I should display some TextViews? Any advice on how I can improve it? ViewModel code: ...
2 votes
1 answer
83 views

Processing charge current error messages with HashMap<>

I have certain error states that I am displaying in my Android TextView but only one message is displayed at a time and if all values are set to 0, no message is displayed. So, I check all the values ...
3 votes
0 answers
1k views

Jetpack compose login screen + ViewModel

Im working on the login screen for my application. It has fields for users email and password. Also users can click on forgot password button to send an email with new passsword. It can validate these ...
2 votes
0 answers
180 views

Android architecture and dependency injection of domain layer usecases

I am implementing some of the architectural designs from Google I/O's app to my own app, but I have come across something in their app that has created some confusion for me. They have a domain layer ...
2 votes
3 answers
7k views

Small Android AsyncTask project

I created a small Android project with an AsyncTask. It simulates a time consuming task. Please review my code and tell me what you would do on a different way and why. Comments not specific to ...
4 votes
5 answers
970 views

Android app for sending username and password requests

I'm developing an Android app that performs several requests to a server using the AndroidAsynchronousHttpClient. One of these requests (as an example) is responsible to send the username and password....
4 votes
0 answers
2k views

Android APP connect to FTP server in Java

I am attempting to build an Android APP with the ability to connect specified FTP server in Java. The connection operation has been performed in FTPconnection class ...
1 vote
1 answer
72 views

custom button class for android game engine

I'm a self-taught programmer and I haven't really followed industry-standard coding classes. I'm currently coding my own game engine for android, though and I was wondering if my coding style could ...
4 votes
1 answer
212 views

Calculator app made in Java (ver2)

A few days ago, I uploaded my first version of my calculator app I made in android studio. I got some great some feedback on it and tried to improve my app as much as I could. changes/new featres: ...
6 votes
2 answers
1k views

Simple calculator app made in Android Studio (Java)

I'm a college student in my first year of my bachelor in IT. I recently decided to try some app development with Android Studio and Java. For my first project, I made a basic calculator app. Here you ...
1 vote
1 answer
152 views

Is this session manager secure?

I'm looking for best practices for writing secure session managers. I'm making a table for the authorization token (UUID OR GUIDv4) with autoincrement, user_id, token, status (enum) then update status ...
3 votes
1 answer
1k views

Getting a single result from multiple LiveData objects

I have an Android viewmodel for a Fragment that requires the user to perform multiple tasks. In addition to a LiveData object to track the status of each task, I ...
5 votes
1 answer
3k views

Calculator App with Kotlin and Android Studio

Hello I am an absolute beginner with Kotlin and Android Studio. I want to hear what I could do better for the next time or any flaws my code has. The code implements a four-function calculator (+ - ✕ ÷...
4 votes
1 answer
150 views

Finding the type of number entered by the user

I am making a fractions calculator that can calculate fractions, whole numbers and mixed fractions. So there is a String fraction, which is the input. Also, the user will enter the fraction in a ...
5 votes
0 answers
2k views

Android nested RecyclerView handling clicks, using OOP

Brief Background: I just started learning Android Development recently. I have some experience with programming and understand the basics of OOP but am not confident that I am using principles of OOP ...
1 vote
1 answer
252 views

Safely and Quickly Trim a Byte Array of Audio in Java

I'm trying to take a raw byte array of audio and trim it. The user selects a start and end value using a range slider. ...
3 votes
1 answer
164 views

Loading 300 images on a custom spinner with images

I have a spinner that it has a custom layout with 5 imageviews and 1 textview. I would like to load it up with 80 rows, so it will display around 300 images (all images are within the app). Is this a ...
4 votes
1 answer
462 views

Fragment to control and show camera images

I have never tried this before. Just started with Kotlin and Android CameraX. Here is a fragment I would like some feedback on so I can writer safer and better Kotlin code. ...
2 votes
1 answer
466 views

My Android app is really slow when getting simple data from PHP

I have a PHP API which echoes some data depending on the parameters in the URL: URL = "MyWebsite.com/MyAPI.php/username/password" When I try to access this API with Postman, I get the ...
1 vote
1 answer
381 views

Android user input validation

I have made a tiny Android-project to familiarize myself with user input validation. The app just has an EditText-control for user input, a button "Compute Result" and a TextView, which ...
2 votes
1 answer
79 views

Code for working with a tasks in To-Do Android application

Overview I am working on an android To-Do app. I have a piece of code that I use to work with tasks.I am new to android development and want to grow, so I would really like someone to rate my code and ...
1 vote
1 answer
885 views

Android APP FTP uploading file implementation in Java

This is a follow-up question for Android APP FTP host profile class implementation and Android APP connect to FTP server in Java. I am attempting to perform the upload operation to specified FTP ...

1
2 3 4 5
16