Questions tagged [android]

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

140 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
60 views

Discrete slide mechanism (with average rating display) for liking posts on a social network app

I'm thinking about implementing a "liking" mechanism for a social network app (using Parse) whereby users select a value from a discrete slider beneath each post. The slide would range from 0-5 and ...
1
vote
0answers
59 views

Designing transport service app in Android

I am new to this SE and so bear with me. Sorry for the long post. But this much info is needed to explain ! Background: I am student and working in one science institute. Our university has bunch of ...
1
vote
0answers
63 views

Make methods shorter when parsing Firebase data

I have a simple parsing method from firebase. How i can do it smaller?The fact is that after the data is changed I will need to update my View so that the code can be added, which also does not sound ...
1
vote
0answers
33 views

WiFi controlled car code for android - improvements?

This is my android code for wifi controlled car (that use to be a RC car) I have couple of ideas on improving it, but I am not sure if I can explain it properly, but I will try. Should I add a ...
1
vote
0answers
123 views

BDD on Android with Kotlin

I am considering an approach fo BDD tests on Android. The sample app — a simple messenger — has been made in Kotlin, so will be the tests. I ended up with something like this : ...
1
vote
0answers
3k views

Filtering listview results when spinner values get selected

I have 3 spinners in my project named standard, division and age. They contain values from json data. When I select a value from each individual spinner it shows all data of students in a listview who ...
1
vote
0answers
22 views

Android app that makes certain actions in response to the state of toggles

I've written an Android app using Android Studio that, when the main switch is enabled, toggling other switches or pressing a radio button calls a certain script. I'm familiar with Java itself, but I'...
1
vote
0answers
158 views

Sync SQLite databases using threads and a Service

I have an Android app that collects data in n number of SQLite databases. The user decides the value of n in runtime. A Service is in charge of sending that data to our server. We used to do this with ...
1
vote
0answers
82 views

Collecting a user's Stripe information

I am new to both asynchronous programming and Android development. I am allowing the user to sign in with either their email/password or their Google account. Upon successfully signing in, the user's ...
1
vote
0answers
2k views

Highlight selected item in GridView

This code displays images in a GridView. It allows the user to select an item at which point a custom checkbox is checked and the area around the image is highlighted a different color. (The image ...
1
vote
0answers
362 views

Combination of Java's Future and Android's AsyncTask

My goal is create a class which implements Future interface of Java (get, cancel, isDone...), yet provides callback like ...
1
vote
0answers
2k views

Android Login Screen implemented in Model-View-Presenter Pattern

So this is my first time implementing the MVP pattern in Android. As I understand the presenter should not contain any Android specific code. I am using ...
1
vote
0answers
139 views

Android Internal Resource Reader

I'm not really sure if this is right, so it would be great to have it reviewed. I'm creating an Android library and made a final class with completely static methods for getting internal resources (...
1
vote
0answers
120 views

Hde keyboard when pressing outside EditText

I am using the following method to hide the keyboard when the user touches outside edit text. I am passing most top view into my method ...
1
vote
0answers
1k 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 ...
1
vote
0answers
180 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. ...
1
vote
0answers
405 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 ...
1
vote
0answers
474 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. ...
1
vote
0answers
77 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 ...
1
vote
0answers
3k views

Loading autocomplete text view adapter dynamically using async task in Android

I am working on an app in which I need to get destination list from server and set it in autocomplete text view. I am using text watcher and on its onTextChanged event I am fetching destinations data ...
1
vote
0answers
57 views

Restarting properly

I have an activity with a timer in it, which starts an activity when the timer goes down. Before, when onPause() would get called after a phone call, my activity ...
1
vote
0answers
2k views

Repository pattern best practices

Which option is better? In the first case, I use a universal repository that can work with any entities. The methods of this repository have many parameters, such as string queries, table names, ...
1
vote
0answers
2k views

Simple WebView with embedded videos (Youtube, Vimeo Etc…), and some more features

I tried to create a very simple Webview with embedded video's in it, that can change to vertical and not reset to its default when changed to vertical or vice versa, even tho its working just fine I'm ...
1
vote
0answers
66 views

Calculating Net Rate and Total based on text change

I am using Text Watcher for Rate and Making(Charges) which are my edit text fields on text change I am Calculating the Net Rate and Total. There are two conditions here: I am fetching values from my ...
1
vote
0answers
1k views

Dice rolling swipe Android app

So I've got an Android app where if you swipe in a particular direction (UP, DOWN, RIGHT, LEFT), the dice move in that direction using TranslateAnimation. This is ...
1
vote
0answers
77 views

Passing the name of a class to the UI

I've extended FragmentPagerAdapter but reading the example implementation automatically generated by Android Studio's "tabbed application" preset, ...
1
vote
0answers
549 views

Track user's location and broadcast over Pusher

I am trying to track the user's location and transmit it periodically via Pusher (real time data service, pusher.com). I am using Google Play Services for location handling. I need the location ...
1
vote
0answers
388 views

Getting device's location once in Android

In my Android app I need to get device's location once after user clicks a button. I don't really need to keep updating localization after I get the location coordinates. I created a class which uses ...
1
vote
0answers
2k views

Android calculator app

I am new to android developement. Created calculator application. Want to improve my code quality. Will be helpfull for any advice to make the code better and more professional (overall structure, ...
1
vote
0answers
148 views

Android: accessing global data through replaceable instance

I have to access global data shared between activities in Android application. I have simplified DataProvider class to contain only one field - ...
1
vote
0answers
117 views

Simultaneous works with multithreading

I have a case-study for an Android interview. I just wanted to get your opinion before I share the code with the company. There are two fragments: one of them uses a thread-callback structure and the ...
1
vote
0answers
2k views

Android app with an ActionBar, a ViewPager and an AsyncTask

I'm new at Android and Java development and I've put together a demo app to start learning, which is made of: a main activity extending ActionBarActivity, in which ...
1
vote
0answers
77 views

Enhancement to Trezor library for Android

I'm only asking because I'm new and don't know enough to have a concrete question. Did I do this correctly? I worked on this until the code performed as expected, but I don't think I'm done. In ...
1
vote
1answer
41 views

Android RecyclerView Popop Activity - 5 second popup time

So I've been working on a RecyclerView recently that's in a popup, and it takes a few seconds to popup with around 100 items. I want to make this faster, so any improvements on my code is appreciated :...
0
votes
1answer
27 views

Decrypt multiple 10Mb files with defined password

One operation of my Android project is to decrypt one file (chosen in a set of ~30 files for pagination1) of ~10 Mb each and I do this with the following: ...
0
votes
0answers
21 views

Load data from server to populate in spinner

I'm learning ROS and I'm trying to populate data from my server to spinner. my JSON is: ...
0
votes
0answers
33 views

Adapter for Spinner

I need to my spinner supported endless scrolling. As rule the user will have only 1 - 5 items but in very rare cases some users can have 100+ items that will be loaded from server by pages (15 per ...
0
votes
0answers
65 views

Android - Notification service to handle background notification

PREMISE: I have zero knowledge of Java and Android development. I put this together in a couple of weeks. The code works. But I look forward to some feedback and to know how I can improve it. ...
0
votes
1answer
1k views

Loop to check isNullOrEmpty then setVisibility & setText

My code below is working fine but I know it can be done more efficiently using a loop. I'm checking the VAL (such as description, ingredient2, etc.) which are Strings from my SQL lite Db to see if ...