Questions tagged [android]
Android is Google's software stack for mobile devices. For non-developer questions, see http://android.stackexchange.com
798
questions
7
votes
1
answer
551
views
Optimizing code from spectral subtraction algorithm
This is part of the code from a spectral subtraction algorithm. I'm trying to optimize it for Android.
Matlab code:
...
2
votes
1
answer
5k
views
Get int array from database Cursor
I find this code quite ugly, but in fact, I can't find a finer way of achieving the goal.
...
1
vote
1
answer
960
views
Bash script for reverse-engineering Android applications
I'm new to bash scripting and need some help improving a script I made for working with reverse-engineering Android applications.
I wrote comments in the script itself to explain what I want to do. ...
2
votes
1
answer
129
views
What about percentage usage?
I'm thinking about the usage of percent, example, in margins.
We can use overlay to separate our layout by DPI sizes, but why can't we use percentage?
Something like that:
...
3
votes
2
answers
174
views
Pending method invocation for a game
I need to do pending methods invocation in Java (Android) in my game project. A method represents actions in a scene.
Maybe you're familiar with ...
3
votes
2
answers
3k
views
Download Progress Calculator
Here is my progress calculator class. It is used for downloads/uploads. It takes bytes in and calculates the percentage(to the nearest 5%) that should show on a progress bar. Please let me know how I ...
3
votes
1
answer
9k
views
Basic android calculator
So this is my code and I would like to add subtraction, multiplication and division. If you have any suggestions on algorithms to use I would be very happy to see it. I do not wish to copy the code, I ...
1
vote
1
answer
6k
views
MVC in Android development for Bluetooth application
I am currently writing my first Android application, and am having trouble grasping how to structure it. From my previous programming experience I was planning on using a MVC design but now I don't ...
3
votes
1
answer
6k
views
Efficient Album Cover loading for ListView
I have a list view which display in each view a Album's name, the associated Artist and the album art.
Here is the code of my ListFragment which display this list:...
1
vote
1
answer
159
views
Thread Safe Server Querier
I wanted to make a class that connects to my server and returns a value, a URL in this case. As Android 4.0 doesn't let me run network task on the main UI thread (rightly so) I have made this.
Please ...
2
votes
1
answer
4k
views
Android Bluetooth device application
I am writing my first Android application and have mainly been using code examples online. However, I have been going hard at it for a while now and realize that I have some overlapping methods and ...
2
votes
1
answer
136
views
Nice way to using cast on TextView [closed]
Question is short. Assuming that I don't need reference itself, would this cast
((TextView) findViewById(R.id.someTextView)).setText("lala");
be better (or at ...
1
vote
1
answer
2k
views
Getting user's current location
I am trying to get user's current location base on the accuracy and less battery consumption.
Please review my code to help determine if I am going in right direction.
...
1
vote
2
answers
4k
views
I am trying to manually serialize an android.Bundle. Any thoughts on the implementation?
I wrote this because I need to store an unknown bundle to a database. Most everyone suggested to Parcel it. The problem is the android docs specifically say not ...
3
votes
2
answers
1k
views
BigDecimal code critique
I'm teaching myself BigDecimal and would appreciate a critique. In the code fragment below, I calculate a tip from user input: check and tip percentage (entered as integer):
...