[android-developers] Re: Custom List layout with checkbox selection problem

2011-02-22 Thread cool.manish
I am also facing same issue. Let us say there are 15 items in the
listview and at a time it is didplaying 5 item. Then if i select first
titem and scroll i get to know that 6th and 11th items are also have
check box as selected.

Please help us to solve this issue.

On Jan 29, 7:02 pm, javaxmlsoapdev vika...@gmail.com wrote:
  have ContactListActivity class as below
 public class ContactListActivity extends ListActivity{

        @Override
        public void onCreate(Bundle icicle) {
                super.onCreate(icicle);

           getListView().setFocusable(true);
           getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

           String[] from = new String[]
 {ContactsContract.Contacts.DISPLAY_NAME,ContactsContract.Contacts.HAS_PHONE­_NUMBER,ContactsContract.Contacts._ID};
           int[] to = new int[] {R.id.name};

           ContactListCursorAdapter adapter = new
 ContactListCursorAdapter(getApplicationContext(), R.layout.listview,
 getCursor(), from, to);
           setListAdapter(adapter);

        }

 Where ContactListCursorAdapter looks as below
 public class ContactListCursorAdapter extends SimpleCursorAdapter{
        private Context context;

     private int layout;
    private Cursor c;

    public ContactListCursorAdapter (Context context, int layout,
 Cursor c, String[] from, int[] to) {
        super(context, layout, c, from, to);
        this.context = context;
        this.layout = layout;
        this.c = c;
    }

  @Override
    public Cursor runQueryOnBackgroundThread(CharSequence constraint)
 {
        String[] projection = new String[] {
                        ContactsContract.Contacts.DISPLAY_NAME,
                        ContactsContract.Contacts.HAS_PHONE_NUMBER,
                        ContactsContract.Contacts._ID
        };

        return
 context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,
 projection, null, null, null);

    }

 }

 listview xml looks as below
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
 android
                android:layout_width=fill_parent
                android:layout_height=fill_parent
                android:orientation=horizontal
        TextView
                android:id=@+id/name
                android:layout_width=wrap_content
                android:layout_height=wrap_content
                android:textSize=25sp/
        TextView
                android:id=@+id/number
                android:layout_width=wrap_content
                android:layout_height=fill_parent
                 android:layout_below=@id/name
                android:layout_alignBottom=@id/number
                android:textSize=15sp/
        CheckBox android:text=
        android:id=@+id/checkBox
        android:layout_width=wrap_content
        android:layout_height=fill_parent
        android:layout_alignRight=@id/name
        android:layout_alignParentRight=true/
 /RelativeLayout

 My contactlistwith checkbox is prepared correctly. however when Icheckan item 
 from thelist(usingcheckbox) and then continuing
 scrolling up or down, it checks/selects other items(randomly) as
 well. I think first chekecked item's id is preserved and everytime it
 creates newviewand selects/checks other items with same id or
 something? When I uncheck any of those indirectly selected items it
 unselcts all of them together. Strongly it appers to be an id issue?

 Thanks,

-- 
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


[android-developers] Setting filter on List using Text Watcher

2011-02-22 Thread cool.manish
Hi All,

I have a ListView, which is having data in the form of HashMapString,
String. I am populating the list as

SimpleAdapter adapter = new SimpleAdapter(ctx, myData,
R.layout.my_layout, keys, ids));
listview.setAdapter(adapter);

In my_layout.xml, I have set 2 TextViews(which will be the row of the
listview). So the list row will look something like

Abc AbcData
Xyz  XyzData

Now, I want to include text filter this list. For this I have impleted
TextWatcher,

private TextWatcher filterTextWatcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count,int
after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before,int
count){
adapter.getFilter().filter(s);
}
@Override
public void afterTextChanged(Editable s) {
}
};
@Override
protected void onDestroy()
{
super.onDestroy();
filterText.removeTextChangedListener(filterTextWatcher);
}

The filter is working ok. But the problem is I am getting 2 rows for
each search. Say if I type 'A' I am getting 2 rows(same content though
in the original list there is only one row)
Abc AbcData
Abc AbcData

I assume that it is filtering first on Text1(i.e. Abc) and then on
Text2(i.e. AbcData) and hence I am getting two rows.

So can anyone advise how should I tackle this problem and get only one
row.

Thanks in advance,
~Manish.

-- 
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


[android-developers] Re: Custom List layout with checkbox selection problem

2011-02-22 Thread cool.manish
Even if i maintain it by myself, i have to do same also in the list,
for display purpose. There should be some other way. I have seen one
property choice mode. I tried to set multiple choice in it. but it
didn't work for me.

On Feb 22, 8:36 pm, TreKing treking...@gmail.com wrote:
 On Tue, Feb 22, 2011 at 2:14 AM, cool.manish mannishga...@gmail.com wrote:
  I am also facing same issue. Let us say there are 15 items in the listview
  and at a time it is didplaying 5 item. Then if i select first titem and
  scroll i get to know that 6th and 11th items are also have check box as
  selected.

 You are suffering from ListView recycling. Search that term, there should
 be plenty of info. In short, you need to maintain an item's state (checked
 or not) yourself and update it as necessary.

 ---­--
 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


[android-developers] Re: How to display,exactly?

2011-02-21 Thread cool.manish
Create an variable of MapView.LayoutParams and set it as the
layoutParam of your overlay.

You can also use params.mode = MapView.LayoutParams.MODE_MAP; to
varied its location after panning or zooming

On Feb 21, 11:37 am, Abhilash baddam
abhilash.androiddevelo...@gmail.com wrote:
 Hi,

     In my app i can be able to display  maps with markers. When the user
 clicks on a particular marker, it will display the details of that
 particular location,
     but it display's details for every marker on the top the screen. I want
 to display exactly on the top marker. Hoe can i do this...?

