Android is Google's software stack for mobile devices. For non-developer questions, see http://android.stackexchange.com

learn more… | top users | synonyms

0
votes
0answers
15 views

Check fragment for exclude show same fragment again

I use this code to check a fragment before showing it. What can you say about it? ...
-3
votes
0answers
18 views

Android app - Endoscope wifi live video streamer [on hold]

Endoscope allows you to fast link two android devices and stream live video from camera one device to another. Video stream is over Wi-Fi. One device hosts live stream and another connect to it. ...
2
votes
0answers
32 views

Randomizer App as Decision Maker

I am a newbie and self taught in programming. This is my first attempt to make app. Appreciate any input or comment to make my code writting skill better. https://github.com/snufflesrea/Decision-...
1
vote
0answers
25 views

Counter with increment and decrement buttons

For my first Kotlin project, I'm implementing the Redux pattern with simple Increment and Decrement buttons and a text view to display the current value. My main questions have to do with Kotlin and ...
5
votes
3answers
447 views

Does this method contain multiple implementations?

My teammate and I have a small discussion about the responsibility of a method. He thinks next method has two responsibilities and I think that only one. ...
0
votes
1answer
39 views

Android music-streaming app

This is my first time building an Android app or even using Java in the first place. All of this code does work, but I'm hoping to optimize it or find out if things could be done more easily than how ...
0
votes
0answers
30 views

Loading, saving and merging google-play saved games

I've written a class that handles all communications with the Google Play services. This class is meant to perform two main tasks, loading and saving a SQLite database to and from Google Play Games, ...
2
votes
0answers
35 views

Easily add Accessibility to your app as an afterthought. Yes, as an afterthought

Accessible apps allow more users to use your app; however, it is usually an afterthought for developers, and it makes your XML layout files messy whether Accessibility was a forethought or ...
4
votes
1answer
100 views

Using a LinkedList type of adjacency list to create the word game: WordLadder

Goal The user puts in a starting word and an ending word. My code creates a ladder between these words of words that are different by one letter. Start: gain End: fire Output: gain gait wait wart ...
2
votes
1answer
51 views

Android network API request

I often use a similar scheme work with an API project. Can it be made easier, or is there a standard approach? This class creates an API request: ...
3
votes
1answer
79 views

An app that uses the quadratic formula to solve ax^2+bx+c=0 so long that the answers aren't imaginary

I'm a beginner to Java and Android programming, and I wrote this app in order to get some practice. It works, but it's most likely not as good or efficient as it could be, since I'm new. I'm hoping to ...
4
votes
1answer
61 views

Card payment strategies

In my project, I have 3 payment mode. Via Manually Entered , Card Swipe, and cash. I have 2 fragments named RecordCardManuallyFragment and ...
1
vote
0answers
87 views

Full screen WebView Android app

I've created a working Android app for my project website. I'm newbie too android dev so please review the code of this app. Any simplification or suggestion to optimize it much appreciated. Thank ...
2
votes
1answer
39 views

Continuously execute runnables on the UI thread

I need to run a sequence of runnables on the main (ui) thread with a given delay between them indefinitely until signalled to stop. Code: ...
2
votes
1answer
65 views

Interactive Android AppWidget collection to populate activity on click

I recently developed my first appwidget for Android, and it works really nice. I basically created a collection widget and use a Loader to retrieve the data from a database, and when a user clicks on ...
1
vote
1answer
57 views

Tight coupling in using call back method

I am using below code and for result i am using interface for call back purposes. ...
1
vote
0answers
92 views

Code that checks input for calculator app

I made an Android app, a calculator, that uses buttons for input, Android keyboard is turned off. I have a block of code, that handles the input to string and checks for some things at the same time. ...
3
votes
0answers
33 views

Animation for android ImageViews acting as game pieces

My question is about how to achieve a well-performing animation for a set of ImageViews, so that the foreground fades away and the background stays the same. ...
-2
votes
0answers
50 views

Evaluation of SOAP and REST based code for Expressitivity

Currently I am doing a project for my Master's thesis and have to evaluate web service standards for Web of Things applications(Real-time Patient Monitoring System). Below is code I have written in ...
0
votes
1answer
53 views

Square ImageView

This is good practice, to make square image? Side of the square container is equal to its width. ...
1
vote
1answer
79 views

Retrieving location coordinates from SQL database and plotting on a map android Gmaps

I am new to Android development. I am currently working on an Android app that fetches changing location coordinates from a SQL database, and plots on a Map view at regular intervals. But I think this ...
1
vote
1answer
87 views

Logging in to Android application using Firebase

I currently have an app that uses Firebase for logging users in and I would like to know if I can make this code any better. I currently have 4 files: auth/models/User.java auth/BaseActivity....
1
vote
2answers
84 views

Populating a Fragment/Activity dynamically on Android gets ugly

So here is the ugliest fragment of my application, I tried to reformat as much as I could but I think it's still pretty ugly. Basically, I'm trying to use an API call to receive JSON which tells me ...
0
votes
0answers
41 views

Calculate point on scaled, translated and rotated canvas

I've got the following two methods, written for xamarin: ...
1
vote
2answers
97 views

