Skip to main content
Share Your Experience: Take the 2024 Developer Survey
8 votes
Accepted

Pure Dependency Injection - How to implement it

You've probably finished your course by now, but in case you are still searching, or someone else is: rolling your own DI is actually very simple on Android once you know how to do it. Creating the ...
asaf android's user avatar
6 votes
Accepted

Best practices for app-cloud synchronization of database representation

You are trying to create a distributed eventually-consistent system. Those are inherently complicated. It's understandable that you are having difficulty coming up with a good solution because there ...
amon's user avatar
  • 134k
5 votes

Is there any rule of thumb regarding which version of Android you should target, minus the current version?

There is no rule you can apply to every app. You need stats on market penetration for each version, and cross reference that with what your app needs to do. Some older versions of Android might not ...
Greg Burghardt's user avatar
5 votes
Accepted

Creating sub-classes of all external classes

This sounds like a clear violation of YAGNI (You aren't gonna need it). Do not develop features, or methods that you do not directly need. Basically only create what you know you are going to need, ...
Tommy Andersen's user avatar
4 votes

How to check if app is offline

Using a background service won't really help you. The problem is that after a succesful check for wi-fi and server you can't be sure that they are still online while you make your call to get the ...
Heslacher's user avatar
  • 151
4 votes

What's the best implementation for offline mobile app synchronization?

If you're going to sync against your master SQL database you will always have the same problem: how do you resolve conflicting changes? CouchDB doesn't help you there. It explicitly does not handle ...
Joeri Sebrechts's user avatar
4 votes

Understanding application licenses when using third party libraries in an android project

It's kind-of ironic that your question is about how to handle the license of a library that generates About pages for apps, because the most common practice for what to do with such licenses is to ...
Jules's user avatar
  • 17.8k
4 votes

Watermark on Video implementation , Server or Client

There are two considerations here: Adding a watermark takes quite a bit of processing power, especially for videos. It might be possible that a phone is capable of adding the watermark, but it will ...
Bart van Ingen Schenau's user avatar
4 votes

Why using ViewModel when using also Repository?

If you persist data using a repository, then the changes obviously persist say, a screen rotation. But, the repository instantiation itself does not survive the screen rotation. The view model, ...
read_somewhere_else's user avatar
4 votes
Accepted

Do shared ViewModels contradict MVVM?

It's really hard to say where do you draw the line between single and shared ViewModel usages. As a rule of thumb, I would use shared ViewModel in the case and only in the case when two or more ...
daneejela's user avatar
  • 201
4 votes

Creating sub-classes of all external classes

We may need to customize views in future if needed. Creating it earlier and using it makes less refactoring effort. If this is an actual reason, you're using the wrong tools. Imagine that at some ...
Arseni Mourzenko's user avatar
3 votes
Accepted

Avoiding extra parameters through API or device (Android, iOS)

If you're the designer of the API in question, why did you design it to include these "extra params"? Maybe they are needed elsewhere, but in your new code you just need a subset of the returned data? ...
Mael's user avatar
  • 2,355
3 votes
Accepted

Version control locally on Android

Git can be used 100% locally, without any servers. The value of using a Git hosting service is that this allows multiple developers to collaborate more easily, and the web interface, with features ...
amon's user avatar
  • 134k
3 votes

Pure Dependency Injection - How to implement it

For plain Java classes in Android pure DI is implemented as usual with constructor parameters. For example: interface UserService extends Parcelable { User getUser(String name); } class ...
Samuel's user avatar
  • 9,197
3 votes
Accepted

How do I prove an app is mine?

The usual way is to show that you are the author of the source code. Unfortunately, if all you have is your source and your goodwill, another party could come with your source and claim it’s theirs ...
Christophe's user avatar
3 votes
Accepted

What makes more sense: (a) To have multiple apps accessing the same DB (b) single app

If I understand you correctly, your question is more about the different user roles and whether you should offer separate apps for these users. The fact that all of these user roles need access to the ...
Hans-Martin Mosner's user avatar
2 votes

Why use XML in Android?

I'm slightly late for the party, but here are my two cents on the matter, and I've been lucky enough to answer this question for someone who wrote a large app with 70+ screens and tons of business ...
Yuval Herziger's user avatar
2 votes
Accepted

What should I do if I published an app with a wrong package name?

The operative word here is should. This naming convention is by no means mandatory. And it also has nothing to do with being able to see who created the library. The point is that there is a single ...
Jörg W Mittag's user avatar
2 votes
Accepted

How to check if app is offline

You are leaving the radios turned on practically the whole time and this will undoubtedly use up battery. I do see your motivation, however. A decent compromise is to assume that the app is online ...
Martin Kochanski's user avatar
2 votes
Accepted

Unicode Telugu language characters

Yes, from v4.2, Telugu language support was made available in Android. Using Unicode you could very well develop applications that could render Telugu language for your Mobile application.
Devasuran's user avatar
  • 146
2 votes
Accepted

Android Clean Architecture - Seperate Usecases, Single Usecase, or not a Usecase at all?

Is it about use case or user interface ? What you call use case seems to be the detailed specification of a user interface: The screen itself is a grid of ... User Selects an Image ... ...
Christophe's user avatar
2 votes
Accepted

Android application to RTL (Arabic)

What i have done in my app: fix layout. If you use the newest android studio the function "Analyse/Inspect-Code" provides warning if you for example use layout_alignParentRight (rtl independant) ...
k3b's user avatar
  • 7,526
2 votes

Are "I'm writing android applications" and "follow open-closed principles" reasons to allow global state?

Global state is a really bad idea in android unless you package it up into an application database or something like that. The android runtime will periodically close and reopen activities, and can ...
whatsisname's user avatar
  • 27.6k
2 votes

Why using ViewModel when using also Repository?

Yes you can combine them. This mean fewer code and achieve the same result. But for testing and when work in team is better keep them separe. The viewmodel has the responsibility of manage the data ...
Elvis Jr's user avatar
  • 138
2 votes

How to connect IOT devices to Android App(initial connection)

so the IOT devices wont be running any major software or anything, I want them to be as simple as send and receive curl statements (I know they will have to have something but for design I want to ...
πάντα ῥεῖ's user avatar
2 votes

How to connect IOT devices to Android App(initial connection)

This largely depends on your IoT architecture. There is usually a button which allows the device which has to be configured to enter a "configuration mode". Then the phone either picks up a WiFi ...
jaskij's user avatar
  • 575
2 votes

How do I prove an app is mine?

There are several ways an app developer can prove ownership. App includes link to web site, web site has name and/or photo of the developer. Developer can produce portions of the source code. (...
Dan Pichelman's user avatar
2 votes

How do I prove an app is mine?

You either are the owner, or you’re not. It only matters if someone else claims to be the owner and complains. Like if I complained to Apple or Google that the app is really mine, then I and you would ...
gnasher729's user avatar
  • 45.7k
2 votes

How do I plan my refactor of my android app for better architecture?

In broad strokes yes, but I would hardly call that a plan. Its a painting of scenic vista you wish to see. The plan would be the concrete steps/strategies you are going to use to get there from your ...
Kain0_0's user avatar
  • 16.2k
2 votes

Message queues alternative in mobile development

It doesn't exist. There isn't a queuing system on the planet that does not have real hard caps to the amount of messages that it can preserve. These might be insanely larges numbers, but they are real ...
Kain0_0's user avatar
  • 16.2k

Only top scored, non community-wiki answers of a minimum length are eligible