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.

Filter by
Sorted by
Tagged with
2 votes
1 answer
102 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 ...
Adam's user avatar
  • 272
2 votes
1 answer
74 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 ...
Adam's user avatar
  • 272
-2 votes
2 answers
72 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 ...
barnyard9's user avatar
0 votes
0 answers
30 views

Android, are seperate state update functions a DRY violation?

In my ViewModel I’ve implemented couple of functions to manipulate the state of my UI. It quickly becomes bigger and bigger and I wonder if these functions violate the DRY principle? I could wrap it ...
deja's user avatar
  • 101
1 vote
1 answer
460 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 ...
Бодя павук's user avatar
5 votes
1 answer
212 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 ...
Isuru's user avatar
  • 391
1 vote
0 answers
63 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 ...
TheLibrarian's user avatar
0 votes
1 answer
118 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 ...
Trey Freeman's user avatar
0 votes
1 answer
102 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 ...
Saketh's user avatar
  • 9
0 votes
1 answer
419 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 ...
Diego Perez's user avatar
0 votes
1 answer
759 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 ...
Diego Perez's user avatar
-2 votes
2 answers
4k 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 ...
Mickael Bergeron Néron's user avatar
0 votes
0 answers
428 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 ...
thebluepandabear's user avatar
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 ...
Sourav Kannantha B's user avatar
-1 votes
2 answers
264 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 ...
MoustacheSpy's user avatar
0 votes
2 answers
541 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 ...
Lokik Soni's user avatar
2 votes
1 answer
836 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 ...
Kashan Danish's user avatar
2 votes
1 answer
920 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 ...
asyncful's user avatar
0 votes
0 answers
246 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 ...
Dan's user avatar
  • 101
0 votes
0 answers
642 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 ...
Adam Lee's user avatar
  • 129
0 votes
0 answers
350 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 ...
Baklap4's user avatar
  • 109
0 votes
0 answers
485 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 ...
daneejela's user avatar
  • 201
1 vote
1 answer
282 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 ...
moinudin's user avatar
  • 361
-4 votes
1 answer
58 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. ...
Sans's user avatar
  • 1
-1 votes
1 answer
833 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 ...
Richie Bendall's user avatar
2 votes
0 answers
74 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 ...
ShadyStego's user avatar
0 votes
1 answer
31 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 ...
HelloWorld1's user avatar
2 votes
0 answers
272 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 ...
Rany's user avatar
  • 121
-2 votes
1 answer
124 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), ...
Anxxy1's user avatar
  • 17
2 votes
2 answers
174 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 ...
did_attics's user avatar
-3 votes
1 answer
43 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 ...
TheRiverNorth's user avatar
1 vote
0 answers
746 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. ...
Anirudh's user avatar
  • 119
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 ...
Gwater17's user avatar
  • 255
-4 votes
2 answers
99 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 ...
AdrienM's user avatar
  • 11
1 vote
3 answers
537 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 ...
musicalears's user avatar
-1 votes
3 answers
213 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 ...
Manas Pratim Sarma's user avatar
1 vote
2 answers
275 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 ...
Peter G. Williams's user avatar
1 vote
0 answers
331 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 ...
papafe's user avatar
  • 171
2 votes
3 answers
610 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 ...
fluidj's user avatar
  • 147
-1 votes
1 answer
51 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 ...
SmallDev's user avatar
  • 111
1 vote
1 answer
576 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 -> ...
Rod's user avatar
  • 148
2 votes
4 answers
458 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 ...
MZawg's user avatar
  • 423
-1 votes
1 answer
945 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 ...
kirchhoff's user avatar
-2 votes
1 answer
396 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 ...
santa's user avatar
  • 1
0 votes
0 answers
90 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 (...
hamid_c's user avatar
  • 197
-2 votes
1 answer
77 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 ...
Tyr's user avatar
  • 11
-4 votes
3 answers
1k views

Why local database should be the only source of truth for mobile application?

Being mobile developer for quite some time (ios/android) I've learnt that local database is very rarely needed. Mobile application are mobile by definition, they usually serve only as clients to ...
Fyodor Volchyok's user avatar
-1 votes
4 answers
2k views

How do I prove an app is mine? [closed]

So I am in the process of finishing an app (android for now), and I have a doubt about if I should have papers that proof that I made that app. Its the first time for me to publish an app, and I am ...
SomeUser's user avatar
2 votes
1 answer
1k views

How does .Net's Mono Framework, Work on Android

Android uses the modified version of JVM known as Android Runtime to execute android apps. How do games (with Unity 3d) and Apps (Xamarin) written in C# (which require dot Net's Mono framework) run ...
LekeOpe's user avatar
  • 271
1 vote
0 answers
33 views

How to lay out a core java module with an Android GUI layer on top

How can I use Java modules in an Android app repository? In particular, what directory structure should I use? I have a project in mind for which I would like to have a GUI-independent core Java 9 ...
Anakhand's user avatar
  • 197

1
2 3 4 5
12