Skip to main content

Questions tagged [android]

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

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 ...
cmac147's user avatar
  • 33
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 ...
androrider's user avatar
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 ...
Stan's user avatar
  • 211
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 ...
jiduvah's user avatar
  • 433
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 ...
Overv's user avatar
  • 1,972
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. ...
bughi's user avatar
  • 315
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 ...
Nicholas's user avatar
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: ...
check123's user avatar
  • 163
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/...
Thomas Dignan's user avatar
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 ...
Marek Sebera's user avatar
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 ...
JoeD's user avatar
  • 31
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 ...
John Stanfield's user avatar
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 ...
Christopher's user avatar
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 ...
Chillie's user avatar
  • 289
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 :) ...
caw's user avatar
  • 91

15 30 50 per page