-- 
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


[android-developers] Re: Changing tab background image

2011-02-20 Thread cool.manish
Thanks Mark. I did that but some time when coming back on this
screen(calendar), I want to hightlight one particular date grid cell
and i haven't grid cell object with me. because i want to click on
based on date and that particular date could be on any cell. I will
not be sure about the position.


 1. My tab is displaying some text which consuming more than the
 available space because of it on focused tab text is scrolling. I want
 to display this text as multiline. Is it possible?

[Mark]Use the version of setIndicator() that takes a View and design
your
own layout for the faces of the tabs.


Mark, in this thread you had suggested to use xml for the tab. I am
not sure how to maintain the color of textview at the the of selection
of a tab. I tried to create xml for state change but textcolor
property is not there and using background property giving exception.
As i was trying to set it in textcolor property of the textView.

?xml version=1.0 encoding=utf-8?
LinearLayout
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:layout_width=fill_parent
  android:layout_height=fill_parent
  android:padding=10dip
  android:background=@layout/mailbox_tab_bg_state

TextView
android:id=@+id/tabTxt
android:text=list view
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_gravity=center
android:textColor=@layout/tab_highligh
/TextView
/LinearLayout

selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_selected=true android:state_pressed=false
android:background=# 
/
/selector


On Feb 18, 6:00 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Feb 18, 2011 at 12:20 AM, cool.manish mannishga...@gmail.com wrote:
  as Mark told, we can't apply state change logic in btn. Is there any
  other way?

 Just set a new image when the button or whatever is clicked.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android 2.3 Programming Books:http://commonsware.com/books

-- 
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


[android-developers] Re: Changing tab background image

2011-02-20 Thread cool.manish
I am also not sure whats the color to display off white. which come
automatically on the tab when they are not the selcted tab.

On Feb 18, 6:00 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Feb 18, 2011 at 12:20 AM, cool.manish mannishga...@gmail.com wrote:
  as Mark told, we can't apply state change logic in btn. Is there any
  other way?

 Just set a new image when the button or whatever is clicked.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android 2.3 Programming Books:http://commonsware.com/books

-- 
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


[android-developers] Changing tab background image

2011-02-17 Thread cool.manish
Hi,

I want to change the tab image on enable and disable. I am trying to
use following xml. but it is not working

tabhost.newTabSpec(mailboxTabId).setIndicator(mailboxTabId,

getResources().getDrawable(R.layout.mailbox_tab_state)).setContent(mailboxIntent);

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_pressed=true android:drawable=@drawable/
icon_mailbox_reg / !-- pressed --
item android:state_pressed=false android:drawable=@drawable/
icon_mailbox  /
/selector

-- 
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


[android-developers] Re: Changing tab background image

2011-02-17 Thread cool.manish
Hi Mark,

Thanks for your reply. Its working.

I have some more queries:
1. My tab is displaying some text which consuming more than the
available space because of it on focused tab text is scrolling. I want
to display this text as multiline. Is it possible?

2. I have used a grid view in which every cell is a button. I want to
change the image on click of a button. I try to use same state as
mentioned in your reply. but it has not worked.

3. We have some need to display multiline text on Button and both line
having different font. We googled and find out it could be done using
HTML. is there any other way also?

On Feb 17, 6:51 pm, Mark Murphy mmur...@commonsware.com wrote:
 Try:

 selector xmlns:android=http://schemas.android.com/apk/res/android;
         item
                 android:state_selected=true
                 android:state_pressed=false
                 android:drawable=@drawable/icon_selected
         /
         item
                 android:drawable=@drawable/icon
         /
 /selector





 On Thu, Feb 17, 2011 at 8:48 AM, cool.manish mannishga...@gmail.com wrote:
  Hi,

  I want to change the tab image on enable and disable. I am trying to
  use following xml. but it is not working

  tabhost.newTabSpec(mailboxTabId).setIndicator(mailboxTabId,

  getResources().getDrawable(R.layout.mailbox_tab_state)).setContent(mailboxI­ntent);

  ?xml version=1.0 encoding=utf-8?
  selector xmlns:android=http://schemas.android.com/apk/res/android;
         item android:state_pressed=true android:drawable=@drawable/
  icon_mailbox_reg / !-- pressed --
         item android:state_pressed=false android:drawable=@drawable/
  icon_mailbox  /
  /selector

  --
  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

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 3.1 Available!- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] Re: Changing tab background image

2011-02-17 Thread cool.manish
 2. I have used a grid view in which every cell is a button. I want to
 change the image on click of a button. I try to use same state as
mentioned in your reply. but it has not worked.

I was creating a calendar and to display dates and displaying events
on a particular day on click of a day. i have used buttons. should i
use some other view. Image view or image button? or something else?
Will i be able to show display image for the clicked one.

 We have some need to display multiline text on Button and both line
  having different font. We googled and find out it could be done using
  HTML. is there any other way also?
Actually we want to create something like accordion. On click of
button one list will be open. on second click it will hide. For that
we have use it. Our requirement is to display two different
information(with different font size and color) on the button(or
someother view)

On Feb 17, 8:33 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Feb 17, 2011 at 10:26 AM, cool.manish mannishga...@gmail.com wrote:
  I have some more queries:
  1. My tab is displaying some text which consuming more than the
  available space because of it on focused tab text is scrolling. I want
  to display this text as multiline. Is it possible?

 Use the version of setIndicator() that takes a View and design your
 own layout for the faces of the tabs.

  2. I have used a grid view in which every cell is a button. I want to
  change the image on click of a button. I try to use same state as
  mentioned in your reply. but it has not worked.

 It's not supposed to. There is no built-in state for the button had
 been clicked sometime in the past century. If you want that logic,
 code it yourself.

 I am not quite certain why you are using buttons in a GridView in the
 first place, though. You will notice that the standard Android
 launcher uses a GridView without buttons.

  3. We have some need to display multiline text on Button and both line
  having different font. We googled and find out it could be done using
  HTML. is there any other way also?

 Use two separate TextViews, I suppose. I am having difficulty
 understanding your question.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 3.1 Available!

