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

Google Play billing + Firebase functions: Creating a one-time product, server-side

My Android app must request my Cloud Functions server to create in-app products at runtime ; then, the server responds with the created one-time product. I've written the server Cloud Function that ...
1
vote
1answer
36 views

Data class where i need to set values for different fields at different times

I am creating a request for an api using below class- ...
1
vote
1answer
48 views

TCP server in Android to continuously listen to an RFID reader

I have created a TCP server thread which I want to keep running and listening to the IOT device (an RFID reader). I have only one client. Please review my code and provide your feedback. Are there ...
1
vote
1answer
28 views

Android RecyclerView Popop Activity - 5 second popup time

So I've been working on a RecyclerView recently that's in a popup, and it takes a few seconds to popup with around 100 items. I want to make this faster, so any improvements on my code is appreciated :...
0
votes
1answer
38 views

Grid of radio buttons in Android

I want to display multiple radio buttons in a layout with multiline style as an item inside a RecyclerView. Look at the code I provided below and suggest how I can ...
2
votes
0answers
24 views

BASH script to obfuscate android/meterpreter payloads

I have written a little script that does a pretty good job of obfuscating android/meterpreter payloads. It will generate payloads or used supplied msf payloads while also injecting a custom icon. The ...
0
votes
0answers
26 views

Adapter for Spinner

I need to my spinner supported endless scrolling. As rule the user will have only 1 - 5 items but in very rare cases some users can have 100+ items that will be loaded from server by pages (15 per ...
0
votes
1answer
70 views

Optimize this code of adapter's overriden method getItemCount() [closed]

How can I optimize this code of adapter's overriden method getItemCount() into simpler form? ...
1
vote
0answers
25 views

Monitoring Services And Characteristics on React-Native [closed]

I have two questions for you about my code :) I'm creating an android to connect to ble device. I'm using ble-plx library. ...
2
votes
1answer
44 views

RecyclerView with different ViewHolder using generic

I have different ViewHolder for different Feed implementations. But I can't use the best practice of having each ...
1
vote
1answer
35 views

Android LiveData Shared between activities by Application Session

I'm developing an app that use socket to receive messages from a chat. I'm using an MVP approach and I store the data in a Singleton class named DataBridge like ...
4
votes
1answer
50 views

Google Maps API - reading locations from file and displaying markers on map

I'm working with Google Maps and want to read in location objects into the map. I'm loading them in from a .csv file and create Shelter objects for each location that I save in an ArrayList. To ...
4
votes
1answer
80 views

Android clock in/out app

I am writing a clock in / out and payroll app for Android. I am no professional, but I was hoping I could get some feedback on whether my code is spaghetti or not. This is just one of many classes &...
2
votes
0answers
32 views

Android+Firebase testing using Mockito

