[android-developers] Please help me how to auto refresh every seconds my xml file list activityv from my UI

2012-09-05 Thread jal
Dear all,

Please help me how can I auto refresh my application here's my code 

package com.show.insaforexquotes;


import java.util.ArrayList;
import java.util.HashMap;



import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ListAdapter;
import android.widget.SimpleAdapter;





public class Activityinstaforexquotes extends ListActivity {
  
 // All static variables
static final String URL = url;
// XML node keys
static final String KEY_item = item; // parent node
static final String KEY_symbol = name;
static final String KEY_BID = middlename;
static final String KEY_ASK = surname;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_activityinstaforexquotes);

ArrayListHashMapString, String menuItems = new 
ArrayListHashMapString, String();

quotesXMLParsing parser = new quotesXMLParsing();
String xml = parser.getXmlFromUrl(URL); // getting XML
Document doc = parser.getDomElement(xml); // getting DOM element

NodeList nl = doc.getElementsByTagName(KEY_item);
// looping through all item nodes item
for (int i = 0; i  nl.getLength(); i++) {
// creating new HashMap
HashMapString, String map = new HashMapString, String();
Element e = (Element) nl.item(i);
// adding each child node to HashMap key = value
map.put(KEY_name, parser.getValue(e, KEY_name));
map.put(KEY_middlename, parser.getValue(e, KEY_middlename));
map.put(KEY_surname,  parser.getValue(e, KEY_surname));

// adding HashList to ArrayList
menuItems.add(map);
}

// Adding menuItems to ListView
ListAdapter adapter = new SimpleAdapter(this, menuItems,
R.layout.showquotes,
new String[] { KEY_name, KEY_middlename, KEY_surname }, new int[] {
R.id.namel, R.id.middlename, R.id.surname });

setListAdapter(adapter);
  }
 } 
 
  How can I put the method of auto update every seconds like time in my 
application please help me thank you... I'm a newbie here :) 
 
  




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Please help me how to auto refresh every seconds my xml file list activityv from my UI

2012-09-05 Thread jal
hi! yeah I already use it Android Timer but didn't work.. 

On Thursday, September 6, 2012 1:54:16 AM UTC+8, TreKing wrote:

 On Mon, Sep 3, 2012 at 4:44 AM, jal jo...@zetaol.com javascript:wrote:

 How can I put the method of auto update every seconds like time in my 
 application please help me thank you... I'm a newbie here :) 


 Try a Google search for Android Timer.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
 transit tracking app for Android-powered devices



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Please help me how to auto refresh every seconds my xml file list activityv from my UI

2012-09-05 Thread jal
hi.. please can you give me some example and directions .. thank you very 
much...

On Thursday, September 6, 2012 12:25:07 PM UTC+8, Elvin BT wrote:

 create your own timer class

 On Thursday, September 6, 2012, jal wrote:

 hi! yeah I already use it Android Timer but didn't work.. 

 On Thursday, September 6, 2012 1:54:16 AM UTC+8, TreKing wrote:

 On Mon, Sep 3, 2012 at 4:44 AM, jal jo...@zetaol.com wrote:

 How can I put the method of auto update every seconds like time in my 
 application please help me thank you... I'm a newbie here :) 


 Try a Google search for Android Timer.

 --**--**
 --**---
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
 transit tracking app for Android-powered devices

  -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Please help me how to auto refresh every seconds my xml file list activityv from my UI

2012-09-05 Thread jal
hi.. please can you give me some example and directions .. thank you very 
much... 

On Thursday, September 6, 2012 12:25:07 PM UTC+8, Elvin BT wrote:

 create your own timer class

 On Thursday, September 6, 2012, jal wrote:

 hi! yeah I already use it Android Timer but didn't work.. 

 On Thursday, September 6, 2012 1:54:16 AM UTC+8, TreKing wrote:

 On Mon, Sep 3, 2012 at 4:44 AM, jal jo...@zetaol.com wrote:

 How can I put the method of auto update every seconds like time in my 
 application please help me thank you... I'm a newbie here :) 


 Try a Google search for Android Timer.

 --**--**
 --**---
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
 transit tracking app for Android-powered devices

  -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Please help me how to auto refresh every seconds my xml file list activityv from my UI

2012-09-05 Thread jal
I use asyntask with an handler Timer but didn't work ... - nothing happens 
in my application. sir can you give some example and directions. Thank you 
very much if you help me. :)

On Thursday, September 6, 2012 1:19:09 PM UTC+8, TreKing wrote:

 On Wed, Sep 5, 2012 at 11:12 PM, jal jo...@zetaol.com javascript:wrote:

 hi! yeah I already use it Android Timer but didn't work.. 


 What didn't work?


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
 transit tracking app for Android-powered devices



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en