-- 
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


[android-developers] Re: Changing tab background image

2011-02-17 Thread cool.manish
Kostya, I know that textbox could be clicked, I wasn't aware that we
could give boundary to the textView.
Will it be useful in my case to change the image if it has been
clicked.

On Feb 17, 8:54 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Buttons are not the only widgets that can respond to clicks and can use
 a state drawable.

 A TextView would work too, and it's probably easer to make it look right
 (look up TextView.setCompoundDrawablesWithIntrinsicBounds).

 -- Kostya

 17.02.2011 18:42, cool.manish пишет:

    2. I have used a grid view in which every cell is a button. I want to
    change the image on click of a button. I try to use same state as
  mentioned in your reply. but it has not worked.

  I was creating a calendar and to display dates and displaying events
  on a particular day on click of a day. i have used buttons. should i
  use some other view. Image view or image button? or something else?
  Will i be able to show display image for the clicked one.

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

-- 
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


[android-developers] Re: Changing tab background image

2011-02-17 Thread cool.manish
Kostya, I know textview is also clickable. we can draw boundary its a
new thing for me.
but is there any reason to not to use button.
will I be able achive changing image of selection.

On Feb 17, 8:54 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Buttons are not the only widgets that can respond to clicks and can use
 a state drawable.

 A TextView would work too, and it's probably easer to make it look right
 (look up TextView.setCompoundDrawablesWithIntrinsicBounds).

 -- Kostya

 17.02.2011 18:42, cool.manish пишет:

    2. I have used a grid view in which every cell is a button. I want to
    change the image on click of a button. I try to use same state as
  mentioned in your reply. but it has not worked.

  I was creating a calendar and to display dates and displaying events
  on a particular day on click of a day. i have used buttons. should i
  use some other view. Image view or image button? or something else?
  Will i be able to show display image for the clicked one.

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

-- 
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


[android-developers] scrollbar is coming in gridview

2011-02-17 Thread cool.manish
Hi,

I am using grid view. It is not displaying all contents and adding one
scroll bar. after scrolling i get to know that their are other items
available. There is lots of space available on the screen but even
then it is displaying scrollbar

-- 
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


[android-developers] unwanted scrollbar is coming in gridview

2011-02-17 Thread cool.manish
Hi,

I am using grid view. It is not displaying all contents and adding
one
scroll bar. after scrolling i get to know that their are other items
available. There is lots of space available on the screen but even
then it is displaying scrollbar

-- 
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


[android-developers] Re: unwanted scrollbar is coming in gridview

2011-02-17 Thread cool.manish
Hi all,

I am using below mentioned code for grid view and grid view_cell
component. After using it scroll bar is appearing. once a while it had
removed but i dont the reason how and why it appear and disappear

GridView
android:id=@+id/Grid
android:layout_height=wrap_content
android:layout_width=wrap_content
android:horizontalSpacing=-1px
android:verticalSpacing=-1px
android:listSelector=#FF7F
android:cacheColorHint=#
/GridView

and grid component is (a button with boundary)
LinearLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=horizontal
android:layout_width=wrap_content
android:layout_height=wrap_content
View
android:id=@+id/paddingView1
android:layout_width=1dip
android:layout_height=fill_parent
android:background=#/
LinearLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_width=wrap_content
android:layout_height=wrap_content

View
android:id=@+id/paddingView2
android:layout_width=fill_parent
android:layout_height=1dip
android:background=#
/View

Button
android:id=@+id/gridCellBtn
android:layout_width=45dip
android:layout_height=wrap_content
android:textSize=18dip
android:lines=1
android:gravity=center
android:padding=5dip
/Button
View
android:id=@+id/paddingView3
android:layout_width=fill_parent
android:layout_height=1dip
android:background=#
/View
/LinearLayout
View
android:id=@+id/paddingView4
android:layout_width=1dip
android:layout_height=fill_parent
android:background=#/
/LinearLayout



On Feb 17, 10:27 pm, cool.manish mannishga...@gmail.com wrote:
 Hi,

 I am using grid view. It is not displaying all contents and adding
 one
 scroll bar. after scrolling i get to know that their are other items
 available. There is lots of space available on the screen but even
 then it is displaying scrollbar

-- 
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


[android-developers] Re: Changing tab background image

2011-02-17 Thread cool.manish
Thanks Kostya. I got your point. However in my case as i am setting
background, its kind of ok for me to use button or textview. my btn is
also luking ok

my main prb is to change the image on click so tht usr cud knw which
date has been clicked. even when i return from previous page the
according to the result of the next activity, i want to hightlight tht
particular day

I can try to implement sm logic to change the color of the selected
day. but it is difficult to change the color whn coming back frm the
called activity(becaz i dont knw the image of the returned date).
becaz depending upon day is holiday, or have a event, i am showing
different image. So i was jst thinking to do this thing using xml.

as Mark told, we can't apply state change logic in btn. Is there any
other way?

