Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
1answer
1k views

Clean Architecture : Google/Facebook Login and data layer

I'm trying to find a way around the integration of Google and Facebook login for an Android application using the Clean Architecture. My application has 3 Android Studio modules : presentation : ...
1
vote
2answers
921 views

Clean Architecture: Apps that rely heavily on background services

I am trying to implement clean architecture (https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html) on an Android app. As an example, let's say that all the app does is monitors a ...
-1
votes
1answer
54 views

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

What is the best practice for REST API call from and device (Android, iOS). I am getting extra parameters/fields in JSON response, while calling an API. Throughout the the application there are ...
1
vote
2answers
850 views

Uncle Bob's clean architecture - Composed entities

I'm building an Android application, and trying to follow the Clean Architecture pattern. I am a little confused on what my entities should look like regarding some of my use cases. Example I have ...
-2
votes
1answer
233 views

Can we build mobile app using JavaScript (NOT Java)? [closed]

I'm confused I use to build mobile app couple of years ago and I know that android is java I read some framework like Ionic HTML/JavaScript Framework that can export to mobile app. I going to have ...
3
votes
1answer
504 views

Push notification from web application to my mobile app

I want to create a mobile app(iOS and Android) for business need, ex: the business is Health and Beauty. So I need a mobile app for sale some goods and service. However, I need push notification to ...
0
votes
2answers
285 views

Version control locally on Android

I am trying to make some version control locally on my Android project. It is just to have control about my changes, but I do not want to upload them to any external repository. Neither I want to ...
-2
votes
1answer
98 views

Android testing, what to test? [closed]

I'm quite a noob in the world of testing. I've read all the materials related to Android testing: Unit test Instrumentation test JUnit Robolectric Espresso etc. The thing is that, all the examples ...
3
votes
1answer
279 views

Should I implement object pooling for Dalvik VMs?

This question extends from these questions: Should we avoid object creation in Java? Is object pooling a deprecated technique? Well, a JVM running on a server is well optimised, I know. Programs ...
1
vote
1answer
2k views

How do I use an Apache 2.0 licensed library in my commercial Android app? [duplicate]

