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.

63 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
2answers
729 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, ...
3
votes
0answers
758 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 ...
3
votes
0answers
711 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 ...
3
votes
0answers
477 views

Syncing structured data and files in Android App with an ORM?

I am developing an Android App which I have developed for iOS before. The app requires that structured data and files are synced across android devices. In iOS, I was using Core Data and synced to ...
3
votes
0answers
69 views

Android network Lib development

I have to develop an Android library that should frequently communicate with a server in the background. Access to the lib Object should be guaranteed everywhere in the Apps that will use it, so I ...
3
votes
0answers
3k views

How to get local device time corresponding to NTP server timestamp?

So, I'm trying to use an NTP server to help me synchronize an app across two Android devices (to have them perform some action at the exact same time, give or take < 20 ms). I'm using the SNTP ...
2
votes
0answers
25 views

Reading (GET) Facebook Ads From Ad Library and Reading (GET) Personal Ad Account Billing Data in my Android Application

I'm trying to create an android application for personal use to do the following: Get ads from the Facebook ad library (commercial ones) not the ones with politics topics etc. and then insert them ...
2
votes
0answers
173 views

Help with understanding/implementing MVP architecture in Android

I'm trying to decipher/understand the best way to implement Model-View-Presenter architecture for the following Android example app... The App: I'm attempting to implement a very basic weather app ...
1
vote
0answers
42 views

How can a mobile app measure the phone's rough distance with the user's laptop?