On Feb 17, 10:30 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 17.02.2011 20:03, cool.manish пишет:

  Kostya, I know textview is also clickable. we can draw boundary its a
  new thing for me.

 I was just suggesting you could use compound drawable(s) to indicate
 days with appointments, etc. It's an easy way to add small images to a
 TextView.

  but is there any reason to not to use button.
  will I be able achive changing image of selection.

 Code-wise, a Button is just a TextView with a custom background (set
 with default style attributes), so no difference there.

 What I was getting it is - a grid filled with buttons that look like
 buttons (grey rounded rectangles) probably doesn't look very nice. But I
 suppose that's a matter of taste.

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

-- 
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


[android-developers] capturing Home key event at application level

2011-02-15 Thread cool.manish
Hi,

How can we capture home key event?
I am storing some data at application level, I want to clear it so
that it doesn't consume memory when my application is in background.
At the same time, i wish that this data shouldn't get earsed if my
application has gone in the background because of an incoming call.

Do I need to capture key event in every activity? Is it possible to
handle it at application level, so that i dont have to handle it in
every activity and rewrite the same code.

-- 
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


[android-developers] Re: capturing Home key event at application level

2011-02-15 Thread cool.manish
Marcin,

I know activity life cycle but i am saving data at application level.
Even if my activity has been destroyed, i dont want to loss data. Till
the time my application is running, I want to keep that data but as
soon as my application goes in background because of the home key, i
want to clear data. because once my application is in background and
user doesnt re start it, it will be wastage of memory.

On Feb 15, 3:57 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:
  I am storing some data at application level, I want to clear it so
  that it doesn't consume memory when my application is in background.
  At the same time, i wish that this data shouldn't get earsed if my
  application has gone in the background because of an incoming call.

  Do I need to capture key event in every activity? Is it possible to
  handle it at application level, so that i dont have to handle it in
  every activity and rewrite the same code.

 I'd suggest you read on Activity life cycle and write your resource saving
 code in the right methods, so you get your goal without dirtry 
 trickery.http://developer.android.com/reference/android/app/Activity.html

-- 
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


[android-developers] Re: capturing Home key event at application level

2011-02-15 Thread cool.manish
Perhaps this (garbage collection on background applications) actually
does happen but just isn't documented, then freeing memory before
going
into the background is a useful thing.

Yes thats why i want to freeing memory just before going into the
background but I am not getting callback which will get called after
pressing home key. However after reading your reply, now i also have
doubt even if i clear memory ( initialized it with null), it will call
garbage collector or not but it is more better than not releasing
memory at all. if in case garbage collector get run after assigning
null, my purpose will be achieved.


On Feb 15, 4:21 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 15.02.2011 13:50, cool.manish пишет:

  I am storing some data at application level, I want to clear it so
  that it doesn't consume memory when my application is in background.

  From what I can find in the documentation, it's not clear if this can
 reduce memory consumption.

 An application sitting in the background is presumably not running any
 code and not making allocations, so there is nothing to trigger garbage
 collection (and cause the heap allocated by Dalvik VM from the Linux
 kernel to shrink).

 Later, if Android runs out of global memory, it's documented that it
 just starts killing background processes in their entirety. It's not
 documented that there is any attempt to run garbage collection on
 background applications' heaps and shrink them to free up global memory.

 Perhaps this (garbage collection on background applications) actually
 does happen but just isn't documented, then freeing memory before going
 into the background is a useful thing.

 Can this be clarified?

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

-- 
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


[android-developers] Customized date and time picker

2011-02-03 Thread cool.manish
Hi,

I want to customized date and time picker like i want to change the
background color, I want that user can't select back date.

Please help me in doing this.

-- 
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


[android-developers] Re: android:horizontalSpacing

2011-01-25 Thread cool.manish
I want to reduce GridView's vertical spacing. I am not able to do it.
Please help

On Jan 25, 10:14 am, cool.manish mannishga...@gmail.com wrote:
 Hi,

 at one place i have seen android:horizontalSpacing=-1px in a grid
 view.
 what does it means? What is effect of setting spacing in -ve

-- 
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


[android-developers] android:horizontalSpacing

2011-01-24 Thread cool.manish
Hi,

at one place i have seen android:horizontalSpacing=-1px in a grid
view.
what does it means? What is effect of setting spacing in -ve

-- 
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


[android-developers] PDF API

2011-01-19 Thread cool.manish
Hi,

In my application, i am receiving pdf data in byte stream from the
server. Is there any way to display it in the application?

-- 
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


[android-developers] Calender View

2011-01-19 Thread cool.manish
Hi,

Is there any widget/view to display calender in the application?
Or is there any example application to create it?

-- 
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


[android-developers] Re: Progress Bar without a dialog box

2011-01-18 Thread cool.manish
Kostya,

did you mean that I should add progress bar in my each activity and
should set it visibility according to my requirement?

On Jan 17, 6:06 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 You can put progress indicators into the winow title.

 This describes a progress bar that goes from 0 to full:

 http://developer.android.com/guide/appendix/faq/commontasks.html#prog...

 It's also possible to show an indeterminate progress bar, or a progress
 wheel.

 You can also overlay a progress indicator over your activity's content by
 using a RelativeLayout or a FrameLayout.

 -- Kostya

 2011/1/17 Mike dg vinb...@gmail.com



  What about making an activity exclusively for displaying the progress
  dialog? It sounds like you have no desire to allow the user to do
  anything during the fetch process, which I'm against but this would
  work. You can do XML for the new activity layout.

  On Jan 16, 11:53 pm, TreKing treking...@gmail.com wrote:
   On Sun, Jan 16, 2011 at 10:49 PM, cool.manish mannishga...@gmail.com
  wrote:

 I had also tried Progress Bar but I have to include it in the XML.

   No you don't. Did you even try creating it programmatically?

  ---
  --
   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.comandroid-developers%2Bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] Progress Bar without a dialog box

2011-01-16 Thread cool.manish
Hi,