I am using a library which is licensed under Apache 2.0 in my commercial Android app. I took a look on the Apache license FAQ on the official Apache homepage (https://apache.org/foundation/license-faq....
2
votes
1answer
169 views

Architecture for a scoring and commentary apps

About the app: This is an android app. The app has two components/ two different users, scorers who score the game and fans who view commentary of the game. Scoring User : A scorer watches a live ...
-3
votes
3answers
108 views

How to refactor bunch of init methods in onCreate() method?

I create copy of this post here because this place more relevant for my question and I don't remove original question from stakOverFlow because I got comments and start conversations with users. I ...
-6
votes
2answers
226 views

Java Class has 50 inner class that are Getters [closed]

(JAVA) I have about 50 Getters, all return the same text, tag, type. Text and tag are String and type is int. The purpose is a forms that use repetitive fields along with form specific fields. I am ...
6
votes
3answers
3k views

Clean Architecture - Too many Use Case Classes

I'm going into Clean Architecture and lift my Android level from MVC to MVP, introducing DI with Dagger 2, Reactivity with RxJava 2, and of course Java 8. In MVP clean architecture there is a layer ...
3
votes
1answer
361 views

How to achieve proper MVP Android Dependency, between Presenter,Domain and Data Layer?

I am trying to understand better MVP Architecture on Android.To do that, i want to implement MVP on android project from beginning. First i tried to use one module, which is app(Application app),but ...
4
votes
1answer
388 views

Handling common code among presenters

I'm facing some issues related to code duplication when following MVP architectural pattern in an Android project that I'm working with. My project structure is separated by packages: data, domain, ...
1
vote
1answer
369 views

encrypting a string with public key in client side and decrypt it in backend using private key

I have a client side android app which needs to send an encrypted string to a server implemented in PHP. For this I have chosen an asymmetric algorithm (RSA). Should I: Save a public key in client ...
3
votes
3answers
956 views

How useful is JNI in android?

In java/android we can call code written in the c/c++ language for execution speed advantage. I have heard of Ahead Of Time compilation which (as far as i know) compiles the entire application to ...
3
votes
1answer
56 views

How can I track who invited who to install?

After a user invites their contacts from within my app, I want to send the first user a notification "so and so installed the app, you can now connect with them." So when a user invites someone, I ...
1
vote
1answer
1k views

MVP: Should a View have multiple Presenters?

Is it desirable (from an architectural standpoint) to have more than one Presenter communicating with a View? In my particular situation I have one presenter communicating with multiple views, and ...
10
votes
1answer
1k views

Why doesn't CharSequence define contains(CharSequence)?

This applies to to both Java SE & Android, as the contracts are identical. CharSequence documentation for Java SE CharSequence documentation for Android CharSequence does not define a contains(...
1
vote
2answers
336 views

Deliveryman's position (latitude + longitude) handling on PHP server side from Android app

The context As a school project, I'm building a PHP and Android app for a fake company. Let's call the company "Express Food", which can talk pretty much by itself. The "daily meals" are kept by ...
0
votes
0answers
91 views

Mobile development and infinite List pattern

I m currently working on a React Native application which aims to provide à huge list of items, using infinite scroll and a local state (no matter the technology / plaform, it's stored in RAM) of the ...
1
vote
1answer
306 views

Should I replace switch case of functions determined by options in previous activity?

For example, assume my app has 3 steps with 3 pages: Step 1 : MainActivity: choose color Step 2 : EditTextActivity: input text Step 3 : GreenActivity: display color and input text In ...
3
votes
1answer
900 views

In the MVP architecture, how should the Model layer get its data?

I am new to high-level (Android / Java) application development and I learned of the MVP (Model, View, Presenter) architecture. But it's not clear what the role and design of the Model layer is ...
0
votes
1answer
239 views

Is it good or bad practice to create alternate styles of rows(eg:alternate background color) in ListView using separate xml?

For example,to create alternate layout in ListView which uses different alternate color : <LinearLayout android:id="@+id/view1" android:layout_width="wrap_content" android:...
2
votes
2answers
218 views

Is it ok to have many libraries for modularity?

Situation: My app exists as standard and branded version, the branded version has some tiny additional features but most stuff is the same. Right now i have a basic library with popups and visual ...
0
votes
1answer
1k views

Is it a good idea to use my own callback mechanism instead of standard implementation like startActivityForResult?

I am trying to create a simple app which has 2 activities, which enter text on one activity and then displays it on the title bar if another activity: EditTextActivity: MainActivity: I know the ...
5
votes
2answers
1k views

Pure Dependency Injection - How to implement it

I'm doing an Android project for an online course. I would like to use DI in that project, so I started to use dagger2, but now I started to have typical newbie problems that are holding me back. As ...
1
vote
1answer
1k views

How to prevent users from decompiling app to find API key?

I'm currently building an Android app that uses OAuth to sign in to a service. With OAuth, I need to provide a client ID and a client secret to the service so it can identify my app. Right now, I'm ...
1
vote
0answers
40 views

Best Approach to maintain 2 instances of View Class with its own set of database/sharedPreferences

I have requirements for an Android application. The app already works for one client in V1. In V2 version of the app, we need the app to support 2 clients, for this we need to make changes in only 1 ...
1
vote
2answers
414 views

Architecture of mobile backend

I would like some input on some refactoring I am to do on a mobile backend (API). I have been tossed a mobile API which I need to refactor and improve upon, especially in the area of performance. ...
0
votes
2answers
1k views

Android MVC with the Activity being the controller?

In an android project, I don't see how the following architecture can be considered MVC. The team said: Android apps are fundamentally MVC the Controller is the Android Activity. the MVC View is ...
-5
votes
2answers
119 views

Which applications are developer environments and operating systems coded in?

I have been wondering about this for a while. What applications is programs like visual studio programmed in? But also, where is operating systems like android, ios and windows written in? I just ...
0
votes
1answer
375 views

What is called the act of extending a Java class with another class?

When we create a Java class for example B that inherits from another class e.g. A, we say that our subclass (B) extends the super class (A). What is this act called in programming. Simply put, for ...
1
vote
1answer
188 views

Paid and Free Version in seperate git branches [duplicate]

How do I manage and update two different app versions, which are with and without advertisements, but are otherwise identical, using git. Up to this point in development, I've only needed to maintain ...
5
votes
1answer
2k views

How many presenters should I use in proper MVP?

I have an Android app which I am refactoring to use MVP. I have an Activity that has two Fragments. Scenario 1 (one presenter): The presenter "knows" each view. So, if one view receives input a ...
-1
votes
1answer
70 views

Retro-engineering an application on Android

I'm trying to retrieve some personal data from an application that has completely disappeared from Google Play, and its author has answered none of my emails. (I'm namely trying to retrieve a private ...
1
vote
0answers
672 views

Should I wrap all codes into runOnUiThread even some code doesn't need to run on UI thread?

In android, some codes, such as updating UI buttons, needs to be called in UI thread, however, before UI update, some task, such as getting response from internet, need to be done on another thread, ...
0
votes
3answers
75 views

Using only cloud database and authentication service in the cloud as backend for a mobile app - sufficient?

I want to create an Android application with cloud-based functionality. It would entail a (rather simple) loyalty program for consumers and retailers; so, just managing user accounts and some ...
1
vote
2answers
1k views

Class with only one static method

I am using Java for creating an application for Android (so I can use many of Java 7 options, but cannot use all of them). I have two classes: class A{ static String getScript(String input){ ...
2
votes
0answers
603 views

Handling account roles in Android app

I'm building an Android app where different "types" of users can log in - lets say User and Admin are the two roles (there could be more than two). User can access some views in the app, by pressing ...
-1
votes
2answers
202 views

How to approach creating musical instrument sounds?

I've started to develop an application that allows the user to play notes on instruments. In particular, traditional Balinese instruments. As with many instruments, they have a certain amount of notes ...
-3
votes
1answer
57 views

Login Register Page for Anroid

I have a mysql database in server, storing user accounts information (username and password). I'm developing the Android login/ register page for an app. When the app is first loaded on client ...
4
votes
0answers
639 views

Multithreading in Android

Looking for resources that teach multithreading in Android and list best practices. I want to do some image processing on the preview frame of the camera (already have this part set up) but want to ...
1
vote
5answers
1k views

Switch case for one condition

I'm doing a code review at the moment on Java Android code. I am looking at a function where a programmer has decided to use a switch statement to wrap a single condition. I am considering making a ...
2
votes
0answers
570 views

What are the disadvantages of using a C++ base for cross-platform Android and iOS development? [closed]

I've done some research and one method used for cross-platform mobile application development is to use the lowest common denominator approach, packaging platform-independent functions in a shared C++ ...
1
vote
2answers
283 views

Is this one method interface a good response to this interview question?

Today I received a rejection letter from a company where as part of the interview process they gave a a couple days to respond to the following question (paraphrased): Let’s say say you have ...
1
vote
2answers
689 views

Real time video communication functionality in android without 3rd party services

I have added video calling functionality to my android app using sinch, I was wondering, what kind of technology-infrastructure is needed to do such a thing without using any 3rd party services? ...
2
votes
1answer
3k views

Can Kalman Filter make GPS data more accurate?

I'm trying to improve indoor gps accuracy in ios application. Do people apply such filters to gps data in different apps which track your position? I have 10-20 meters error indoors when using raw ...