Android is Google's open source OS and system for smart phones and tablets. For user questions, see http://android.stackexchange.com

learn more… | top users | synonyms

0
votes
0answers
43 views

How to get dual UI for an ionic app?

I would like to get some suggestions for building a new app. This app has two faces/UI to it, buyer/seller. Users would have same account, and it would be seller and buyer. Its something similar to ...
2
votes
1answer
159 views

Is IntentService an implementation of Command Pattern?

According to Wikipedia: In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or ...
2
votes
1answer
60 views

A way to update a list an Android application displays

I just started working on an Android app that should display posts from my site and then a three-column list of some products. The three columns on the list contain the product names, a short ...
0
votes
2answers
494 views

Why use XML in Android?

From what I understand, isn't XML used for layouts and to setup how an activity looks? My book says that XML files are converted into Java code but then, why not just write everything in Java?
3
votes
1answer
124 views

How are objects treated in an anonymous inner class?

Lets take this for example... entryText.addTextChangedListener(new TextWatcher() { TextView wordCount = (TextView) findViewById(R.id.wordCount); TextView charCount = (TextView) findViewById(...
-2
votes
1answer
260 views

How should a service communicate with an activity in real-time?

How should a service communicate with an activity in real-time? BroadcastReceivers seem too slow and unreliable. Sometimes they appear too slow or stop working entirely. As an example, there was a ...
3
votes
1answer
345 views

why use authentication token instead of session_id for app(android side) in REST API

in normal php web application after login we use session_id that came from web browser to check if user loged in or not. But in REST API authentication I read some tutorials that say php should send ...
-4
votes
1answer
26 views

Protect settings on rooted device [closed]

I have an app and it stores data in shared preferences which can be easily changed using something like root explorer. So, how can I keep settings and be sure that user won't be able to edit them even ...
1
vote
0answers
27 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 ...
8
votes
3answers
3k views

Uncle Bob's clean architecture - An entity/model class for each layer?

BACKGROUND : I'm trying to use Uncle Bob's clean architecture in my android app. I studied many open source projects that are trying to show the right way to do it, and I found an interesting ...
8
votes
1answer
139 views

How can I best manage Android Intent filter Strings across multiple projects?

In my project IntentExamples, I have this filter, corresponding to a service. <intent-filter> <action android:name="biz.rpcodes.apps.intentexamples.START_SERVICE" /> </...
3
votes
1answer
519 views

Why do Android programmers use Hungarian notation? [duplicate]

I see Hungarian notation in almost all Android code I see. It is used in the source code, in the samples, in code from other programmers I get to see, in code that presenters show at Android ...
2
votes
1answer
216 views

Conflict resolution for two-way sync offline sync

How do you manage two-way synchronization between a 'main' database server and many 'secondary' servers, in particular conflict resolution, assuming a connection is not always available(offline ...
0
votes
1answer
80 views

How to associate images in SQLite

I'm a newbie and couldn't find anywhere, concise information regarding which approach I should be taking when working with images. The thing is I'm developing an app whose main purpose is to keep ...
4
votes
1answer
122 views

How are native applications (C, C++) deployed on android?

I am curious how to deploy android native (that is, using android NDK or Qt C++) application to the end users. AFAIK, the apk files are much like jar files, so I assume native programs can't be ...
3
votes
1answer
204 views

Why throw a 'must implement this function' exception rather than making the function abstract?

In the Android support libraries here the destroyItem and instantiateItem functions throw an exception if they aren't overriden: 175 throw new UnsupportedOperationException( 176 ...
2
votes
3answers
1k views

Cache Json on disk with fast read back in java/android

summary: I need a way to cache a large JSONArray on disk, and be able to quickly read AND CONVERT it back to JSONArray at a later time. NOTE: my output MUST be a >>JASONarray<<, and not a ...
0
votes
0answers
34 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 ...
2
votes
1answer
365 views

Is Activity/Fragment already a presenter?

An Activity or a Fragment is where you handle the logic of updating views with model data. However, they are tighly coupled with the Android's framework. Are these classes already presenters? Bonus:...
3
votes
2answers
590 views

Qt, LGPL, Android and GooglePlay licensing

So, you can build Qt apps and deploy them to android. Taking a look at this post, I was wondering if making a game using Qt would be fine with LGPL legal terms given the following facts: The app ...
1
vote
2answers
94 views

Efficient 2d per pixel lighting on Android [closed]

I am trying to create a simple 2d game to learn on my own. My current task is creating a lighting scheme. My goal is to make the screen appear dark except where I create lights. I have a light class ...
3
votes
1answer
349 views

Android App with Ruby Backend Server

I'm working on a personal project to help me branch out and learn some new/different technologies. I'm a .NET programmer but I want to learn Ruby and how to develop Android apps. I have developed ...
5
votes
2answers
519 views

How Should I Design JSON Serializable Data Classes To Respect Future @NonNull Fields

I have an app that uses Gson to serialize/deserialize data classes and persist data between runs. My code uses @NonNull annotations for many fields/parameters/method returns and one thing that was ...
-2
votes
2answers
1k views

Server-Side Development for Android Developers [closed]

I'm a Java/Android Developer, I recently graduated college and currently working as a Jr. Android Developer. I feel very comfortable around Android and Java in general, also I'm always reading and ...
-2
votes
1answer
305 views

3D visualization of moment using accelerometer on Android device [closed]

Is it possible to reconstruct the movement of an Android device in 3D space using data from accelerometer? For example, I may draw a circle with my hand in the air, holding an Android device. Is ...
2
votes
1answer
441 views

Decoupled architecture in Android

I am building an app for Android that will have multiple data sources depending on who is using it. N-tier architecture with a repository pattern seems like the right way to go about this but I am ...
1
vote
0answers
383 views

Abstract Alert Dialog Builders (Same Method Calls, Different Objects)

Currently I'm working on an Android library that creates a dialog which allows to select colors from a palette (examples at the end) and I've stumbled upon an interesting design problem. To create ...
4
votes
1answer
1k views

Android Pass Data between fragments

I have a question about passing data using bundle between fragments. I need to pass the URL from a Product object to the next fragment, so I don't know which is the best approach: to pass only the URL ...
0
votes
0answers
75 views

Android TranslateAnimation :: How to get the Speed of Mass Object

I'm currently having a project for making a springs-joint effect on android. And With two objects : A Mass Object A Springs (for hanging the mass object) And this link is my GIF animated of the ...
2
votes
1answer
486 views

Does javascript continue to run in an inactive browser tab on most mobile platforms? [closed]

If I design a javascript system that shares a websocket with cross window messaging pumps and local storage, what will happen if the browser tab the websocket is running on is in the background on an ...
1
vote
1answer
199 views

Developing an Android application while dogfooding it

I started learning Java and Android development recently, and I'm learning by building a small app for myself. Nothing fancy, it's just a simple mileage tracker for my car. I know there are tons of ...
0
votes
1answer
604 views

Does the issue of battery life for constant polling warrant the extra logic/time to implement a solution with websockets?

I am in the process of designing a chat application with cordova for android devices. I have been researching and have come to the conclusion that there are two ways to go about this that could work. ...
1
vote
2answers
569 views

Execute a get request periodically while application is inactive

I have a website that has full support for mobile devices but since opening a browser window seems too much and some people are obsessed with installing apps, I'm now creating an android app which is ...
0
votes
0answers
140 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
40 views

Database search results by deviation from query in Java

When every i try something new, I always 'throw myself in the deep end'. I'm in the initial stages of an android app build (my first android app, and first attempt at anything java) I want to know ...
0
votes
1answer
302 views

How to integrate Google Cloud Messaging with Cloud Endpoints and Google App Engine

I am trying to build a simple chat messaging app with Android. I have an Android Studio project with a Cloud Endpoints module. I use this Cloud Endpoints API which is published on my Google App ...
0
votes
1answer
174 views

Using JDK in Google Android Studio License Issues

I'm new to android developing and maybe my question is strange. If I want to make commercial apps, libraries, or services for android and use Google Android Studio + Oracle JDK (not OpenJDK) is there ...
0
votes
0answers
121 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
304 views

Best approach for an android local database-based application containing non-sensitive data

What's the best approach to design an android application with the question title specification? The application will show a first list of buttons with an alphabetical classification (like button1: A-...
1
vote
1answer
380 views

Android & OutOfMemoryError: Possible causes besides memory leak?

In my application I keep receiving crash reports where the root cause is an OutOfMemoryError. The app is quite image heavy (I use Picasso for all the image loading) and also has a WebView component ...
0
votes
1answer
120 views

Using open source apps source code under Apache v2 [closed]

I modified some code and added few (minor) changes to an open source Android app. Now I want to publish it on play store. The app is licensed under Apache license v2. The license file is included in ...
7
votes
2answers
213 views

Android: Pattern for checking requirements at startup?

My app's launcher activity checks a bunch of requirements like whether GPS is enabled, there's a network connection, the app has device administrator privileges, etc. Some of these checks display ...
0
votes
1answer
75 views

MainService vs. Application

My conceptual question circles around Android. What I like to do is running a service that acts as the central point for application-wide things and combine this with an event-system. For instance, ...
0
votes
1answer
202 views

Android Service vs Simple class with thread for network access [duplicate]

I am in quite a dilemma about how to solve my problem regarding network access. I checked this question but it does not really gives a solution for my problem. All of my REST based requests are ...
0
votes
1answer
145 views

Api for CMS And Mobile applications either separate or same

I would like to ask an architect based question What is more secure and most standard way to follow.For let's say a mobile application, Should the Api for mobile interaction with server be ...
1
vote
1answer
112 views

Method documents differs between Java docs and Android docs

Some times I see problematic differences between Java doc and Android doc in about method documents.For example in about setReadable (boolean readable, boolean ownerOnly) method you can see java doc ...
3
votes
2answers
1k views

Class becoming God Object what pattern to use

I am developing Android app and my MainActivity is becoming God Object. By the way native Activity class implementation is some sort of God Object already. The problem is that my activity class is ...
1
vote
2answers
167 views

Is ART an installation process? Or an OS? Or a virtual Machine?

When attempting to understand Android Runtime, I came across the wikipedia page. The graphic shown there adds to my confusion. If .dex is getting converted entirely to ELF, why is ART needed anymore? ...
0
votes
1answer
86 views

Android, access 1 activity from 2 cases, what design pattern is this?

I'm developing an Android app, encounter this case. There are 2 ways we can enter an activity (named activityB): either from activityA or from notification. 1st case: ActivityA -> activityB 2nd case:...
0
votes
1answer
161 views

Use GPL code in commercial android app by spawning a separate process [duplicate]

As I understand, GPL allows use of a GPL program along with a proprietary program as long as they are separate programs and communicate at arms length. In order to do this, if I spawn a process from ...