Stack Exchange Network

Stack Exchange network consists of 174 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

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.

-4
votes
0answers
46 views

How to design an Android app?

GOAL: I've started to write my first Android app and I made a lot of mistake, for example: putting every method and variable inside the main activity; not using single responsibility principle; ...
4
votes
3answers
319 views

Proper way to name a class which has just methods and not fields

GOAL: naming a class which has the responsibility to save data in Android database. The class structure is like this ClassName { public void saveSync(...){ /* implementation*/ } public ...
1
vote
1answer
32 views

Doing operations securily from an Android application into a Server

I have come up with a problem in my development and I have searched for correct solutions but have not found any. I am developing an application which lets users login with username and password. ...
0
votes
1answer
40 views

Best practice API design for mobile app in sending multiple photos in one request?

I'm working on API design for a mobile app where the user can send one or more photos that will be stored in the database. Currently I have three routes, post photo/create which will send one photo ...
2
votes
1answer
123 views

Access multiple entities in repository - clean architecture

I have a API call that returns a list of Payments, each Payment contains a User. I need to call it, save the results in the database, fetch all the payments and users and return them all to the ...
1
vote
0answers
19 views

Android Multiple Threads for I/O Operations in Room

I have a small example that i run on a real device with 4+4 cores. ExecutorService service = Executors.newFixedThreadPool(4); for(int i =0 ; i<1000; i++){ Runnable task = new Runnable() { ...
0
votes
2answers
36 views

Web Services with Android and iOS apps

I have a website which uses REST Api for communication. All data retrieval and save happen through Rest Api calls(polyglot environment). Now I am planning to create an Android and iOS app . I have ...
1
vote
3answers
146 views

Can Java applications run on phones (at least android) AND Windows?

Hi all I love stackoverflow so helpful. Afaik IOS has some security measures that dont let other apps (such as jvm) execute code from your app. Not sure how much this is true. But anyway, I heard ...
0
votes
2answers
163 views

Is this Singleton-like design pattern a feasible framework to build on?

I am posting this question here after it having been determined to be "off-topic" for stackoverflow, and "too hypothetical" for codereview. I am experimenting with different singleton-style design ...
-1
votes
2answers
68 views

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

I am working on an Android app, and trying to figure out which version I should target. The current version is 28, so I figure that targeting any version of that minus 3 (ie >= 25) seems reasonable, ...
-2
votes
2answers
103 views

The best way method to write an app that takes you to a web page that depends on the time in a browser app?

I'm not a software developer at all, but wondering if this would be a relatively simple project for creating an android shortcut. My parents like doing the guardian quick crossword: https://www....
0
votes
0answers
31 views

Design of RecyclerView app in Android

I'm working on my first app that uses RecyclerView and while I am making great progress, I strongly suspect that my design needs some changes. I've asked in several places over recent weeks for ...
0
votes
1answer
34 views

What are good strategies to use for learning the workings of larger systems? [duplicate]

For obvious reasons (be a better developer) I desire to gain a deeper understanding of not just my code, but the systems / frameworks / libraries that I work with. As a senior-ish dev* I feel I should ...
0
votes
1answer
55 views

Web designer equivalent in Android and iOS worlds?

When web came, for years designers would create stunning designs in Photoshop, and developers would try to translate those designs to HTML/CSS/JS. This had many problems with itself. Lack of ...
0
votes
0answers
36 views

Mobile app for existing responsive web app?

I have an existing enterprise application that lives on a lamp stack (not single page app). All html is responsive using twitter bootstrap. The question of sending push notifications to mobile devices ...
1
vote
0answers
25 views

ExecutorService Doubles Memory in API<26 Android [closed]

My app downloads data from a PHP Server using threads from an ExecutorService with ThreadPool size 4. In API 27, the app runs perfectly without causing any OOM exception from the Heap memory. But all ...
0
votes
1answer
67 views

Correct way to receive bulk data from a server in Android?

Ok so to explain I have server in Java that receives data from a C++ program that I have no control over. So the data is transferred over TCP/IP and the Java server just receives it. The volume of ...
1
vote
1answer
117 views

What is the correct way for one presenter to communicate to another presenter or view with the MVP pattern on Android?

I have an activity with two fragments attached, Fragment/View A controlled by Presenter A and Fragment/View B controlled by Presenter B. View A is on the top half of the screen and does not change ...
0
votes
0answers
45 views

Handling Networking on Android

While doing android development. There is really no clear way of doing network operations, Sending and receiving data. Currently I am handing it using HttpsURLConnection and having streams to build a ...
0
votes
0answers
17 views

Better Approach for Expanded RecylerView

I want to make below-mentioned expanding Layout inside RecylerView. This is how it looks when it is not expanded. You can find the source code of Expandable RecyclerView in my GitHub repo here. Now ...
4
votes
4answers
542 views

Is it ethical for an android application to check if its rival application is also installed by the user?

I was just going through a food delivery application's preferences file where I found that it had a boolean to check if the user has one of its rival's app installed or not. Is it ethical to do so on ...
-4
votes
1answer
202 views

Android app using php mysql session

I am developing an android app. Backend code php and mysql. I can register login using php myql. But I want to add profile information using android app. But the information goes as another user id. ...
0
votes
1answer
95 views

Why are the Android runtime and native libraries in the same layer?

Regarding the diagram in Android's website: https://developer.android.com/guide/platform Why did they put the Android Runtime category in the same layer as the native C/C++ libraries category. ...
1
vote
1answer
311 views

Unit Testing in VIPER Architecture: Not Possible

TL;DR There are no methods in VIPER which are returning any value so how to test them? Reasoning: In VIPER, each layer is communicating with other layer by holding an abstract reference to it (...
1
vote
3answers
403 views

Proposed Method to Restrict API Access to Mobile App Only

I read a lot that you can't restrict your Public REST API to only your mobile application, but I have an idea and I want opinions on it: Variable App Key Method Mobile App Get IP address of current ...
1
vote
3answers
467 views

Difficulties in reading code

I don't have more than 6 months of experience and I am a little lazy . I work on Android platform . I have very good skills in understanding what is happening in general . The problem is that I don't ...
-4
votes
1answer
204 views

Create an apk that's a slideshow of images? (Android)

Non-developer UI / UX designer here. Looking at ways to show android prototypes on some dev tablets that are locked down. Locked down in a sense that they can't get to android market they only have ...
3
votes
1answer
243 views

Is Content Observer an implementation of Observer Pattern?

Observer Pattern is defined by the 'Gang of Four' Design Patterns book as a "one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated ...
1
vote
4answers
248 views

Put conditional logic inside method for DRY, or keep it outside for readability?

Take the following example which loads an interstitial ad every 10 times user does XYZ in the app, under certain conditions. It is called in multiple places in the code base: public class AdHandler { ...
4
votes
1answer
861 views

React Native vs. “Real” native

I am working for the consumer oriented company which has mobile app as main product. Our mobile app has 100K monthly active users and is developed using Cordova + Kendo Mobile + Telerik Appbuilder (...
0
votes
0answers
174 views

Recommended Archictecture in Android for communication between main View and RecyclerViewAdapter with MVVM

I'm trying to architect a screen with a fragment containing a date picker and some basic inputs and a list of items which more inputs. I'll try to exemplify with images: and a screen like this: ...
1
vote
1answer
366 views

Android - Clean Architecture - best way to structure packages?

Can you all take a look at my package structure to understand how i implemented clean architecture in android: if we take a look at the clean architecture diagram it looks like frameworks is apart of ...
0
votes
1answer
1k views

Best Practice for handling data sync with React Native, MobX and REST?

We're developing an app using React Native and MobX for the state stores, and also using a Web API REST service for the GETs and POSTs. All is going well, so far we're able to use FETCH to get the ...
0
votes
0answers
46 views

Background Network Listener for mobile Notification System (architecture and performance )

I'm currently designing an application on the Android platform, and i need to implement a background service (for notifications ) that will run as long as the device is on but i don't know if the ...
1
vote
1answer
573 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
485 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
51 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
591 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
170 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
442 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
160 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
94 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
154 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 ...
0
votes
1answer
883 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....
1
vote
1answer
90 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
92 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 ...
0
votes
0answers
132 views

Android development - changing View.OnClick to View.OnTouch

I am using a library to create an overlay in android, and I'd like to have it react to touches instead of clicks (clicks require the user to "untouch" the display to trigger). Most of my changes are ...
-5
votes
2answers
155 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 ...
0
votes
0answers
90 views

Holding and freeing references to android views

I have a helper class (without base class) to handle an expandable layout (expand more/less) which holds references to the views. The references are needed to show/hide the layout and change ...
4
votes
2answers
2k 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 ...