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
1
vote
2answers
2k 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){ ...
3
votes
0answers
693 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
235 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 ...
-2
votes
1answer
64 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 ...
3
votes
0answers
689 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
2k 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
642 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
875 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 ...
1
vote
0answers
599 views

Android intent: Using ?q= in a geo: URI [closed]

I noticed that the Airbnb Android app sends such an intent to open a map app at a particular latitude/longitude: geo:0:0?q=77.77%2C88.88 From my simplistic point of view, they should use the ...
3
votes
3answers
733 views

How to keep Activity navigation logic generic enough to be reused in different workflows

I structure my Android application following Uncle Bob's Clean Architecture which basically comprise of at least following relevant layers:- Presentation - Using MVVM approach. This layer contains ...
1
vote
1answer
142 views

App uses rest services which use GPL library

I'm developing an app (for Android) which uses data received from my rest services. These services use also GPL libraries: if I have correctly understood, if a server side web application uses GPL ...
1
vote
3answers
662 views

Should a singleton be used in the following case?

Building an android app that displays a list of of Dog objects in Activity A. When you a tap a Dog in the list, that single dog is accessed by Activity B, Fragment B, and 3 other classes. After that ...
1
vote
0answers
576 views

Architecturing my Android app with MVP design pattern

I am developing a Human Activity Recognition android application. Currently, I am at the Design stage where I am designing the architecture of the app. I am using the MVP architecture pattern. I have ...
1
vote
0answers
65 views

How should I optimize my RecyclerAdapter (Android) to maximize efficiency of information retrieval in my app's data feed?

I was wondering if there were a set of standards or best practices for displaying information in lists for mobile applications (specifically Android applications that utilize RecyclerViews and custom ...
5
votes
1answer
149 views

Framework logs on client application

We are currently building a framework (closed source static library) that will communicate with some Smart home devices via Wi-Fi. This framework will be used by 3rd party developer to build their own ...
1
vote
0answers
438 views

How should one design a modular mobile application?

I'm currently working on a native mobile solution where I need to design a modular application. Imagine a scenario where you have your core application and 3 supporting modules. You can either sell ...
0
votes
2answers
96 views

How does an app send an order to a retailer? What happens under the hood?

I am wondering how the apps that allow a user to choose an item and, once the user has selected an item and checked out, give the retailer information about order that has been placed. For ...
3
votes
1answer
506 views

Testing White label iOS and Android mobile apps

We are in the process of developing white label apps for iOS and Android app. I was thinking about the test strategy for handling white label apps with minimum resources. My company is targeting for ...
2
votes
2answers
92 views

Should I provide as less optional size app icons as possible?

When submitting an app (especially iOS and android), there are some different size of app icons need to add into the app. Among of them, some sizes are optional, is it a good practice that I just ...
1
vote
0answers
108 views

android development screen flow logic

in android, who takes care of the screens flow? A screen closes after an operation and another screen opens. Which screen will be opened is a result of a complex logic. I tried to do the flow in ...
0
votes
2answers
322 views

What to put into an app about dialog?

I am about to release an Android app into the PlayStore. Currently my about dialog says: Application Name Copyright © 2016 All rights reserved Owned by My Name myEmail@address Used LGPL3 Library: ...
5
votes
4answers
3k views

Should I put UI and logic in separate classes?

I currently work on a hobby project which I use to learn more about Android/Java programming and programming in general. Recently, I decided to integrate jUnit into the project. Just getting it in ...
-1
votes
2answers
155 views

Relational or non relational database for my described application?

I want to design and implement a mobile application in which: Every user who have already registered is able to add new news (including title: text plus a picture, and content: long text, pictures or ...
3
votes
1answer
346 views

Architecture recommendation for Android

Recently I developed an Android application which is very difficult to maintain. We are stuck in a complicated situation. We developed Android Apps which contained 500k LOC and another team developed ...
1
vote
3answers
206 views

Releasing an unfinished Android app?

I plan to release my very first app on Google Play Store but I am still a bit confused on the concept of releasing software. I tried to read a few articles online about the life cycle of software ...
5
votes
1answer
460 views

Concept of push notifications - why is it only on mobile platforms? OSX/Windows/Linux?

At an operating system level, mobile operating systems support the notion of push notifications or a socket level 'persistent' communication with an app, whenever it is online. Why have the major ...
4
votes
2answers
2k views

Is blocking a UI thread sometimes a good idea?

Say, I created a custom button which includes some animation which is played when the button is clicked. The animation takes 500ms. During that time (until the animation is over), the button should ...
0
votes
1answer
144 views

take over an existing (partially finished) Android project [duplicate]

I've been asked to takeover an existing Android project and the developer who was previously working on this project has left many things incomplete and un-solved with some really bad code ...
1
vote
2answers
166 views

RESTful Api for Mobile Clients

I am mobile developer and always have one particular fight with my web-service/backend developer which believe in designing restful api. Issue: As per Restful design,every api should be atomic in ...
0
votes
2answers
1k views

Class instance while retaining variables between activities

First: This is for a project that is already deployed, and requires a solution that isn't "rewrite how the whole thing works"! I have a "record detail" screen of sorts that is storing the ...
1
vote
1answer
464 views

Class vs Module - When classes are needed to be in module?

I am developing an application that has a lot of options like local database CRUD operations, file IO, web APIs calling, notifications, user preference settings, services, widgets etc. At start it ...
2
votes
1answer
296 views

Formulating a more sensible constructor method

This question is in the context of an Android application written in Java. I have this class which performs a specific action and returns the result of such action with a callback implemented in the ...
2
votes
3answers
353 views

Java/Android CRUD SQL design

All the SQL in my app... Should I be confining it to its own special class? For example a MyDatabase class that extends SQLiteOpenHelper and implements all the create-tables, defines all the table ...
0
votes
1answer
732 views

Android Activitiy and Service Sync

I've looked for the solution of my problem but I've failed in finding a suitable answer. I've been trying to develop an Android application with heavy asyncronous networking capabilities. The problem ...
1
vote
1answer
129 views

What's the proper way to have one active callback at any time?

We have an Android app. The Android App uses Volley (https://developer.android.com/training/volley/index.html) to transmit network data. The point though is not about Volley, is about the pattern ...
0
votes
2answers
483 views

Store and access my objects using an int id

I have created a class HidDevice to form objects which concatenates input from each HIDDevice separately until a special key (ENTER) is pressed. So each instance of HidDevice have fields like int ...
2
votes
2answers
622 views

Is 20 Java classes for just making a REST call too much?

In an Android project, I am using dagger 2 for dependency injection, applying mvp design pattern, and I am writing interface for almost every class. Although it does achieved the separation of ...
5
votes
2answers
357 views

Reactive programming android app architecture

I am going to create a stock market android app. Stock quotes change every few seconds, so to keep the app updated I decided to implement a reactive functional design. My IDEAL design would be: ...
1
vote
0answers
2k views

Sockets (SignalR) vs Push notifications

I'm developing a Xamarin.Forms app with a .Net Web API backend. I definitely don't want to do long polls on my app to the server, but I need the app to remain updated with the server information. I ...
3
votes
2answers
1k views

How to manage state in MVP pattern?

I am currently using MVP pattern to develop an android application. I have to implement pagination (i.e. on scrolling at the bottom of the RecyclerView I need to fetch new data). So what is the best ...
4
votes
1answer
186 views

If I develop a media player for mobile or desktop do I have to pay for a license if my player is able to read MP3 files?

I know MP3 is not open source format but proprietary and I found this website http://mp3licensing.com/help/developers.html that states that you need a license for basically everything that uses MP3. ...
1
vote
2answers
736 views

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

I found out that the package name should follow the web domain you own for this application / developer Id. I published an app starting with com.health... (example) because I didn't know better at ...
0
votes
1answer
209 views

Android Studio, HTML and Java Correlation

I've recently started designing apps in Android Studio, and I've noticed that the same operations (for example, using a widget) can be completed by either going into the activityname_java file and ...
2
votes
2answers
1k views

How to check if app is offline

I am developing internal Android apps for the company I work for. In various places in the apps I need to connect to an internal server. This server is shutdown for maintenance for a period of time ...
1
vote
1answer
360 views

Why are there no cross-platform mobile applications?

As a part of my master's thesis, I am carrying a research topic on why there are no cross platform mobile applications. As applications developed in Java can run on any operating system using the JVM,...
-2
votes
1answer
921 views

Duplicate code to avoid performance decrease due to function calls? [closed]

I have a simple list in Java that I need to search using one of two methods. The first method simply returns the position in the list of the first matching element. The second filters out any elements ...
6
votes
4answers
3k views

JSON API or Plain JSON

There is a debate in my company on whether we should use the JSON API specification or stick to plain JSON for developing APIs that will be consumed by mobile apps, mainly iOS and Android. One ...
5
votes
1answer
554 views

Android: Design for fetching update/syncing from server

I'm building a meeting app where users can create, join (by invite), and edit events like meetings, outings etc. Think What's app chat groups. So I'm looking into designing how the android app would ...