In my application, I am fetching data from server. During fetching
response and parsing it, I want to display a progress bar(Like
spinner) but without a dialog box.

If I am using ProgressDialog then it is also displaying Dialog box. I
had also tried Progress Bar but I have to include it in the XML. My
problem is this that I need to display progress bar in almost every
screen of my application and only at the time when I am fetching data
from the server. So I think, I shouldn't include it in XML of every
screen.

Please help me.

-- 
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


[android-developers] Re: Cache size and Heap size

2010-12-29 Thread cool.manish
Thanks Dianne.

I have some more queries.

 1. I am refering to the Cache memory which is return by getCacheDir
function. Is there any limit that per application only this much Cache
memory could be used?

 2. If Cache memory is same as normal internal data storage space then
is it dependent upon the mobile's phone memory? Is there any % amount
of total internal memory which could be used as Cache memory.

 3. Heap Memory: I had tried functions like Debug.getMemoryInfo which
returns Debug.memoryInfo object and also
ActivityManager.getProcessMemoryInfo function which returns
ActivityManager.MemoryInfo object. Now there are different functions
in MemoryInfo like getTotalPrivateDirty or getTotalPss(). I am unable
to understand use of these functions. What is the meaning of Total
Private Dirty memory or total PSS memory? Which one of them returns
Heap memory? Is there any limit per application to use heap memory?
Can we configure size of the heap memory?

Regards,
Manish

On Dec 29, 12:26 am, Dianne Hackborn hack...@android.com wrote:
 There is no cache memory size.  I'm not sure what you are referring to as
 cache; if you mean stuff put in the cache directory of your app, that is
 just in the normal internal data storage space.

 Heap size is available 
 from:http://developer.android.com/reference/android/app/ActivityManager.ht...()





 On Tue, Dec 28, 2010 at 5:08 AM, cool.manish mannishga...@gmail.com wrote:
  Hi,

  What is cache memory size for android device? Is it very according to
  Devices? Is it divided in between application and one application can
  use only specific amount of total size?

  How to get info regarding Heap Memory Size? Again how to know
  application specific Heap size? Can we change it?

  --
  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.comandroid-developers%2bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] Cache size and Heap size

2010-12-28 Thread cool.manish
Hi,

What is cache memory size for android device? Is it very according to
Devices? Is it divided in between application and one application can
use only specific amount of total size?

How to get info regarding Heap Memory Size? Again how to know
application specific Heap size? Can we change it?

-- 
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


[android-developers] Which JSON Parser is better

2010-12-22 Thread cool.manish
Hi All,

I want to use some JSON parser in my application. I get to know about
lots of available JSON parser like Android default org.json library,
JSONTokenizer, gson, jackson etc.

Is there any benifit of using gson rather than Android default parser?

I am bit confused which one of them is better keeping in mind their
usability and apk size.

Regards,
Manish

-- 
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


[android-developers] Re: Which JSON Parser is better

2010-12-22 Thread cool.manish
Hi Brill,

I am sorry, I didn't get your point. I am very new in this field and
don't know, if gson is a binary format then how will it effect?

As per my knowledge about gson, I can give one String to it which has
JSON data in it, it will parse it and then i can search for a
particular object or value.

Is your meaning of saying One built into the platform is it that I
should use JSONTokenizer or whatever Android is providing me?

On Dec 23, 11:51 am, Brill Pappin br...@pappin.ca wrote:
 Isn't gson a binary format?

 MongoDB talks about using GSON over JSON.

 IMO I'd simply use the one built into the platform.

 - Brill Pappin

-- 
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


[android-developers] Click on overlay and move to another activity

2010-12-04 Thread cool.manish
Hi Guys,

I am displaying google map in my app and displaying POIs on it using
overlay. I want to capture onTap action of the overaly and to move to
another activity. I have find out some tutorial which are telling how
to display some message at the time of clicking but I want to move to
another activity. Now problem is this that overlay class doesn't have
context object then how will I start another activity.

-- 
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


[android-developers] Problem in communicating from tabActivity to Child Activity

2010-12-01 Thread cool.manish
Hi All,

I am creating a tab application with two tabs. In my TabActivity, I
have a button if user clicks on it, i will fetch some data from the
net and want to transfer it to the child activity of the tabs. Please
help me in doing it.

-- 
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


[android-developers] Re: Help needed for Context object: GPS implementation

2010-12-01 Thread cool.manish
My query is as it that at the time of starting GPS listener, I am
sending context from one activity. Now If I have moved to some other
activity then will I be able to use same GPS Listener which had been
started from previous activity.

if context object has relation with application and not with activity
then it will be possible for me to listen from any actvity. So I want
to know about Context object's relation with application or is it
associated with the different component?

On Nov 26, 2:56 am, TreKing treking...@gmail.com wrote:
 On Wed, Nov 24, 2010 at 3:02 AM, cool.manish mannishga...@gmail.com wrote:
  Can I start my GPS listener from one activity and can fetch coordinate in
  some other activity?

 You can start it in one activity then *pass* the information you get to
 another activity, if that's what you mean.

 ---­--
 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


[android-developers] Help needed for Context object: GPS implementation

2010-11-24 Thread cool.manish
In my application I want to start GPS. I have to pass context object
to it. Can I start my GPS listener from one activity and can fetch
coordinate in some other activity?
We get locationManager object using Context. Now if I have get
LocationManager using first activity's context then can't I use the
same locationManager to fetch the coordinates.

On Nov 24, 12:24 pm, Kumar Bibek coomar@gmail.com wrote:
 Yes, Contexts are specific to components.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Wed, Nov 24, 2010 at 12:52 PM, cool.manish mannishga...@gmail.comwrote:



  Hi All,

  I want to know about the Context class object. In lots of APIs we send
  Context object. Is context object is associated with the application
  and this object remains same throughout the application? Or it is
  associated with the components like activity and every component
  initiate its own context object?

  I guess last one is right as Context is the super class of the
  Activity class. So every time there will be different object.

  --
  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.comandroid-developers%2bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] GPSProvdier is enabled or not