Properly structuring SQLite classes/operations in Android

I am new to Android development and I want to ensure I'm learning decent practices for doing things. Right now this is my database class, which currently allows me to make a new instance of the ...
0
votes
0answers
30 views

3 data related RecyclerViews, each in one page of ViewPager

I have ViewPager with 3 tabs. In each of them is one RecyclerView. Each of the RecyclerView ...
5
votes
1answer
158 views

Simple Background Thread Worker Class (follow-up)

This is a follow up of Simple, generic background thread worker class What changed? Moved from synchronized lazily evaluated static instances to true Singletons per the on-demand holder idiom https:...
3
votes
1answer
67 views

Using generics to find a View by Class

This works but feels clunky - any suggestions for improvement? ...
1
vote
0answers
70 views

Paho MQTT client in Android that has to be accessed in multiple activities

I am having an app that has multiple activities and uses MQTT. I am using the Paho client in Gradle dependencies as follows: ...
2
votes
0answers
36 views

Class for serializing generic gson objects

I realized I had just created two classes that were virtually identical for simply saving objects to their own json files, so I've attempted to make it more generic. My only noticeable problem is ...
1
vote
0answers
42 views

Get vertical acceleration from rotation vector and accelerometer values

My goal here is to calculate the acceleration towards the ground, which I call "vertical acceleration". This seems to be working OK for the most part, except when there is a lot of rotation going on ...
4
votes
1answer
79 views

Simple, generic background thread worker class

While I'm not aiming for a drop-in replacement for AsyncTask, I would like a utility class that accomplishes some of the same goals. Considering the criticisms of <...
2
votes
1answer
88 views

Custom countdown timer class to replace the Android CountdownTimer

This project was made to replace the stock Android CountdownTimer class. It is more responsive when completing the timer and adds additional functionality such as ...
5
votes
2answers
370 views

Android splash screen

I have implemented a splash screen, to hold/pause the screen for few seconds and then launch the next screen. I am very enthusiastic to know if there is a more basic way to write the code. ...
5
votes
1answer
66 views

CountDownTimer that responds to clicks

The app: Creates CountDownTimers and displays them in a simple layout. The user can choose how long the timer should be through SharedPreferences and a settings activity. Each timer has a preparation ...
1
vote
0answers
49 views

Check if registered then unregister or simply unregister

I am trying to figure out which of these two calls are more efficient: Check if listener is registered before calling unregister. ...
3
votes
1answer
146 views

AsyncTask method

Even I know that this isn't a good way of writing code, but I need to improve this. Here I am retrieving data from Server in Json format by Posting some variables in doInbackground. Getting all the ...
3
votes
1answer
69 views

Android login system

I am completely unaware of all the Android features and available libraries. I just designed a login system to practice it. I have referred to a few books and tutorials. Layout I am using relative ...
0
votes
1answer
49 views

Getting data with RxJava and retrofit

I am using RxJava with retrofit to get data from an API then filtering the data with a for loop in the onNext Method. Is there ...
1
vote
0answers
33 views

Handle GCM registration tasks

I have implemented Google cloud messaging in my mobile app following the Google docs. It seems I have a lot going on in my MainActivity class at this point. I'm ...
2
votes
0answers
37 views

Few DatePickers and TimePickers in Android activity

I'm developing an Android activity which asks user to enter start and end dates and times in order to know a certain period of time. After picking start date, user picks start time, and then he/she ...
6
votes
1answer
497 views

Login UI for an Android app

This code starts a new thread for login and reacts according to the JSON result returned by the server. I think this code has too many conditionals, exception handlers, and nested functions. ...
4
votes
2answers
68 views

Async Task with multiple requests in android

I am using this AsyncTask class to update two different tables on SQL Server. So far this code works fine, I'm interested in a better and more sufficient code ...
2
votes
0answers
38 views

Retrieving the most recent posts from the users someone is following

I have two different implementations for retrieving posts from the users someone is following and I want to know which one you would recommend using. First I'll show you the tables, and then the two ...
3
votes
0answers
53 views

Getting contacts from phone is taking too much time

I am working on an instant chat messaging application. I am getting contacts from phone and displayed them in list view of an activity, but it is taking 25-30 seconds using the following code: 1. On ...
0
votes
0answers
32 views

Filtering based on actions and keywords

I have an Android function that when an intent is passed, it filters based on the actions and keywords. How can I improve this function? ...
3
votes
1answer
129 views

Sudoku Android Code

I have been programming for a long time, but nobody has given me any feedback if my code is good or not. Please review it, and give me feedback where I could be better. The source code is also on ...
1
vote
1answer
68 views

DBSCAN in C++ for general and Android use

I've implemented a templated DBSCAN for general use. At the moment, it's going to be used on Android through the JNI. I used Wikipedia's pseudocode and a little bit of the DBSCAN paper for reference. ...
5
votes
2answers
114 views

StopWatch app in android

Activity ...
4
votes
1answer
54 views

Pulling from data from SQLite DB on Android

Apart from merging the 2 get methods, what else can I do to optimise this? Both input and output cannot be changed. Is there a way to iterate a map while writing to it? ...