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
0
votes
1answer
169 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 ...
4
votes
4answers
566 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 ...
-5
votes
1answer
280 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
281 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. ...
3
votes
1answer
1k views

Unit Testing in VIPER Architecture: 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
2k 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 ...
2
votes
3answers
497 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
478 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
495 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
564 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 { ...
5
votes
1answer
1k 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 (...
2
votes
1answer
830 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
4k 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 ...
4
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
1k 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
56 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
985 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
291 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
655 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
422 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
105 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
388 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 ...
2
votes
1answer
238 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
130 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
240 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 ...
10
votes
3answers
4k 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
407 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
499 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
435 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
1k 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
57 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 ...
11
votes
1answer
2k 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
380 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
99 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
385 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
1k 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
289 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
224 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
2k 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
2k 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
463 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
2k 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
433 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
195 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 ...
4
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
72 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 ...