2010-11-23 Thread cool.manish
Hi All,

I am trying to fetch current location in my application. I want to try
it firstly with GPS if it is not working then with Network provider.

My query is if
manager.isProviderEnabled( LocationManager.GPS_PROVIDER ) gives me
false then will requestLocationUpdates not work. or even if GPS is
not enabled on my cell requestLocationUpdates will automatically
enable the GPS.

Should my code be like below
if(manager.isProviderEnabled( LocationManager.GPS_PROVIDER ) )
 
manager.requestLocationUpdates(LocationManager.GPS_PROIVDER...
else
 
manager.requestLocationUpdates(LocationManager.NETWORK_PROIVDER...

-- 
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


[android-developers] Context object

2010-11-23 Thread cool.manish
Hi All,

I want to know about the Context class object. In lots of APIs we send
Context object. Is context object is associated with the application
and this object remains same throughout the application? Or it is
associated with the components like activity and every component
initiate its own context object?

I guess last one is right as Context is the super class of the
Activity class. So every time there will be different object.

-- 
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


[android-developers] Open one html file from sdcard

2010-10-05 Thread cool.manish
Hi,

I have push one html page on my sdcard in emulator. how can I see it
and can run it as we do in the desktop?

-- 
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


[android-developers] Re: Open one html file from sdcard

2010-10-05 Thread cool.manish
Is it some third party application? Do I need to install this
application?

On Oct 5, 11:15 am, Kumar Bibek coomar@gmail.com wrote:
 Use a File manager to navigate to the HTML file (Astro file manager)
 and open it.

 -Kumar Bibekhttp://techdroid.kbeanie.com

 On Oct 5, 11:06 am, cool.manish mannishga...@gmail.com wrote:



  Hi,

  I have push one html page on my sdcard in emulator. how can I see it
  and can run it as we do in the desktop?- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] Re: How to get android version programmtically

2010-09-16 Thread cool.manish
I also want to add some more query in this.

1. Where and how can I add version info of my application? So that I
can check for the upgraded version and can upgrade my application.

 2. And if there is upgraded version of the application is available
in the Android Market then will I get any notification on my mobile or
I have to check in manually.

Thanks,
Mansih

On Sep 16, 9:48 am, Jiang webs...@yahoo.cn wrote:
 Hello, guyes.

 I need to get android version programmtically  dynamically when my 
 application is running on device.

 I tried android.os.Build.Version, but it doesn't exist in Android sdk 1.6.

 How to get android version?

 Thanks.
 Jiang

-- 
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


[android-developers] Map Application available on Android Emulator

2010-09-13 Thread cool.manish
Hi,

I need some information regarding Map application. I have seen one map
application on sdk 1.6 and above.

Questions are:
1.  Will it be available on all android phones?
 2. Can I call this application from my application? If yes then how?
I dont know how to call another class. I think, I should know the
starting activity's class name. If this is the case, What is the
starting activity class name in case of this map application.
3. What will happen to my application, if someone uninstall Map
application, in case I use this map application?

-- 
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


[android-developers] Can we use Map Application installed on Android emualtor with sdk 1.6?

2010-09-13 Thread cool.manish
Hi,

I need some information regarding Map application which is installed
on Android emulator 1.6.

Questions are:
1.  Will it be available on all android phones?

 2. Can I call this application from my application? If yes then how?
I dont know how to call another class. I think, I should know the
starting activity's class name. If this is the case, What is the
starting activity class name in case of this map application?

3. What will happen to my application, if someone uninstall Map
application, in case I use this map application?(I am not sure but I
think user can uninstall native application.)

-- 
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


[android-developers] How to take care of form factor(screen size) and resoultion

2010-09-13 Thread cool.manish
If I wish to run my application on different devices with different
screen size and/or resolution then how can it be achieved?

For example if I have given a padding of 5px for one particular screen
size. That might not look good for a device having larger or smaller
screen than this device. I understand that for the controls which has
size as wrap content or fill_parent, it will work fine. But what could
be done for hard coded values.

If two devices have different screen resolution then i would need
different images, if I am using some image in my application. Do I
need to create different build for different resolution or there is
some way to create more drawable folders with different name and
choosing one of them as we do for localization.

-- 
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


[android-developers] Re: Map Application available on Android Emulator

2010-09-13 Thread cool.manish
Hi Xavier,

Thanks for your reply. But I wasn't asking about the map library, I am
talking about map application which is installed on sdk1.6 and above.
In this application we can display route from current location to end
point and route between any two points.

On Sep 14, 5:59 am, Xavier Ducrohet x...@android.com wrote:
 There's some confusion it seems.

  Questions are:
  1.  Will it be available on all android phones?

 No. The library is not standard. Some manufacturers can decide to not use it.
 This is why application must declare in their manifest that they
 require it to run (uses-library
 android:name=com.google.android.maps/).

 If the library is not on the device, applications that need it won't
 install (and Market won't even display them)

   2. Can I call this application from my application? If yes then how?
  I dont know how to call another class. I think, I should know the
  starting activity's class name. If this is the case, What is the
  starting activity class name in case of this map application.

 You don't call maps. the MapView library and the maps app are unrelated.

 Instead you use a MapView in your layouts. See the API 
 there:http://code.google.com/android/add-ons/google-apis/index.html

  3. What will happen to my application, if someone uninstall Map
  application, in case I use this map application?

 Because your app won't use the Maps application but the Google Maps
 system library, there is no way for the user to remove what your app
 needs.

 Xav
 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.

 Please do not send me questions directly. Thanks!

-- 
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


[android-developers] Re: Can we use Map Application installed on Android emualtor with sdk 1.6?

2010-09-13 Thread cool.manish
Hi Mark,

Thanks for your reply.
I think you and me are in sync and we are talking about the Map
application which is used to display route and all.
I have one more query:
I want to know the procedure to update my application. How this happen
in Android? Do we get notification that upgraded version is available
to download or we have to check this maually.

On Sep 13, 7:21 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Sep 13, 2010 at 9:20 AM, cool.manish mannishga...@gmail.com wrote:
  Questions are:
  1.  Will it be available on all android phones?

 No.

   2. Can I call this application from my application? If yes then how?

 See the geo: Intent syntax described here:

 http://developer.android.com/guide/appendix/g-app-intents.html

 See here for a sample:

 http://github.com/commonsguy/cw-android/tree/master/Activities/Launch/

  I think, I should know the
  starting activity's class name.

 No.

  3. What will happen to my application, if someone uninstall Map
  application, in case I use this map application?(I am not sure but I
  think user can uninstall native application.)

 Maps, where it exists, usually has a base version installed
 permanently, and updates that may come from the Market.

 If there is nothing on the device to handle the geo: Intent, your
 application will crash. You can use PackageManager and
 queryIntentActivities() to see if a given Intent is safe to use with
 startActivity().

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training...At Your Office:http://commonsware.com/training

-- 
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


[android-developers] Re: how can you tell if an application is installed and what version is installed?

2010-09-13 Thread cool.manish
Where can we store version info? Do we need to mention it in the
Android manifest file?

On Sep 14, 9:57 am, jotobjects jotobje...@gmail.com wrote:
 context.getPackageManager().getPackageInfo()

 On Sep 13, 4:06 pm, sdphil phil.pellouch...@gmail.com wrote:



  is there an easy way (api) to do this?

  tia.- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] REST web services and JSON Response object support in Android

2010-09-08 Thread cool.manish
Hi All,

In my application, I will call webservices which are written using
REST and returning JSON object rather than XML.
My Question is it that Is Android support them? Sending an request to
REST web services and rendering its response is same as HTTP request
or something different.

I haven't much idea about REST and JSON and haven't much time to find
out it by myself. Thats why i am posting this question. If someone has
worked earlier please help me.

-- 
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


[android-developers] Displaying Google map on Android is paid or free

2010-09-08 Thread cool.manish
Hi All,

I get to know that displaying map in some other application is a paid
thing and we need to create a key using which we can get it.

Is this true for Android application also? Is it paid?

-- 
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


[android-developers] Lat Long value using zip code or city name

2010-09-08 Thread cool.manish
Hi All,

Is there any way to find out the lat long value for a particular zip
code or city name?
I want to display google map after giving zipcode or city name.

Thanks  Regards
Manish

-- 
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


[android-developers] Re: Displaying Google map on Android is paid or free

2010-09-08 Thread cool.manish
So If we are developing an application for the bussiness purpose to
sell one application, one of whose feature is to display map, no one
developer as well as user have to pay for that.

On Sep 8, 3:57 pm, Yahel kaye...@gmail.com wrote:
 As I understand it, it is free even with a high traffic.
 From the FAQ :http://code.google.com/intl/fr-FR/apis/maps/faq.html

 --
 My site gets a lot of traffic. Can I use the Maps API?
 Yes, absolutely. There's no limit to the number of page views of Maps
 on your site. If you expect your site to generate over 500,000 page
 views per day, please contact us so we can provision additional
 capacity to handle your traffic.
 -

 Yahel

 On 8 sep, 12:29, cool.manish mannishga...@gmail.com wrote:



  Hi All,

  I get to know that displaying map in some other application is a paid
  thing and we need to create a key using which we can get it.

  Is this true for Android application also? Is it paid?- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] How to display route on Google map in Android

