problem accessing run( ) in android

by Rahul » Thu, 22 Apr 2010 18:59:01 GMT

Sponsored Links
 i i have a problem accessing run() method in my program. The rum
method is not getting focus at all. The Log message that is present
outside the loop is getting displayed and i am getting a blank screen
with preset background.Here's the code...

public class MusicListActivity extends Activity {
List<HashMap<String, String>> songNodeDet = new
HashMap<?,?>[] songNodeWeb;
XMLRPCClient client;
String logInSess;
ArrayList<String> paths=new ArrayList<String>();
public ListAdapter adapter ;
Object[] websongListObject;
List<SongsList> SongsList=new ArrayList<SongsList>();
Runnable r;
ProgressDialog p;
ListView lv;

public void onCreate(Bundle si){

r=new Runnable(){

public void run(){


} catch (MalformedURLException e) {
// TODO Auto-generated catch block
} catch (XMLRPCException e) {
// TODO Auto-generated catch block
Log.e("***","process over");

protected void onResume() {
// TODO Auto-generated method stub


public void webObjectList(Object[] songListObj) throws
songNodeWeb = new HashMap<?,?>[songListObj.length];

for(int i=0;i<songListObj.length;i++){
String nodeid=(String) songNodeWeb[i].get("nid");

HashMap<String,String> nData=new HashMap<String,String>();
HashMap<?,?> songNode=(HashMap<?,?>)nodeget;
String title=(String) songNode.get("title");
String album=(String) songNode.get("album");
String artist=(String) songNode.get("artist");

nData.put("title", title);
nData.put("album", album);
nData.put("artist", artist);

Object[] songObject=(Object[])songNode.get("title_format");
HashMap<?,?>[] songDetails=new HashMap<?,?
songDetails[0]=(HashMap<?, ?>)songObject[0];
String path=(String) songDetails[0].get("filepath");

if(path.contains(" ")){
path=path.replace(" ", "%20");

String songPath=""+path;
nData.put("path", songPath);
Log.e("my path",path);
SongsList songsList=new SongsList(title, album,

Log.e("paths values",paths.toString());

public void list()
{ Log.d("#####"

problem accessing run( ) in android

by krox » Fri, 23 Apr 2010 02:42:16 GMT


Just took a really quick look but AFAICT you try to start the runnable
r from getSongs() but getSongs() is only called from the runnable r,
hence a moment 22. So you probably have to start the runnable r from
onCreate()/onStart() as well (however AFAICT you gonna end up in a
loop calling getSongs() over and over again). But as I said I only
took a really quick look and might have overlooked something....


On Apr 22, 12:58pm, Rahul <> wrote:

Sponsored Links

Other Threads

1. SQLite encryption of file storage

I've been thinking of writing a "secret storage" system for Android --
does such a thing already exist?  I've used Zetetic's open-source
Strip tool for many years on PalmOS, and found it handy, so I'd like
to have something like that on Android.

Ideally, I would use SQLite databases to store the info, but it seems
that there's no way to encrypt those database files.  This is a huge
security hole.  SD card storage of course can be compromised, but even
on-device storage is available to a sophisticated attacker who
actually has the physical phone.

I see that a ticket was opened about this in Feb 2008, but apparently
closed shortly thereafter with a somewhat short-sighted analysis of
the security problem.  Would it be futile to re-open such a ticket?
Does anyone else have a solution to this?

2. what is a suitable upper limit for application size?

The tourism related app I am completing has about 250 images for a
total of maybe 15MB.

I;d like to add another 100 or so images but sometimes I get an
'Insufficient storage' error message and have to restart the emulator.
That in itself isn't so bad a problem but now I'm wondering about
practical limits for real devices.

Anybody know large can I make my app assuming I wouldn't want to to
use up more than perhaps 25% of a user's discretionary storage?

3. pxafb

4. Nexus One - Please make available as DEV phone, so non US dev's can buy/support apps

5. Active Activity?

6. OpenGL; GL11.glDrawTexiOES does not seem to work for Nexus One

7. The Android display on beagleboard doesn't show