I have a mobile app (iOS and android compatible) that needs to know if it's far or close to the user's laptop/ desktop (e.g. whether it's within 5 meters or not). I need to make it secure such that ...
1
vote
0answers
17 views

Firestore implement Notifications View

So to begin with this question is not related to Push Notifications. What I want to achieve is a View in which all notifications are displayed. Something like Instagram or Facebook. There could be a ...
1
vote
0answers
115 views

Common business logic in android MVVM

Requirement I am currently working on an android application that uses MVVM, live data and databinding. I have a use-case where I need to show a Comment button in multiple screens in my android app. ...
1
vote
0answers
20 views

How to lay out a core java module with an Android GUI layer on top

How can I use Java modules in an Android app repository? In particular, what directory structure should I use? I have a project in mind for which I would like to have a GUI-independent core Java 9 ...
1
vote
0answers
22 views

How to implement item based collaborative filtering on android using CSV dataset

I have developed an android application on food delivery where I have used Firebase to store and retrieve data. I wanted to implement collaborative filtering algorithm on my dataset and I am stuck on ...
1
vote
1answer
126 views

Directing user to a specific screen on App after he installs the App

I have a very specific use case. We are working on a Project where user can buy the tickets to an event. In this, we are asking the user to enter an Email id where he can receive the email from where ...
1
vote
0answers
277 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() { ...
1
vote
0answers
850 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, ...
1
vote
0answers
729 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
66 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 ...
1
vote
0answers
501 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 ...
1
vote
0answers
112 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 ...
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 ...
1
vote
0answers
4k views

Can MVP be implemented in Android with Activities and Fragments as Presenters and Custom Views?

Lately my team has started considering the implementation of MVP pattern in some of our applications. We followed the several guides and tutorials out there, basically ending up with regular ...
1
vote
0answers
844 views

Handling multiple rest api versions within Android Java client

Actual architecture I have an app where a model is attached to every activity. The model ask a repository for information that can come from server or local db depending on many factors. When it asks ...
1
vote
0answers
30 views

Integrate non-free (with permission) / differently licenced logos in GPL repository

I'm planning to open source an Android app that I developed against the API of a (small regional) social network. This app is the 'official' version for the website and thus allowed to use the logo ...
1
vote
0answers
1k views

Android: How to set a stop flag in native C thread from Java

In my NDK Android app, Java part runs native C code to perform intensive calculations. It does so by creating an AsyncTask worker object that runs the native code in a separate thread via the JNI. The ...
1
vote
0answers
340 views

Use Android App Icons for Sharing

I got a question about licensing of android app icons. At the moment I am developing an app and I implemented a share function. The user can select a prefered app to share a text message in a popup ...
1
vote
0answers
47 views

Online error reporting without network access

I have developed an application for android requiring no permissions, but the biggest downside of this is that I don't have error reporting. So, I was playing around for the past week with any ...
1
vote
0answers
170 views

What are the tradeoffs involved in referencing Context in a library?

Context is one of the core classes of Android, and many functions it contains are useful in Android library projects, particularly accessing configuration. What are the trade offs involved in ...
0
votes
0answers
5 views

How to use UDP MulticastSocket for Reception with ThreadHandler-Looper-Handler in Android

I am trying to find the right architecture to be able to listen to UDP Multicast socket, receive the datagram packet that is in JSON format and then send the data to my BroadCast Receiver. It is ...
0
votes
0answers
19 views

Using coroutines dispatchers as executor

We can use coroutines dispatchers as executor like Dispatchers.Default.asExecutor() and we do it when we want to use a coroutine just as a executor for operations in application lifetime like ...
0
votes
0answers
25 views

Android Design Question - Should a Reporting App Operate with Non-Standard Launch Modes?

My company has an application largely designed around the idea of running reports. When we had originally conceived the project, we had decided that it made the most sense to use the Android provided '...
0
votes
0answers
37 views

Common patterns for Observable data layer on iOS

I am working on learning native iOS development in Swift, and I am trying to find something that is similar to what I've learned in Android development with Kotlin. In particular I am referring to ...
0
votes
0answers
88 views

Android : How to represent one activity starting another activity with an intent in a UML sequence diagram and class diagram?

In this simple example I have two activities ActivityA and ActivityB. ActivityA is the foreground activity. User clicks a button that executes dispatchActivityBIntent() that creates a intent and ...
0
votes
0answers
21 views

Factory to create view models with non optional mutable data storage

I'm not sure how to improve this architecture, involving view models and Koin: Typical purchase flow with several steps, each is a screen / fragment (using the nav component) You can navigate back ...
0
votes
1answer
287 views

Android project, clean architecture and modular approach

I have this project with MVVM and clean architecture well implemented but I've decided to split it into modules. Right now I have: apimodule apimodule: with the retrofit dependencies app: with the ...
0
votes
0answers
63 views

confusion for view's and viewmodel's responsibility in mvvm architecture in android

i have a confusion about what code should be placed in view and what in viewmodel for example click events here is a snippet code of google ToDo app example for showing application architecture (...
0
votes
0answers
25 views

Maintaining the Single Responsibility of Views in Android

I'm trying to improve on the structure of some android fragments. I have the following block of pseudocode: <layout> <50 lines of loading spinner> <50 lines of content/> ...
0
votes
0answers
36 views

Do I need provide translation for an UI library

I have a library for a lockscreen in Android, that includes diferent dilogs for fingerprints, texts and all that stuff. My question is: What the best practice to provide localization. Should I have ...
0
votes
0answers
205 views

Best practice for Asynchronous CRUD operations in Android/Java

A few months back, I was working on designing a client API (FooManager) for adding/removing/fetching a list of objects (Bar). The requirements were simple- 1. Fetch operation is CPU-intensive and ...
0
votes
1answer
240 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
106 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 ...
0
votes
0answers
39 views

Pseudorandom in Android

I am building a security mechanism and I need a Pseudorandom functionality in my app. More particularly I need to convert a String to fix length. My strings are random already, they just to long so I ...
0
votes
0answers
420 views

Better Approach for retrieving multiple RESTful calls

I have an Android application that associates bluetooth beacons with data that is retrieved from a server via RESTful calls. Once the app is launched, we have a page with a table that is being filled ...
0
votes
0answers
293 views

How to create calendar events in android (that will work with iPhone later too)

I'm developing an Android app right now with a cloud back-end using Google App Engine + Cloud Endpoints (a RESTFUL service). Eventually, I will find an iPhone developer to make my app for iPhone too,...
0
votes
0answers
591 views

Android runtime - does ART miss optimization opportunities over Dalvik?

Is ART a strict improvement over Dalvik, or there are optimizations that an ahead-of-time compiler will miss compared to JIT, but Google decide they don't matter in practice? For example, with JIT, ...
0
votes
0answers
2k views

Hybrid Apps and Storage - how does it work with Native apps and which to use?

I'm using Ionic at the moment. I believe, like many others, that hybrid apps will become more more common/important than they are now simply because the frameworks are getting better and better. ...
0
votes
0answers
614 views

Using a code library for Android with Apache 2.0 license

If: I want to create an app (e.g. for a business who wants all its employees to download the app from Google Play freely) I do not have an "about" button in the app. The app is closed source. How ...
0
votes
0answers
547 views

What are the implications of the cache when using notifyDataSetChanged?

I use Volley to return JSON from an API. I parse this JSON and add StoreItem objects to a List, then use an adapter to display in a listview. I use the cache functionality in Volley, and I'm ...
0
votes
1answer
578 views

Android, using a Fragment to hold/edit complex object, accesible from any Activity

I'll do my best to describe the problem, but I'm still very new to several concepts that I think this problem requires to be solved (namely interfaces and threads). I should preface this by saying ...
-1
votes
1answer
41 views

GPS application targeting mobile devices

I'm working on making a product for tracking workers/staffs locations and in that case the application need to be able to run on the phone for at least 10 hours without the phone suddenly closing the ...