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
0
votes
0answers
41 views

Converting Audio Bytes to Array of Floats for Visual Representation

I'm trying to write a Java function that will take a byte array (of PCM audio recorded on Android) and return an array of data of floats that is intended to be used to create a visual representation ...
0
votes
1answer
34 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. ...
0
votes
0answers
13 views

Implementing a persistent Firestore event listener with Kotlin flows

I was writing a social media sample application for Android in Kotlin. One of the requirements in the project is a screen which show the profile of his friend to a user. This profile screen should ...
3
votes
1answer
31 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. ...
1
vote
0answers
24 views

Android Kotlin: Main Concept: Nested RecyclerView Handling Clicks; Secondary Concept: Appropriate use of OOP concepts

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
1answer
63 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 ...
0
votes
0answers
8 views

Firestore Paging implementation for multiple OR query Android

As firestore don't support in operation for more than 10 items. So I decided to write a code to handle multiple (OR) query and merge them afterwards. Suppose I want to show posts of the user you ...
0
votes
1answer
32 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 ...
0
votes
0answers
29 views

Code to plot chart with data

I am working on a program that the user can use to track the parameters of his body (such as weight, waist size). I have a code that builds a chart based on these data. I would like to hear criticism ...
0
votes
0answers
29 views

Chain the same Runnable using Handler in Android

Which approach to creating repeating Runnables is better? ...
1
vote
1answer
55 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 ...
2
votes
0answers
118 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 ...
1
vote
1answer
86 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
vote
1answer
44 views

Android APP user registration page implementation

This is a follow-up question for Android APP User class implementation. I am attempting to build a user registering system and this post shows the user registration page implementation. The ...
1
vote
1answer
46 views

Android APP Password Strength Assessment class implementation

This is a follow-up question for Android APP User class implementation. I am attempting to create a password strength assessment class which is named ...
1
vote
1answer
42 views

Android APP FTP host profile class implementation

This is a follow-up question for Android APP connect to FTP server in Java. I am attempting to create a tiny FTP host manager with FTPHostProfile class and ...
0
votes
1answer
62 views

Android APP User class implementation

This is a follow-up question for Android app class serialization. The implementation of User class has been updated and the functionality of null string checking, ...
0
votes
0answers
70 views

Android app class serialization with static Load / Save method

This is a follow-up question for Android app class serialization. As forsvarir's updated answer mentioned "A static load that returns a new instance of a ...
0
votes
1answer
106 views

Unit tests for User class with JUnit 5

This is a follow-up question for Android app class serialization. Some problems have been mentioned in forsvarir's answer. Then, I am following JUnit 5 User Guide to redesign the test cases for ...
2
votes
1answer
64 views

Android app class serialization

I am attempting to build an Android APP with the custom serializable class User. The public method Save is to save class ...
3
votes
0answers
216 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
1answer
70 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 ...
2
votes
2answers
116 views

Android Tic-Tac-Toe

I have made an Android Tic-Tac-Toe adaptation as a weekend-project. Here's the Kotlin-code. MainActivity: ...
1
vote
0answers
37 views

running a task on UI every x seconds

I often come around a requirement where we have to perform a repetitive task on the user's screen (for eg, updating a counter like flash sale/ live class timer, autoscrolling the banner, etc) . I have ...
1
vote
1answer
72 views

UDP image livestream from Android device to C# desktop application

After searching a lot, on how to do it and not finding any good solutions, I implemented my own UDP livestream from an Android device to a C#/WPF desktop application. It works, however, since I get ...
0
votes
0answers
18 views

How does one handle activity stuff in custom classes in Android?

This is a question, I'm just not quite sure about: Every Android development tutorial you find, will put all of the code simply into the MainActivity class (or some ...
0
votes
0answers
76 views

Using Autofac with static services class

I am using Autofac to maximise the sharing of code between Android and iOS via a shared PCL assembly in a Xamarin (native) environment. The shared service layer consists of four interfaces to classes ...
2
votes
1answer
32 views

how to efficiently draw line numbers in edittext ondraw without causing lag in scrolling

I have an implementation of an edit text to show line numbers and also highlight the current line. I think it needs more optimization because when I scroll through the edit text with about 500 lines ...
2
votes
1answer
39 views

Easter date calculator Android application

Since Easter holidays are close, I have decided to develop my Android skills by writing an Android app that calculate that date for the Western and Easter calendars. The formulas were gotten from the ...
0
votes
0answers
25 views

Best practice to change item based on RoomDB value before inserting it using Kotlin