2010-09-08 Thread cool.manish
Hi All,

How to display route on Google map in Android in between two lat long
value?
Does android supports it and are there any api available as there are
for displaying map?

-- 
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


[android-developers] Re: Should Activity component be starting component for Android apps

2010-09-08 Thread cool.manish
My Query was it that if I wish to install an application which will
run at the start up and will fetch and/or send some data to the
network.
I need not any user interference for it. So I want to develope an
application which has Service component as the launcher.

Is this possible.

On Sep 3, 2:16 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Sep 3, 2010 at 2:47 AM, cool.manish mannishga...@gmail.com wrote:
  Is this necessary to have some activity as the starting component?

 If you are asking do I need to have something in the launcher, the
 answer is technically no, but it seems that some users get confused
 by apps that they install and lack a launcher icon...even if one is
 not truly needed.

 If you are asking something else, my apologies.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

-- 
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


[android-developers] Re: How to display route on Google map in Android

2010-09-08 Thread cool.manish
One more query is, Is there API to find out Lat Long for a zipcode or
city name supported in android.

On Sep 8, 6:19 pm, cool.manish mannishga...@gmail.com wrote:
 Hi All,

 How to display route on Google map in Android in between two lat long
 value?
 Does android supports it and are there any api available as there are
 for displaying map?

-- 
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


[android-developers] Re: Should Activity component be starting component for Android apps

2010-09-08 Thread cool.manish
I want to do it only for my personal purpose.
and only those users who will be interested to use this application,
will install it.

On Sep 8, 6:50 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Sep 8, 2010 at 9:22 AM, cool.manish mannishga...@gmail.com wrote:
  My Query was it that if I wish to install an application which will
  run at the start up and will fetch and/or send some data to the
  network.
  I need not any user interference for it. So I want to develope an
  application which has Service component as the launcher.

  Is this possible.

 Yes. Users will not like it.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training in London:http://skillsmatter.com/go/os-mobile-server

