Questions tagged [android]
Android is Google's software stack for mobile devices. For non-developer questions, see http://android.stackexchange.com
798
questions
3
votes
2
answers
9k
views
Optimizing mass inserts into SQLite
I am trying to optimize inserts from a returned JSON which contains data from multiple tables on the remote server. My code is working, but I just want to figure out a way for it to work better. I ...
2
votes
3
answers
7k
views
Small Android AsyncTask project
I created a small Android project with an AsyncTask. It simulates a time consuming task.
Please review my code and tell me what you would do on a different way and why. Comments not specific to ...
3
votes
1
answer
5k
views
Efficient implemetation of AlertDialog callback in Android
One day I realised that my Android project utilizes AlertDialogs here and there in very ineffective way. The heavily duplicated portion of code looked like this (actually, copied and pasted from some ...
3
votes
2
answers
9k
views
HttpClient error handling
I would be happy to hear feedback on my implementation of HttpClient. I am not so strong with error handling so I want to improve. My thought process behind this was that ...
2
votes
1
answer
3k
views
Fast image binarization on Android
I'm working on an application that turns a raw camera image into a binary (pure black/white) image and I need this to happen as fast as possible for swift further processing. This is what my code ...
8
votes
4
answers
3k
views
Poker game classes
I've built this two classes for a Poker game on Android and I would appreciate some feedback on my code.
Have no mercy. The harsher you are, the better.
Feel free to add your number of WTFs/minute.
...
3
votes
1
answer
5k
views
AsyncTask, Android, and SQL
I originally posted this in stackoverflow.com but the question may be too broad. I'm trying to figure out the best way to download and use an SQL database from my server. I have included the code i ...
6
votes
5
answers
2k
views
Anonymous Classes for Listeners
While working with Android GUI my approach to adding Listeners for GUI elements is usually:
...
2
votes
1
answer
371
views
Android SwitchedService class design, for cases where you want to start/stop a service from BroadcastReceiver
I could use some feedback on the class I designed for the above purpose, the complete code is here:
https://github.com/tom-dignan/android-switched-service/blob/master/src/com/tomdignan/android/libs/...
8
votes
1
answer
27k
views
Optimize JSON insertion to SQLite (insert ... on duplicate key ignore)
In current task, I'm refactoring the code of converting JSON file into SQLite database on Android device. Code compliant with Java 6.
As a benchmark, grabbing the code from remote server takes ...
3
votes
1
answer
172
views
Allowing simplified browsing of websites with a predictable URL structure
The code below has been a pet project of mine for some time. It allows simplified browsing of websites that have a predictable URL structure, namely TGP websites.
It has been greatly modified from ...
3
votes
1
answer
209
views
Static variable Current in Application
I was finding myself frequently calling getApplication() and casting it as MyApplication so that I could call a method in ...
27
votes
3
answers
32k
views
Reusing StringBuilder or creating a new one? [closed]
Given that it is better to reuse objects than create new ones when developing with Android, is it worth while deleting the contents of a StringBuilder and reusing ...
3
votes
2
answers
3k
views
Extracting Android contact Info
I am new to Android programming and I'm working on an Activity in an app that will plot the location of contacts from a specific email account on to a map. The following is what I in a class that the ...
8
votes
2
answers
33k
views
Secure AES encryption and decryption in Android [closed]
Is this implementation of AES for Android safe? Is it 128 bit encryption? How can I strengthen this implementation? Please help me, all suggestions are welcome :)
...