In my App i use Room database and i have three tables where two of them are connected. The app just save the user input and insert it in the database. The user actually just insert as input a code and ...
2
votes
1answer
48 views

Generating multiplication questions and answers for a quiz style app

See this link for previous post on this subject Generating mathematical questions and answers I have an Android quiz app that I am building to learn kotlin / android app development. Here is an object ...
0
votes
0answers
26 views

How to effectively sperate CRUD operations from the main SQLiteOpenHelper - android studio

I'm conflicting about how I want my database architecture to be built. First of all, I use a singleton pattern for the database in order to insure one instance of it (so its thread-safe), and also for ...
1
vote
1answer
100 views

Generating mathematical questions and answers

I have an Android quiz app that I am building to learn kotlin / android app development. Here is an object I have which acts as one of many question builders. Is there a better way of writing this? <...
1
vote
0answers
39 views

Monitor room repository for livedata changes and update views

I have built a quiz app. It is my first project so the purpose is to learn app development at this stage. There are two key things which I am wondering how to do better (the app is fully functional). ...
0
votes
0answers
45 views

Android: should I get network calls in viewmodel

I am using Retrofit to get data from API. I am doing it in view model like the following: ...
0
votes
0answers
40 views

http url connection with kotlin on android

I'm making an http call from an android app and want to have it reviewed for brevity and efficiency. It handles both success and error streams, by contract 200 OK is enforced (not 201 created other ...
0
votes
0answers
105 views

Is my Android Room SQLite migration code written without flaw, as I wish to have 0 impact on my existing users?

Currently, we plan to perform an intensive SQLite DB migration code in Android. We really want to avoid from having any bad impact (data corruption) on existing users. Can anyone help me to take a ...
3
votes
0answers
804 views

View Binding with Base Classes

UPDATE: After getting "a kind of" affirmation from various platforms( my discussions on twitter, reddit, other stack overflow posts,etc) I have written an article on this style of view ...
3
votes
1answer
1k views

Alternative class to imitate AsyncTask class (deprecated) with Thread and Handler classes

As the title says, I have created an alternative class to imitate AsyncTask class (deprecated) with Thread and Handler classes but i feel uncomfortable to use it.(the app works fine with my class) Can ...
4
votes
0answers
33 views

Fragment of code with Android MVP that checks login credentials via REST API

I'm learning MVP for Android and am wondering if that piece of code that I wrote is correct in terms of this pattern or maybe is completely messed up. I'm wondering if there can be return type other ...
8
votes
1answer
194 views

Scanning and indexing files video

I use the following method to scan and index video files and pass data to an array. I get video file duration, file name, files size. Is there any better method, or do I need to improve? ...
3
votes
0answers
127 views

A better understanding for separation of concerns. Android; Kotlin

I am an Android developer with only 5 months of experience. I am still learning and trying to do my best. Right now I am interested in concept of ...
2
votes
1answer
28 views

How to speed up drawing process of output from .tflite model

I have piece of code where I draw output from model pixel by pixel: ...
2
votes
1answer
79 views

Login system using callbacks in android

I wrote a login system for an app I am developing, but I'm not really happy with the code I have at the moment. I feel like there is a better way at tackling a problem like this. In particular I'm not ...
4
votes
1answer
104 views

Proper Error handling when we expect results from secondary functions

I'm building an android application and I have some second thoughts on some error handling case. I have a method that gets data from the internet by calling this method: ...
2
votes
1answer
68 views

Android text to speech app

Since I am trying to learn many programming languages, I created this simple Android app. What it does basically is taking a sentence phrase from an EditText ...
2
votes
0answers
129 views

Custom MediaController with full screen video image option

I have overridden setAnchorView() of MediaController class to display full screen option icon using below code.The code seems to be working fine in devices I tested but I have few doubts for which I ...
2
votes
0answers
734 views

Generic RecyclerView Adapter in Kotlin

I've just finished implementing a Generic RecyclerView adapter in my Android app, written in Kotlin. BaseAdapter.kt: ...
-3
votes
1answer
44 views

I am trying to save a string to a MYSQL table from a radiobutton in java/Android studio [closed]

I am trying to save a radiobutton string if it clicked. I am making a survey where I need to save a "yes" or "no" into a MYSQL table using volley. I am having a little trouble ...
3
votes
1answer
149 views

Displaying Video file from storage with MediaStore in android Java

I Used MediaStore to scan and display media files from my storage using below code ...

1
2 3 4 5
17