-- 
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


[android-developers] Re: How to display route on Google map in Android

2010-09-08 Thread cool.manish
Hi Victor,

Isn't Android Map display only Map.
Is it also display route for some partcular arguments?


On Sep 8, 8:17 pm, viktor victor.scherb...@gmail.com wrote:
  Geocoder geoCoder = new Geocoder(context);
  ListAddress addressList = geoCoder.getFromLocationName(address, 1);

 where address contain street or city, or zip

 For displaying rout you can use standard Android Map, only call it
 with specific Intent

-- 
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


[android-developers] Re: Use of Service component?

2010-09-03 Thread cool.manish
Thanks Kostya, for sharing this information,
I need one more information: If my service class after complition wish
to update the activity class, how can we do it?

I am just a beginner and haven't much knowledge of android.

On Sep 1, 1:24 am, Kostya Vasilyev kmans...@gmail.com wrote:
   One more thing:

 Android uses the same Linux process for your WidgetProvider as well as
 service that updates the widget (again, I'm assuming you followed the
 Wikipedia sample).

 The WidgetProvider will be created and invoked as necessary, this, in
 turn, should cause your service to be started when you call
 startService(this, UpdateService.class).

 A task killer is likely to interfere with the first part of this
 sequence - i.e. preventing the WidgetProvider from responding to update
 events in the first place.

 -- Kostya

 31.08.2010 23:50, Kostya Vasilyev О©╫О©╫О©╫О©╫О©╫:





  If your code is set up along the lines of the Wikipedia sample widget
  (which it seems to be), and the widget's onUpdate invokes the service
  with startService, then everything should be fine already.
  StartService will, obviously, start the service as necessary.

  If there are still problems updating the widget, ask your user to add
  your service to the task killer's exclude list. Better yet, try to
  educate the user about the evil nature of task killers, perhaps he/she
  will stop using them altogether.

  --
  Kostya Vasilyev --http://kmansoft.wordpress.com

  31.08.2010 22:14 О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫ Alex 
  maroeb...@gmail.com
  mailto:maroeb...@gmail.com О©╫О©╫О©╫О©╫О©╫О©╫О©╫:

  What is the correct way to ensure that a widget update service is
  restarted if it has been killed?

  In my widget, I start the service in the onUpdate event, but if the
  widget and service are killed (by a task killer, for example), the
  widget restarts, but the service doesn't.

  On Aug 31, 6:01 pm, Kostya Vasilyev kmans...@gmail.com
  mailto:kmans...@gmail.com wrote:
     A Service can still get killed ...

 http://developer.android.com/reference/android/app/Service.html#Proce...

   -- Kostya

   31.08.2010 20:48, Agus О©╫О©╫О©╫О©╫О©╫:

A thread hosted by the ApplicationContext ...

On Tue, Aug 31, 2010 at 9:22 AM, Kostya
  Vasilyevkmans...@gmail.com mailto:kmans...@gmail.com  wrote:

  The difference is that Activity lifecycle is managed by the
  user, and
Service lifecycle ...

  --

  You received this message because you are subscribed to the Google
  Groups Android Developers group...

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.com

-- 
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


[android-developers] Should Activity component be starting component for Android apps

2010-09-03 Thread cool.manish
Hi,
Is this necessary to have some activity as the starting component?

-- 
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


[android-developers] Use of Service component?

2010-08-31 Thread cool.manish
Service Component is used to do some task which can be done without
user interaction. But for that we have to run a thread in subclass of
the Service.
I think we can create a thread in Activity class itself then what is
the use of Service component?
Why don't we create another thread and write the non interacting code
in this thread.

-- 
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


[android-developers] What is Context and what is its use?

2010-08-31 Thread cool.manish
What is context. We always pass an argument context in the intent or
manageQuery etc. What is it and what is the use of it?
does it have the information about the process stack?

-- 
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


[android-developers] How to access Phone Book

2009-03-03 Thread cool.manish

Hi, I am creating an application which will display all contacts from
the phone book. Is there any API which can access the phone book.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Parse an XML

2009-02-10 Thread cool.manish

Hi, I am trying to make a simple application to parse the XML using
SAXParser but it is not finding the xml file which I have added in the
project. How and where should I add the XML file?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Help: Getting java.io.IOException: Couldn't open exception

2009-02-10 Thread cool.manish

Hi, I have created a simple application on android platform.
Application is parsing an XML.

SAXParser sp = spf.newSAXParser();
//parse the file and also register this class for call backs
sp.parse(./sdcard/employees.xml, this);

I am getting java.io.IOException: Couldn't open ./sdcard/
employees.xml. I had pushed the xml in sdcard.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Parse an XML

2009-02-10 Thread cool.manish

What is the context?
I am getting error at that point.

Actually I am trying to parse the xml file

SAXParser sp = spf.newSAXParser();
sp.parse(context.getResources().getXml(R.xml.employees), this)

On Feb 11, 3:32 am, Ludwig ludwigbrinckm...@gmail.com wrote:
 sorry that should have been
 context.getResources().getXml(R.xml.myxml)

 Ludwig

 2009/2/10 Ludwig ludwigbrinckm...@gmail.com



  put it under res/xml/myfile.xml (in Eclipse you will have to create that
  directory). You can then load the file as context.getResources(R.xml.myfile)
  HTH
  Ludwig

  2009/2/10 cool.manish mannishga...@gmail.com

  Hi, I am trying to make a simple application to parse the XML using
  SAXParser but it is not finding the xml file which I have added in the
  project. How and where should I add the XML file?- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---