I have an interactor/usecase class in my application. My application follows MVVM architecture with interactor/usecases responsible for logic (e.g. get data from api-service, store in local-database ...
2
votes
0answers
36 views

Custom Security for API access from server to mobile application

i am not the best at security but need a custom way to securely store personal identifiable information like name, address etc - Can i please have some feedback on this custom code, from my ...
5
votes
0answers
146 views

Converting between cooking measurements

I've made an Android app that converts between cooking measurements, taking into account the type of product you use (that way it can convert between mass and volume by using the density). What are ...
4
votes
2answers
59 views

Android NDK Low performance

I am trying to write a NDK program for quicksorting an array. However, in my benchmarks C is doing consistently worse than Java, as indicated by my results: Java 1190625 C 1809218 Java 895104 C ...
1
vote
0answers
72 views

Implementing std::filesystem::remove_all() for Android

I needed to use some c++ code on both standard Linux and the Android variant, and the code will use filesystem library but it isn't yet in the ndk. So I'm making a one to use on Android It will be ...
2
votes
0answers
57 views

Firebase login/registration process for a dating app

I am developing another bigger project, I want to try a simple DatingApp and currently I try to develop a Login and Registration Form. There is no special register / login button, the code will later ...
-1
votes
1answer
63 views

How to divide a large method into 2 smaller methods [closed]

I have created a method that is responsible for the creation and the saving of memes. This is a huge mistake because now I need to use 1 of those functionalities (creating) for a different purpose. I ...
3
votes
0answers
34 views

Load all data from cursor

I have a Db table: 'aid' INTEGER, 'tid' INTEGER, Which represents connection between activity and task, so multiple tasks could be connected to one activity ...
2
votes
1answer
78 views

Android Java Unit Testing model class

I'm trying to get familiar with unit testing. I never implement TDD previously, but I believe it's the best way to write software. So, here I'm trying to test my ...
2
votes
0answers
27 views

Sharing File (Content) without saving it before

I have a listview of PrivateFile objects which contain the fileId (int), fileName (String) ...
1
vote
0answers
68 views

Java Android Sudoku solver

I made a simple and non recursive Android Java Sudoku solver implementing Algorithm X with links inspired from dancing links. The code is on Github (start with the Solver class and the ...
2
votes
0answers
47 views

Listing YouTube videos using API with RxJava

I am new to RxJava and have the following code which I use to search YouTube videos via the API and ultimately display them in a list. ...
1
vote
0answers
34 views

Socket sending/receiving data

I am a beginner in Android and this is my first big project in it. I am trying to communicate with an STM Discovery board using an ESP01 module. Below is the client connection class ...
1
vote
1answer
53 views

Optimize Multiple Insert SQLite Coming From MySQL

I'm currently developing an app that requires sending and receiving of data from android studio going to MySQL and then data coming from MySQL will be saved from the SQLite. I need advice on how to ...
3
votes
1answer
74 views

Sending and receiving of JSON data to and from Android Studio

I'm currently developing an app that requires sending and receiving of data from android studio going to MySQL and then data coming from MySQL will be saved from the SQLite. I need advice on how to ...
0
votes
0answers
76 views

Destroy Singleton patter in kotlin

I am practicing Singleton pattern in kotlin. It is a quiz app which has question tile with four options and one correctIndex. McqOldActivity.classs ...
1
vote
0answers
16 views

Appium automated tests for manipulating checklists

I am new to automation. I have automated few test cases for a mobile app using appium and wanted to know the areas where my code can be improved further. ...
0
votes
1answer
46 views

Simple Android Volley login request

I've made a simple login API request which gets a token as a response. I had to use Toast a few times. Is is possible to make it with only two ...
0
votes
0answers
51 views

Android - Notification service to handle background notification

PREMISE: I have zero knowledge of Java and Android development. I put this together in a couple of weeks. The code works. But I look forward to some feedback and to know how I can improve it. ...
2
votes
1answer
38 views

Method that Saves user text messaging draft [closed]

I am working on saving the text messaging draft of a user. The flow currently works but I am looking to make this block of code easier to read and smaller. Could anyone help me achieve this? ...
0
votes
1answer
41 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 ...
1
vote
0answers
93 views

Animated Button on Android using AfterEffects and Lottie

I have a question about my implementation of a "special" Next-Button. First I want to show you my AfterEffects file: So This Animation has 3 parts Green: Entry correct Red: Entry incorrect Blue: ...
1
vote
0answers
158 views

Retrieving date and time from Datepicker and Timepicker and then converting it to milliseconds

I currently have an Android Activity that allows the users to select the startDate, endDate, ...
2
votes
2answers
234 views

Call multiple asynchronous HTTP requests and wait for the result

I have a Repository class which looks like this: ...
1
vote
1answer
86 views

Adapter class to display songs in an Android ListView

I am learning Android with Udacity nanodegree (having no support) and this is my assignment of music app. It is just an interface and no music I have to add. So far so the app is running without any ...
3
votes
1answer
84 views

Card based game in Android

I am developing a card game in Android. This is my first time I am working in Android,. The game contains following features: It will be a 6 player game. There are two decks on the table, one with ...
1
vote
0answers
53 views

Getting Video file path from uri

I am using below code to get a video file path from uri. Need review for the following: 1.Code optimization 2.Crash(Code is working fine in the devices I tested but i need to make sure that it ...
1
vote
0answers
21 views

Reduce components in an android layout with GLSurfaceView

I would like to optimize this layout to improve rendering speed. How can I remove so many unnecessary components from the layout file? ...
2
votes
1answer
177 views

Helper class for Fragments management

A Helper class for Fragment Management. The FragmentsManager class has methods to add and replace fragments. The replace method checks if the given fragment is present in backstack or not and if the ...
1
vote
0answers
234 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 ...
1
vote
0answers
52 views

Android app to take a photos and show them in a gallery

Gallery will be displayed in RecyclerView. User can select some images and delete it with one button. It all works, but i think I have bad code, because I don't use some instruments (like fragment). ...
1
vote
0answers
19 views

Encapsulating simple license backup to a disk

I am enapsulating my license backup to disk, using an interface ILicenseProvider and the implementation is DiskLicenseProvider. Also i am throwing an unchecked exception LicenseProviderException which ...
3
votes
2answers
109 views

Displaying 21 spinners to select body parts

I just wanted to ask how can I make my code a bit shorter. As of now, I have way too much code in the class. The program should display about twenty one spinners. I know it's a lot, but in this layout,...
1
vote
2answers
218 views

Android MVVM application architecture

Inspired this guide: https://developer.android.com/jetpack/docs/guide I try to build some app with similar architecture. App interact with remote API via http protocol (json responses from server). ...
2
votes
0answers
162 views

Timer application in MVP

I create simple Android timer application and I try to use MVP design pattern. I read some tutorials and after that I started writing code. My code is working correctly and as intended. There is ...
1
vote
1answer
64 views

Using Enum in java to store a fixed set of mutable objects

I already posted this on Stack Overflow, but someone suggested to post it to Code Review instead. I am creating an Android app that draws to the canvas. For this, ...
1
vote
1answer
110 views

Sign Up layout in android

I have created a sign up layout as image below. Does this part of code looked bad since the dp I used for the floating button are quite large. ...