Questions tagged [android]
Android is Google's open source OS and system for smart phones and tablets. Use this tag for software engineering questions about Android; for user questions, visit our sister site Android Enthusiasts Stack Exchange.
589 questions
4
votes
2
answers
434
views
Backup for an Android offline password manager
I am building an Android password management app, where passwords are locally kept for security reasons. The network endpoints are only for creating an account, email verifications etc.
I want to ...
2
votes
2
answers
315
views
Designing Password Recovery for an Offline-First Password Manager
I'm designing a password manager app for Android that prioritizes offline first security the idea is to store the vault locally and avoid any cloud dependencies during normal usage.
However, I'm ...
4
votes
4
answers
390
views
How to Deploy Machine Learning Model on Wearable Edge Devices? [closed]
I have done mostly machine learning with big data, GPUs on EC2 VMs, K8S clusters etc. But this new assignment is on the other end of the scale.
Basically, it is a time series forecasting and ...
0
votes
1
answer
181
views
Feasibility of using different java version for different project with different compatibility properties
I have multiple Flutter Android app projects that have different compatibilities of Java.
Now, what should I do if I am developing more than one project simultaneously?
If the first one uses Java 17, ...
0
votes
1
answer
182
views
Is there any way to have an android or iOS app expose a web-api?
I want to develop a miminal app for iOS and Android.
Basically, I want to have a widget (or similar micro-app) that displays how many items I have in a list. If I open the widget, it just opens a ...
2
votes
1
answer
227
views
Is returning Result types the standard way of dealing with errors in Kotlin?
Given that there are no checked exceptions in Kotlin, are Result types the correct way to indicate an exception occurred to the caller?
For example, I have the following function in my code:
suspend ...
2
votes
1
answer
116
views
What is the correct way to configure a testing mode on a class?
I have a repository which reads and writes to Firestore, and some tests to make sure data is sent and comes back in the correct way.
In order to test this I added a protected function which returns ...
-2
votes
2
answers
98
views
How to send non real time push notifications so that the servers aren't hogged?
Our android application is built on java. And while sending push notifications we're using tomcat as a server.
And it is doing more harm than good. Currently all the push notifications (FCM/APN) are ...
1
vote
1
answer
884
views
Is it normal to use multiple repositories in one viewmodel?
Does it violating any conventions? Is it acceptable by MVVM? I have to separate the local data repository and online repository, but for login I have to use multiple repositories for getting response ...
5
votes
1
answer
319
views
Keeping version parity between platforms
I'm in the mobile development domain and I use semantic versioning to version my releases. I keep both versions the same as long as new builds are released for both iOS and Android platforms at the ...
2
votes
1
answer
162
views
Android Jetpack DataStore item separation
I am trying to migrate to Jetpack DataStore from good ol' SharedPreferences and there is one thing I am struggling to come to terms with and that is the amount/size of the data pulling out of ...
0
votes
1
answer
186
views
Writing apps for Android and Apple phone simultaneously
So, recently I have been looking into developing apps. I joined a school group who wanted to develop an app, problem being that I had an Android phone and my friends all had Apple phones. I know of ...
1
vote
1
answer
125
views
am I understanding MVVM correctly? [duplicate]
ViewModel has Two-way data binding with UI which means UI can access the data from ViewModel and can update the view models data.
The Model has one-way data binding and is only supposed to respond ...
0
votes
1
answer
487
views
Android + Kotlin + Hilt + multi-module app: Should I "migrate" all classes with static methods to "injection"?
With the purpose of learning Hilt I started "migrating" my multi-module Kotlin app from using classes with static methods as helpers to Hilt injection.
After a lot of headaches, now ...
0
votes
1
answer
1k
views
Android + Kotlin + Hilt: Dependency Injection vs Static Methods
I've already read this carefully, but still need more clarification.
I'm not new to dependency injection, but new to Hilt, and trying to implement Hilt in my multi-module app.
The reason?
I currently ...
-2
votes
2
answers
13k
views
What are the possible *root causes* of a SocketTimeoutException?
I understand that a SocketTimeoutException (I'm in Java, but I guess it's the same in just about every major language) happens after a server or client doesn't respond after a period of time, let say ...
0
votes
0
answers
550
views
Is splitting Android activities/classes into many Kotlin extension functions a good or bad practise?
I have been working on an Android application for some time, and ever since the beginning I've developed a practice of splitting my class's (mostly activity/fragment) code up into multiple files.
This ...
2
votes
1
answer
1k
views
How to integrate Androidx Paging-3 in Clean Architecture?
This blog on "Clean Architecture" describes how to build a modular Android application along with using Clean Architecture.
In that example project, the author places the business logic in a ...
-1
votes
2
answers
377
views
How do android developers develop BLE-Clients without BLE Hardware? [closed]
First an foremost I would like to apologise if this is a trivial question, however it has been costing me a few workdays worth of freetime and I am appearantly too incompetent to figure this out ...
0
votes
2
answers
768
views
Which is the best approach I should follow use private fields in data class primary constructor or use Interfaces Inheritance?
I want to perform some operations on data class fields before accessing them and I am confused about which approach I should follow.
I want to write code so that it makes sense to everyone and follows ...
2
votes
1
answer
1k
views
What is the MVVM way of loading images in list in Android?
Scenario:
A very simple android app needed to be developed. It has just one screen with a list of items. Each item has a label and an icon. We fetch the item list from the server, and the server ...
2
votes
1
answer
1k
views
Secure way of storing client secrets in Xamarin / Android mobile apps
What would be a secure way of storing client secrets used for authentication (webservices) in Xamarin/Android apps ?
Secure Storage, which interacts with Android Keystore, seems very useful for ...
0
votes
1
answer
352
views
How to set up login pin system
i want to set up basic login page in xamarin.forms. There is no username/password, just a simple pin
so far i have 3 pages to do this
Sign-up Pin page
Sign-up Confirm Pin Page (re-enter pin to ...
0
votes
0
answers
766
views
Designing a unique id reliably based on a String date?
I am creating an Android application that sets alarms based on the String date of a list of Objects (PendingIntents, with each taking in an id, that is an integer). In order to cancel the ...
0
votes
0
answers
531
views
How to maintain and deploy a poc (Proof Of Concept) version of an app?
In our organization we sometimes have to create a poc (proof of concept) to either validate or invalidate the way to go. Currently we're having a discussion around how to embed this within our ...
0
votes
0
answers
593
views
In what layer should API be called in Clean Architecture - in Repository or in Use Case?
I am trying to implement Clean Architecture on my Android App with standard MVVM components.
Almost every example I have found deals with simple business logic, i.e. simple CRUD operations over data ...
1
vote
1
answer
397
views
Offline audio comparison for Android
I have two audio clips:
Source of truth
Recording of user
I want to compare the two, testing if they are similar enough, removing accents, etc. Any idea how I could do this on Android?
To add more ...
-4
votes
1
answer
79
views
Android app development (daily journal type)
I want to get help from you all about building an android app that is capable of logging daily journal type data. I want to have these feature primarily in the app:
Capable of logging the daily logs.
...
-1
votes
1
answer
1k
views
How does Power saving mode for detecting location in Android work?
On Android, the "Power saving" option within the location settings means that wifi and mobile networks are used to determine location. What data points from these access points does it use ...
2
votes
0
answers
95
views
How can a mobile app measure the phone's rough distance with the user's laptop?
I have a mobile app (iOS and android compatible) that needs to know if it's far or close to the user's laptop/ desktop (e.g. whether it's within 5 meters or not). I need to make it secure such that ...
0
votes
1
answer
45
views
menu content link in Backend VS menu content link in UI
Goal:
Have a common and same menu content link (for instance Home, about, consumer product, support) when you are using Angular, NativeScript and Android.
Background:
The menu contain seven different ...
2
votes
0
answers
349
views
Reading (GET) Facebook Ads From Ad Library and Reading (GET) Personal Ad Account Billing Data in my Android Application
I'm trying to create an android application for personal use to do the following:
Get ads from the Facebook ad library (commercial ones) not the ones with politics topics etc. and then insert them ...
-2
votes
1
answer
170
views
System Hungarian Notation for Android UI components?
Is using System Hungarian Notation for Android UI components (Views) valid? I mean using it ONLY for Views - no strSomething, boolStuff or similar names.
For example, tvDescription (TextView), ...
2
votes
2
answers
500
views
Better way than repeatedly passing the same parameters?
I have some methods in my code that essentially hide/show some Views, like showTitleHideBody(), showBodyHideTitle(), etc. They just change their Views' (tvTitle, tvBody) visibility.
Initially those ...
-3
votes
1
answer
57
views
Using same algorithm in web and Android application
For my project I need to use same algorithm for both web and Android application.
I thought about handling the algorithm server side but I feel this would put too much unnecessary load on the server ...
1
vote
0
answers
778
views
Common business logic in android MVVM
Requirement
I am currently working on an android application that uses MVVM, live data and databinding. I have a use-case where I need to show a Comment button in multiple screens in my android app.
...
1
vote
2
answers
2k
views
Can you modify the front-end source code of a mobile app?
I get that a front-end isn't secure on the web because one could theoretically access the front-end code by opening dev tools and changing the code.
Do I also need to be careful about security for a ...
-4
votes
2
answers
112
views
MVVM construction questions
I am trying to understand how MVVM works. Here are two examples (in Andrdoid) on how I understand it should work, please tell me if I understood correctly.
I currently want to make a list of ...
1
vote
3
answers
729
views
Best way to Model Classes associated with other Classes?
I'm trying to make a sports stats app in Java/Android + Realm.
I have the following classes:
Season
Player
Matches
I would like the Season to contain a "list" of all the players that played that ...
-1
votes
3
answers
297
views
What makes more sense: (a) To have multiple apps accessing the same DB (b) single app
On Android, do people create separate apps accessing the same database? For example an app that has users, producers and a customer support.
How can one decide if it makes more sense to have a ...
1
vote
2
answers
360
views
What goes on behind the scenes when data is passed through the use of interfaces?
I understand an interface is a contract and if a class implements that interface, it must define those abstract methods from the interface. What I don't understand is, how is data passed between two ...
1
vote
0
answers
385
views
Common patterns for Observable data layer on iOS
I am working on learning native iOS development in Swift, and I am trying to find something that is similar to what I've learned in Android development with Kotlin.
In particular I am referring to ...
2
votes
3
answers
758
views
Should services in a service layer be thread safe?
This is for an Android app, but I think the question applies to any software designed with a service layer.
Our app is structured with a presentation layer that handles the UI and a service layer ...
-1
votes
1
answer
61
views
GPS application targeting mobile devices
I'm working on making a product for tracking workers/staffs locations and in that case the application need to be able to run on the phone for at least 10 hours without the phone suddenly closing the ...
1
vote
1
answer
665
views
Clean Architecture: are repositories always needed?
I'm trying to apply Clean Architecture to a mobile Android App, but I still have some doubts about how to manage API calls.
Currently, the classes are structured like this:
View -> ViewModel -> ...
2
votes
4
answers
528
views
In mobile games that work across android and iOS is game logic written twice?
I was playing one of my favorite games from Supercell, and I imagine it’s a rather complicated game, and it stems across the two main mobile platforms.
My question is, do the developers write the ...
-1
votes
1
answer
1k
views
Android project, clean architecture and modular approach
I have this project with MVVM and clean architecture well implemented but I've decided to split it into modules. Right now I have:
apimodule
apimodule: with the retrofit dependencies
app: with the ...
-2
votes
1
answer
438
views
Which Software Architecture am I using? XAMPP, Apache, MySQL, PHP Android
I use XAMPP to host an Apache web server and a MySQL database. Most of the data processing is done on the user's mobile phone. After a certain activity, information of the user is sent to the web ...
0
votes
0
answers
101
views
confusion for view's and viewmodel's responsibility in mvvm architecture in android
i have a confusion about what code should be placed in view and what in viewmodel
for example click events
here is a snippet code of google ToDo app example for showing application architecture (...
-2
votes
1
answer
88
views
Big scale projects
I had a question about big scale projects.
what if the team decides to change a library and therefor the codes should be changed.
for example what if the team wants to change the picasso library to ...