[android-beginners] Re: Programing Experience

2010-03-31 Thread Lennie De Villiers
Hi,

For me it helped that am a professional Java developer that used Java
and Eclipse every day for the last 3 years. The Eclipse IDE is easy to
learn but suggest that you learn Java language first before trying to
learn Android development.

For Android there is the "Beginning Android" books that helped me a lot.

Kind Regards,

Lennie De Villiers

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


[android-beginners] Re: Proper way to finish an activity

2010-03-31 Thread DroidBy
Hi Peter,

Ya, by implementing some flags, I manage to see if I should call
finish in the onPause state.
Now my problem is resolved.

Thanks.


On Apr 1, 10:06 am, DroidBy  wrote:
> Peter,
>
> I read that before. But it still can't solve my problem in point 2.
>
> As if I call finish during onPause(), then I will have duplicate
> finish request complaint by the ActivityManager if user clicks on the
>  button which will call finish() , and then the activity will
> enter into pause state and call finish() again.
>
> :(
>
> On Mar 31, 4:23 pm, Peter Fortuin  wrote:
>
>
>
> > Hi DroidBy,
>
> > Maybe it's a good idea to read the 
> > following:http://developer.android.com/guide/topics/fundamentals.html#actlife
> > Read the part about the Activity lifecycle. That should answer your
> > questions.
>
> > Kind regards,
>
> > Peter
>
> > 2010/3/31 DroidBy 
>
> > > I think someone here can anwer me..
>
> > > I have an application with 3 activities, A, B and C.
> > > Three points here:-
> > > 1. In normal user sequence, activity A will start activity B, activity
> > > B will then start activity C.
>
> > > 2. In case, user is also allowed to cancel activity B (by a button),
> > > and it will resume back to activity A.
>
> > > 3. If activity B is interrupted by any application which comes into
> > > foreground, activity B should be killed and user should start from
> > > activity A if user navigate back to my application.
>
> > > In point 2, I have called finish() if user click on the button;
>
> > > In point 3, I have called finish in activity B onPause() function
>
> > > End up, I get an warning saying that I have duplicate finish request
> > > by Activity Manager as in point 2, the onPause() will be called also.
>
> > > So, does anyone here no how should I do in handling for point 2 so
> > > that I am able to resume to activity A after user cancels activity B?
> > > Or how should I do in case to stop my activity B so that user always
> > > start from activity A?
>
> > > Any best advise here?
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Beginners" group.
>
> > > NEW! Try asking and tagging your question on Stack Overflow at
> > >http://stackoverflow.com/questions/tagged/android
>
> > > To unsubscribe from this group, send email to
> > > android-beginners+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-beginners?hl=en
>
> > > To unsubscribe, reply using "remove me" as the subject.- Hide quoted text 
> > > -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Proper way to finish an activity

2010-03-31 Thread DroidBy
Peter,

I read that before. But it still can't solve my problem in point 2.

As if I call finish during onPause(), then I will have duplicate
finish request complaint by the ActivityManager if user clicks on the
 button which will call finish() , and then the activity will
enter into pause state and call finish() again.

:(




On Mar 31, 4:23 pm, Peter Fortuin  wrote:
> Hi DroidBy,
>
> Maybe it's a good idea to read the 
> following:http://developer.android.com/guide/topics/fundamentals.html#actlife
> Read the part about the Activity lifecycle. That should answer your
> questions.
>
> Kind regards,
>
> Peter
>
> 2010/3/31 DroidBy 
>
>
>
> > I think someone here can anwer me..
>
> > I have an application with 3 activities, A, B and C.
> > Three points here:-
> > 1. In normal user sequence, activity A will start activity B, activity
> > B will then start activity C.
>
> > 2. In case, user is also allowed to cancel activity B (by a button),
> > and it will resume back to activity A.
>
> > 3. If activity B is interrupted by any application which comes into
> > foreground, activity B should be killed and user should start from
> > activity A if user navigate back to my application.
>
> > In point 2, I have called finish() if user click on the button;
>
> > In point 3, I have called finish in activity B onPause() function
>
> > End up, I get an warning saying that I have duplicate finish request
> > by Activity Manager as in point 2, the onPause() will be called also.
>
> > So, does anyone here no how should I do in handling for point 2 so
> > that I am able to resume to activity A after user cancels activity B?
> > Or how should I do in case to stop my activity B so that user always
> > start from activity A?
>
> > Any best advise here?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
>
> > NEW! Try asking and tagging your question on Stack Overflow at
> >http://stackoverflow.com/questions/tagged/android
>
> > To unsubscribe from this group, send email to
> > android-beginners+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-beginners?hl=en
>
> > To unsubscribe, reply using "remove me" as the subject.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


RE: [android-beginners] Re: Programing Experience

2010-03-31 Thread tinyang
That is different for each person.  It took me the better part of a year
teaching myself out of a couple books, and I'm still learning Java. 

-Original Message-
From: android-beginners@googlegroups.com
[mailto:android-beginn...@googlegroups.com] On Behalf Of Peter.C
Sent: Wednesday, March 31, 2010 4:02 PM
To: Android Beginners
Subject: [android-beginners] Re: Programing Experience

How long would it take me, a complete beginner to coding, to learn java and
be able to code for andoird?


Thanks

Peter
On Mar 31, 4:47 pm, Kevin Brooks  wrote:
> Peter,
>
> I started with Android with very little knowledge of Java.  My C++ 
> background helped a lot.  However, if you know Java it would be easier 
> to learn the Android SDK.
>
> Kevin
>
>
>
>
>
> On Wed, Mar 31, 2010 at 3:40 PM, Peter.C  wrote:
> > How much programing experience should I have before coding for 
> > android? Also what should I learn besides Java?
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google 
> > Groups "Android Beginners" group.
>
> > NEW! Try asking and tagging your question on Stack Overflow at 
> >http://stackoverflow.com/questions/tagged/android
>
> > To unsubscribe from this group, send email to
> > android-beginners+unsubscr...@googlegroups.com > android-beginners+nsubscr i...@googlegroups.com>
> > For more options, visit this group at 
> >http://groups.google.com/group/android-beginners?hl=en
>
> > To unsubscribe, reply using "remove me" as the subject.
>
> --
> Kevin
> Proverbs 21:6

--
You received this message because you are subscribed to the Google Groups
"Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] notifyDataSetChanged not updating the iconified listview

2010-03-31 Thread Prajakta Shitole
Hi,

The below problem was solved. Thanks to Nick Giancola. I created a custom
class which has the song_name, singer_name and the image. I use the object
of this class in my ArrayAdapter and then when i create new rows i add the
object to my adapter.
myCustomClass ir; //here ir has the singer_name, song_name and the image.

I had forgotten to do ic.add(ir);


Thanks,
Prajakta

On Tue, Mar 30, 2010 at 7:40 PM, prajakta  wrote:

> Hi,
>
> I am currently trying to update my iconified listview using
> notifyDataSetChanged but the listView doesnt get updated.
>
> From the posts that I read I found out that I dont need to call the
> setListAdapter again to update my listView and if I change the data
> that I feed to my array adapter the listview should get automatically
> updated. But when I try to use notifyDataSetChanged nothing seems to
> happen, instead when i use setListApater it seems to work but my
> cursor position is on the first row of the list, everytime. I do not
> want this, i want it to be positioned at the last row of the initial
> list view.
>
> This is what I have tried.
> IconicAdapter ic;
>  ic = new IconicAdapter(this);
> setListAdapter(ic);
>
> //perform my other calls and get a new list data
> ic.notifyDataSetChanged();
> //setListAdapter(ic);
>
> if I uncomment the setListAdapter the new list rows get appended to
> the previous ones but the cursor is at the first row of data. I want
> the cursor to be positioned to the last row after which i want the new
> rows to be added.
>
> Please can anyone let me know if I am missing on anything or if i am
> doing anything wrong.
>
> Thanks,
> Prajakta
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: Programing Experience

2010-03-31 Thread Danny Pimienta
Ha ha, I knew you'd like that. I am heading to barnes and noble
tonight to get a vbscript book but I am going to get your beginning
android 2 book too. I've gotten so fustrated with Android's SDK that I
abandoned it for the two other mobile platforms I work on. I am using
a HTC Eris as my test device and I see you cover 1.5 and 2.0.

Sent from my iPhone

On Mar 31, 2010, at 5:11 PM, Mark Murphy  wrote:

Kevin Brooks wrote:

I would also Suggest picking up Mark Murphy's book on Android Development.


Mark Murphy likes that idea! Thanks! :-)

To be fair, though, here's a list of all available English-language
Android books that I know of:

http://wiki.andmob.org/books

Rolling back to the question on learning Java, you do not need to learn
everything about the environment, because many things (e.g., Swing for
GUIs) are not relevant on Android. Here are some concepts to pick up, in
no real order:

-- classes and objects
-- interfaces
-- "extends" and "implements"
-- public, protected, and private
-- data members and methods
-- exceptions
-- threads
-- the java.io and java.util packages of classes

_Head First Java_ is a popular Java book, as is _Core Java Volume I_.

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

Android Training in NYC: 30 April-2 May 2010: http://guruloft.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: Programing Experience

2010-03-31 Thread Danny Pimienta
Ha ha, I knew you'd like that. I am heading to barnes and noble
tonight to get a vbscript book but I am going to get your beginning
android 2 book too. I've gotten so fustrated with Android's SDK that I
abandoned it for the two other mobile platforms I work on. I am using
a HTC Eris as my test device and I see you cover 1.5 and 2.0.

Sent from my iPhone

On Mar 31, 2010, at 5:11 PM, Mark Murphy 
wrote:

> Kevin Brooks wrote:
>> I would also Suggest picking up Mark Murphy's book on Android
>> Development.
>
> Mark Murphy likes that idea! Thanks! :-)
>
> To be fair, though, here's a list of all available English-language
> Android books that I know of:
>
> http://wiki.andmob.org/books
>
> Rolling back to the question on learning Java, you do not need to
> learn
> everything about the environment, because many things (e.g., Swing for
> GUIs) are not relevant on Android. Here are some concepts to pick
> up, in
> no real order:
>
> -- classes and objects
> -- interfaces
> -- "extends" and "implements"
> -- public, protected, and private
> -- data members and methods
> -- exceptions
> -- threads
> -- the java.io and java.util packages of classes
>
> _Head First Java_ is a popular Java book, as is _Core Java Volume I_.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android Training in NYC: 30 April-2 May 2010: http://guruloft.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Programing Experience

2010-03-31 Thread Peter.C
I already have that book, but I kinda misplaced it (I just got to
"Radio Buttons" before I lost it). Thanks Mark for the suggestion!
Also of what I read so far in your book before I lost it it was plain
and simple to understand hard tasks (that's one for the review section
for "Beginning Android 3" ;) Also, since I am in the NYC area will
your Android Training in NYC help me?

Thanks!!!

Peter Coti

On Mar 31, 5:11 pm, Mark Murphy  wrote:
> Kevin Brooks wrote:
> > I would also Suggest picking up Mark Murphy's book on Android Development.
>
> Mark Murphy likes that idea! Thanks! :-)
>
> To be fair, though, here's a list of all available English-language
> Android books that I know of:
>
> http://wiki.andmob.org/books
>
> Rolling back to the question on learning Java, you do not need to learn
> everything about the environment, because many things (e.g., Swing for
> GUIs) are not relevant on Android. Here are some concepts to pick up, in
> no real order:
>
> -- classes and objects
> -- interfaces
> -- "extends" and "implements"
> -- public, protected, and private
> -- data members and methods
> -- exceptions
> -- threads
> -- the java.io and java.util packages of classes
>
> _Head First Java_ is a popular Java book, as is _Core Java Volume I_.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training in NYC: 30 April-2 May 2010:http://guruloft.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


Re: [android-beginners] Re: Programing Experience

2010-03-31 Thread Mark Murphy
Kevin Brooks wrote:
> I would also Suggest picking up Mark Murphy's book on Android Development.

Mark Murphy likes that idea! Thanks! :-)

To be fair, though, here's a list of all available English-language
Android books that I know of:

http://wiki.andmob.org/books

Rolling back to the question on learning Java, you do not need to learn
everything about the environment, because many things (e.g., Swing for
GUIs) are not relevant on Android. Here are some concepts to pick up, in
no real order:

-- classes and objects
-- interfaces
-- "extends" and "implements"
-- public, protected, and private
-- data members and methods
-- exceptions
-- threads
-- the java.io and java.util packages of classes

_Head First Java_ is a popular Java book, as is _Core Java Volume I_.

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

Android Training in NYC: 30 April-2 May 2010: http://guruloft.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


Re: [android-beginners] Re: Programing Experience

2010-03-31 Thread Kevin Brooks
I would also Suggest picking up Mark Murphy's book on Android Development.

On Wed, Mar 31, 2010 at 4:05 PM, Kevin Brooks  wrote:

> It took me about two weeks to be able to produce my first application for a
> client.
>
>
> On Wed, Mar 31, 2010 at 4:02 PM, Peter.C  wrote:
>
>> How long would it take me, a complete beginner to coding, to learn
>> java and be able to code for andoird?
>>
>>
>> Thanks
>>
>> Peter
>> On Mar 31, 4:47 pm, Kevin Brooks  wrote:
>> > Peter,
>> >
>> > I started with Android with very little knowledge of Java.  My C++
>> > background helped a lot.  However, if you know Java it would be easier
>> to
>> > learn the Android SDK.
>> >
>> > Kevin
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Mar 31, 2010 at 3:40 PM, Peter.C  wrote:
>> > > How much programing experience should I have before coding for
>> > > android? Also what should I learn besides Java?
>> >
>> > > Thanks!
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Android Beginners" group.
>> >
>> > > NEW! Try asking and tagging your question on Stack Overflow at
>> > >http://stackoverflow.com/questions/tagged/android
>> >
>> > > To unsubscribe from this group, send email to
>> > > android-beginners+unsubscr...@googlegroups.com> i...@googlegroups.com>
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/android-beginners?hl=en
>> >
>> > > To unsubscribe, reply using "remove me" as the subject.
>> >
>> > --
>> > Kevin
>> > Proverbs 21:6
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Beginners" group.
>>
>> NEW! Try asking and tagging your question on Stack Overflow at
>> http://stackoverflow.com/questions/tagged/android
>>
>> To unsubscribe from this group, send email to
>> android-beginners+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-beginners?hl=en
>>
>
>
>
> --
> Kevin
> Proverbs 21:6
>



-- 
Kevin
Proverbs 21:6

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: Programing Experience

2010-03-31 Thread Kevin Brooks
It took me about two weeks to be able to produce my first application for a
client.

On Wed, Mar 31, 2010 at 4:02 PM, Peter.C  wrote:

> How long would it take me, a complete beginner to coding, to learn
> java and be able to code for andoird?
>
>
> Thanks
>
> Peter
> On Mar 31, 4:47 pm, Kevin Brooks  wrote:
> > Peter,
> >
> > I started with Android with very little knowledge of Java.  My C++
> > background helped a lot.  However, if you know Java it would be easier to
> > learn the Android SDK.
> >
> > Kevin
> >
> >
> >
> >
> >
> > On Wed, Mar 31, 2010 at 3:40 PM, Peter.C  wrote:
> > > How much programing experience should I have before coding for
> > > android? Also what should I learn besides Java?
> >
> > > Thanks!
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Beginners" group.
> >
> > > NEW! Try asking and tagging your question on Stack Overflow at
> > >http://stackoverflow.com/questions/tagged/android
> >
> > > To unsubscribe from this group, send email to
> > > android-beginners+unsubscr...@googlegroups.com i...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-beginners?hl=en
> >
> > > To unsubscribe, reply using "remove me" as the subject.
> >
> > --
> > Kevin
> > Proverbs 21:6
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
Kevin
Proverbs 21:6

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Programing Experience

2010-03-31 Thread Peter.C
How long would it take me, a complete beginner to coding, to learn
java and be able to code for andoird?


Thanks

Peter
On Mar 31, 4:47 pm, Kevin Brooks  wrote:
> Peter,
>
> I started with Android with very little knowledge of Java.  My C++
> background helped a lot.  However, if you know Java it would be easier to
> learn the Android SDK.
>
> Kevin
>
>
>
>
>
> On Wed, Mar 31, 2010 at 3:40 PM, Peter.C  wrote:
> > How much programing experience should I have before coding for
> > android? Also what should I learn besides Java?
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
>
> > NEW! Try asking and tagging your question on Stack Overflow at
> >http://stackoverflow.com/questions/tagged/android
>
> > To unsubscribe from this group, send email to
> > android-beginners+unsubscr...@googlegroups.com > i...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-beginners?hl=en
>
> > To unsubscribe, reply using "remove me" as the subject.
>
> --
> Kevin
> Proverbs 21:6

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Programing Experience

2010-03-31 Thread Kevin Brooks
Peter,

I started with Android with very little knowledge of Java.  My C++
background helped a lot.  However, if you know Java it would be easier to
learn the Android SDK.

Kevin

On Wed, Mar 31, 2010 at 3:40 PM, Peter.C  wrote:

> How much programing experience should I have before coding for
> android? Also what should I learn besides Java?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>



-- 
Kevin
Proverbs 21:6

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Programing Experience

2010-03-31 Thread Peter.C
How much programing experience should I have before coding for
android? Also what should I learn besides Java?

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


[android-beginners] google maps API: drawing and projection

2010-03-31 Thread Sebastián Treu
Hi,

The googlemaps API doc says something about Projection:

"[...]
public Projection getProjection()

Get a projection for converting between screen-pixel coordinates
and latitude/longitude coordinates.

Returns:
The Projection of the map in its current state. You should not
hold on to this object for more than one draw, since the projection of
the map could change.
[...]"

I have extended ItemizedOverlay to draw a set of markers on the map.
Also, I have overriden the draw() method calling super.draw() and then
drawing a path between each point where I draw a marker. Thing is that
I exhausted the device with that method. The point is that on every
draw() I get the projection of the view and I draw the path getting
the pixel points with toPixels().

I have changed that to have an "old" projection and a "new"
projection, and If they are differents projections then draw the path.

I have a MapItem that has a GeoPoint, an OverlayItem, and some name or
descriptions about it. His OverlayItem is added to the extended class
of ItemizedOverlay. Then, the ItemizedOverlay is added to the Overlay
list from mapView.getOverlays().

Is there a better idea to do this job? I think it's consuming too much
CPU from the device (emulator). Without the
old-projection-new-projection thing I managed to hang the Activity
because it keeps drawing everytime the path. Another question, is it
ok the if ( projection != oldProjection ) conditional to draw the
path?

Thanks for the help,
-- 
If you want freedom, compile the source. Get gentoo.

Sebastián Treu
http://labombiya.com.ar

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


Re: [android-beginners] Re: How to save a file to res/raw ?

2010-03-31 Thread Mark Murphy
Kritzli wrote:
> hm, but if i can't write a file to res/layout/ , how can i load my
> layout ?

You can't. You will have to rethink what you are trying to write, to
determine how you can create it via Java code. Now, it may be that that
Java code you execute uses an XML parser to read an XML file located in
the app's files area, but implementing that is up to you.

> I think there's the same read-only restriction to res/layout as to res/
> raw, isn't it ?

Yes. Everything in res/ is read-only at runtime.

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

_Beginning Android 2_ from Apress Now Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


[android-beginners] Re: How to save a file to res/raw ?

2010-03-31 Thread Kritzli
hm, but if i can't write a file to res/layout/ , how can i load my
layout ?
I think there's the same read-only restriction to res/layout as to res/
raw, isn't it ?

On 31 Mrz., 21:50, Mark Murphy  wrote:
> Kritzli wrote:
> > Great. This is what I wanted to know :)
>
> > But, there's the next question.
> > I'm still trying to create a custom soft keyboard. Therefore I need
> > that xml - file. But how do I load my custom layout file into that ?
> > I mean, the constructor only accepts an int ID.
> > Like
>
> > mQwertyKeyboard = new custom_keyboard(this, R.xml.qwert);
>
> > If I try to put my xml file via FileReader or the like to the
> > constructor, I get an error. Is there a way I can generate an ID or
> > use my xml file ?
>
> You cannot load dynamic layouts this way. You can only use
> LayoutInflater viares/layout/ resources.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android 2.x Programming Books:http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] WSDL 2.0 for mobiles

2010-03-31 Thread Demetris


Does anyone happen to know of any WSDL 2.0 parsers that can run
under J2ME CDC? I tried Woden (which compiles on Java 1.4) but no
luck.

Thanks

--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


Re: [android-beginners] Re: How to save a file to res/raw ?

2010-03-31 Thread Mark Murphy
Kritzli wrote:
> Great. This is what I wanted to know :)
> 
> But, there's the next question.
> I'm still trying to create a custom soft keyboard. Therefore I need
> that xml - file. But how do I load my custom layout file into that ?
> I mean, the constructor only accepts an int ID.
> Like
> 
> mQwertyKeyboard = new custom_keyboard(this, R.xml.qwert);
> 
> If I try to put my xml file via FileReader or the like to the
> constructor, I get an error. Is there a way I can generate an ID or
> use my xml file ?

You cannot load dynamic layouts this way. You can only use
LayoutInflater via res/layout/ resources.

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

Android 2.x Programming Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


[android-beginners] Re: How to save a file to res/raw ?

2010-03-31 Thread Kritzli
Great. This is what I wanted to know :)

But, there's the next question.
I'm still trying to create a custom soft keyboard. Therefore I need
that xml - file. But how do I load my custom layout file into that ?
I mean, the constructor only accepts an int ID.
Like

mQwertyKeyboard = new custom_keyboard(this, R.xml.qwert);

If I try to put my xml file via FileReader or the like to the
constructor, I get an error. Is there a way I can generate an ID or
use my xml file ?



-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: screenOrientation question

2010-03-31 Thread Chris Ross

  Great, thanks for the info on rotating the emulator.

  That still doesn't really answer my question, but I think it suggests that 
it's an emulator bug.  When using an HVGA-L screen on a 1.5 emulator, the 
application wrongly comes up in portrait (sideways) on the landscape device.  
When I switch the device, which actually makes it appear upside-down of what 
the skin should look like, the application rotates with it, staying portrait.

  I think it's just a bug of the way the emulator sees "landscape" on a device 
that's wide than it is tall...

  Thanks.  I'll hope this won't be an issue on real phones...

 - Chris

On Mar 31, 2010, at 12:59 PM, niko20 wrote:
> Hi
> 
> You can simulate orientation changes by pressing CNTRL + F12 This
> allows you to test if your app remains in the correct orientation.
> 
> Use the portrait mode emulator screen and then flip orientations to
> make sure it stays. But what you have in the manifest is correct.
> 
> -
> 
> On Mar 30, 12:50 pm, Chris Ross  wrote:
>>   I have written an application that really only works/looks sensibly in 
>> landscape orientation, ie wider than it is tall.  My understanding from web 
>> research suggests the following attributes on my Activity in the manifest:
>> 
>>   android:screenOrientation="landscape"
>>   android:configChanges="keyboardHidden"
>> 
>>   Will force it into landscape, and keep it that way when the orientation 
>> changes.  First, does that sound right?
>> 
>>   Second, when I'm running in a Portrait (normal) aspect emulator, running 
>> 1.5, it does the right thing.  It comes up in landscape mode.
>> 
>>   But, I noticed that when I run in a landscape emulator (HVGA-L) for the 
>> Android OS 1.5 target, it makes it come up portrait.  Ie, still turned 90 
>> degrees, but now using the wrong orientation on the given screen.
>> 
>>   Is this an emulator bug?  Is this a 1.5 bug?  Or have I done something 
>> wrong?  Does the emulator have any ability to simulate orientation changes?  
>> I don't see any menu option for it...
>> 
>>   Thanks
>> 
>>- Chris
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
> 
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
> 
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
> 
> To unsubscribe, reply using "remove me" as the subject.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: screenOrientation question

2010-03-31 Thread niko20
Hi

You can simulate orientation changes by pressing CNTRL + F12 This
allows you to test if your app remains in the correct orientation.

Use the portrait mode emulator screen and then flip orientations to
make sure it stays. But what you have in the manifest is correct.

-

On Mar 30, 12:50 pm, Chris Ross  wrote:
>   I have written an application that really only works/looks sensibly in 
> landscape orientation, ie wider than it is tall.  My understanding from web 
> research suggests the following attributes on my Activity in the manifest:
>
>                           android:screenOrientation="landscape"
>                   android:configChanges="keyboardHidden"
>
>   Will force it into landscape, and keep it that way when the orientation 
> changes.  First, does that sound right?
>
>   Second, when I'm running in a Portrait (normal) aspect emulator, running 
> 1.5, it does the right thing.  It comes up in landscape mode.
>
>   But, I noticed that when I run in a landscape emulator (HVGA-L) for the 
> Android OS 1.5 target, it makes it come up portrait.  Ie, still turned 90 
> degrees, but now using the wrong orientation on the given screen.
>
>   Is this an emulator bug?  Is this a 1.5 bug?  Or have I done something 
> wrong?  Does the emulator have any ability to simulate orientation changes?  
> I don't see any menu option for it...
>
>   Thanks
>
>                                    - Chris

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


[android-beginners] Re: Layout help, is it possible to "wrap" controls?

2010-03-31 Thread Stormtap Studios
I saw that span stuff in the documentation for TextView and I looked
into it but I didn't find this!  Thanks so much this is definitely way
better and exactly what I need.

Thanks Carmen,

Rob

On Mar 30, 6:46 pm, Carmen Delessio  wrote:
> Take a look at this.  I think it may solve part of the problem you are
> looking at;
> *Selecting, Highlighting, or Styling Portions of Text* *You can highlight or
> style the formatting of strings or substrings of text in a TextView object.*
> ...
> *the following code snippet demonstrates creating a string with a
> highlighted section, italic section, and bold section, and adding it to an
> EditText 
> object.*http://developer.android.com/intl/zh-CN/guide/appendix/faq/commontask...
>
> Carmen
>
> --
> Carmen 
> Delessiohttp://www.twitter.com/CarmenDelessiohttp://www.talkingandroid.comhttp://www.facebook.com/BFFPhotohttp://www.twitter.com/DroidDrop
>
> On Tue, Mar 30, 2010 at 8:00 PM, Stormtap Studios
> wrote:
>
>
>
> > BTW, due to the way messages are formatted when sent to this group,
> > the part where the letters go down in a column should have a bunch of
> > spaces in front of them so they're lined up with the a at the end of
> > the first line (i.e. they are all against the right edge of the
> > screen).
>
> > On Mar 30, 4:58 pm, Stormtap Studios  wrote:
> > > Hi guys,
>
> > > I'm trying to build a custom TextView solution.  I want to be able to
> > > create text views with some "tagged" text, e.g. "This text is
> > > italicand this text is bold", and since you can only set
> > > one style for all the text in the textview I need to come up with
> > > something custom.  I've written a class that will parse the string and
> > > generate an array of pairs (text paired with style to apply to the
> > > text).
>
> > > What I am trying to figure out is how to get a series of TextView
> > > objects arranged on the screen such that they wrap around the width of
> > > their container.
>
> > > I tried this:
>
> > >          > >                 xmlns:android="
> >http://schemas.android.com/apk/res/android";
> > >                 android:layout_width="fill_parent"
> > >                 android:layout_height="fill_parent"
> > >                 android:orientation="horizontal"
> > >                 android:id="@+id/TestLayout">
> > >         
>
> > > And then I tried having my class take a LinearLayout object, and add
> > > TextView objects to it, one for each pair (with the styles applied to
> > > each individual TextView object).  This doesn't work.  The content
> > > doesn't wrap to a new line when it hits the edge of the screen.  So
> > > for example for this string:  "This is a long italic string.
> > > and this is normal text and this is bold", the output looks
> > > like this:
>
> > > This is a long italic string, and this is normal text, a
>
> > > n
>
> > > d
>
> > > t
>
> > > h
>
> > > i
>
> > > s
>
> > > i
>
> > > s
>
> > > b
>
> > > o
>
> > > l
>
> > > d
>
> > > Whereas I would like it to look like this:
>
> > > This is a long italic string, and this is normal text,
> > > and this is bold
>
> > > I've tried all kinds of combinations for layout settings to try to get
> > > it to work, and haven't had any luck.  Does anyone have any advice for
> > > how I might get the labels to wrap nicely?
>
> > > I've been thinking that instead I could just use a WebView, and pass
> > > it the text to render, but I am worried about the overhead and speed
> > > of doing this.  These custom labels will appear in a fullscreen
> > > ListView with many rows.  I'm worried having a webview in each row for
> > > a large set would be extremely slow.
>
> > > Thanks in advance for reading and any advice,
>
> > > Rob
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
>
> > NEW! Try asking and tagging your question on Stack Overflow at
> >http://stackoverflow.com/questions/tagged/android
>
> > To unsubscribe from this group, send email to
> > android-beginners+unsubscr...@googlegroups.com > i...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-beginners?hl=en
>
> > To unsubscribe, reply using "remove me" as the subject.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] FileNotFoundException while trying to convert contacts to Vcard

2010-03-31 Thread AndRi
Hi

I m trying to convert the contacts on emulator to VCard format using
the code  below

AssetFileDescriptor afd
=openAssetFileDescriptor(Contacts.CONTENT_VCARD_URI ,"r")

The stack Trace says
java.io.FileNotFoundException No file at 
content://com.android.contacts/contacts/as_vcard

Do we need to attach a file to the URI ? Is there some other way to
convert Contacts to Vcard in Android?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


[android-beginners] Re: R.id cannot be resolved

2010-03-31 Thread mnavlani
actually the name i used for the listview in r.java was diff frm the
one i was using in the main .java file
i corrected that!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


Re: [android-beginners] How can i integrate facebook connect api in any android application?

2010-03-31 Thread wahib haq
hello experts !!

I have been searching for help regarding usage of fbconnect api in
android app for a long time. I posted numerous posts on the group but
there wasnt any helpful reply. I tried with the code given in
fbconnect api in downloads section. After entering the facebook
application keys correctly all i get is a blank white screen as i try
to connect. this issue was widely posted in the issue section and i
got no solution to this.

then i found out that there is fbrocket api available to use facebook
api in more easier way. but the code is not available and no help as
well.

dear kevin, i have a little experience of using http get/post requests
so i will be very thankful if you can help me out to get started . I
intent to add login functionality in my app using facebook account in
first phase. I'll be truly thankful.

regards,
wahib

On 3/31/10, Kevin Duffey  wrote:
> Yah.. that wouldn't make any sense then. Looking at the api.. there is a
> REST-like api anyone can use. To me, looks like this might be a better
> avenue of integration than the iPhone ported SDK.
>
> http://wiki.developers.facebook.com/index.php/API#REST_Interface
>
> At least it works on all platforms, and is not some sort of SDK built up
> around it. I will probably go this route over adding extra libraries. I can
> then use specifically what I want and it's easy enough to formulate GET/POST
> http requests from Android.
>
>
> On Tue, Mar 30, 2010 at 4:45 PM, Justin Anderson
> wrote:
>
>> Not all android devices ship with a built-in facebook app.  Whoever the
>> actual developer is of the app would have to expose login information like
>> that via intents and intent filters...
>>
>> But that would be counterproductive for the developer of your facebook app
>> because he/she wants you to use that specific app.  Now, I don't know for
>> sure that it is not possible but I would be willing to bet that it isn't.
>>
>>
>>
>> --
>> There are only 10 types of people in the world...
>> Those who know binary and those who don't.
>> --
>>
>>
>> On Tue, Mar 30, 2010 at 5:29 PM, Kevin Duffey  wrote:
>>
>>> So I have a question about this. There is a built in facebook app on my
>>> droid. Maybe it's not on all android devices.. but basically I can't
>>> remove
>>> it (that I know of) and I sign in to it. Can't an app access the built-in
>>> facebook to sign in and not have to display some facebook sign in page
>>> directly to utilize facebook? Is there no way to make use of the facebook
>>> app that comes with Android?
>>>
>>>
>>> On Tue, Mar 30, 2010 at 3:07 PM, Justin Anderson >> > wrote:
>>>
 Well, what errors are you getting in your manifest file?

 --
 There are only 10 types of people in the world...
 Those who know binary and those who don't.
 --



 On Tue, Mar 30, 2010 at 4:09 AM, Maxood  wrote:

> What's the procedure to run Facebook Connect application in android?
> Here is the link:http://code.google.com/p/fbconnect-android/
>
> Please explain step by step. I'm having errors in my manifest file:
>
> android:theme="@android:style/
> Theme.Translucent.NoTitleBar"/>
> android:name="com.codecarpet.fbconnect.FBPermissionActivity"
>android:theme="@android:style/
> Theme.Translucent.NoTitleBar"/>
> android:name="com.codecarpet.fbconnect.FBFeedActivity"
>android:theme="@android:style/
> Theme.Translucent.NoTitleBar"/>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
> To unsubscribe from this group, send email to android-beginners+
> unsubscribegooglegroups.com or reply to this email with the words
> "REMOVE ME" as the subject.
>

  --
 You received this message because you are subscribed to the Google
 Groups "Android Beginners" group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> G

Re: [android-beginners] Re: List providers - does it work for Android 1.5?

2010-03-31 Thread Mark Murphy
ckloch wrote:
> Dear Andrian.
> 
> Thank you for your feed-back.
> I keep on trying to understand List providers.
> It should provide me a list of GPS satelitte from where I can read the
> coordinates.
> Unfortunately, providers is empty and hence my HTC Hero force me to
> close it when running on the phone and reaches the line
> GeoPoint p = new GeoPoint((int) (location.getLatitude() * 1E6),
>  (int) (location.getLongitude() * 1E6));

When you run into that message, use adb logcat, DDMS, or the DDMS
perspective in Eclipse to examine your Java stack trace to see what the
exception was.

In this case, I believe it is a NullPointerException.

> I have no problem in compilling the code.
> 
> Ideas are very welcome as well as code examples (I have inserted my
> code below)
> Thanks in advance.
> 
> protected void onResume() {
>   List providers;
> 
>   super.onResume();
> 
>   locationManager = (LocationManager)
> getSystemService(Context.LOCATION_SERVICE);
>   providers = locationManager.getProviders(true);
> 
>   if (!providers.isEmpty()) {
>location = locationManager.getLastKnownLocation((String)
> providers
>   .get(0));

location will be null at this point, in all likelihood.

>locationManager.requestLocationUpdates((String)
> providers.get(0),
>15000, 1, this);
>}

Sometime after you call this, getLastKnownLocation() will start working.
Until this point, though, the location provider may not be on and
collecting data.

Here is a sample application demonstrating obtaining your location via GPS:

http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/

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

Android Development Wiki: http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


[android-beginners] Re: List providers - does it work for Android 1.5?

2010-03-31 Thread ckloch
Dear Andrian.

Thank you for your feed-back.
I keep on trying to understand List providers.
It should provide me a list of GPS satelitte from where I can read the
coordinates.
Unfortunately, providers is empty and hence my HTC Hero force me to
close it when running on the phone and reaches the line
GeoPoint p = new GeoPoint((int) (location.getLatitude() * 1E6),
   (int) (location.getLongitude() * 1E6));
I have no problem in compilling the code.

Ideas are very welcome as well as code examples (I have inserted my
code below)
Thanks in advance.

protected void onResume() {
List providers;

super.onResume();

locationManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
providers = locationManager.getProviders(true);

if (!providers.isEmpty()) {
 location = locationManager.getLastKnownLocation((String)
providers
.get(0));
 locationManager.requestLocationUpdates((String)
providers.get(0),
 15000, 1, this);
 }
 GeoPoint p = new GeoPoint((int) (location.getLatitude() * 1E6),
   (int) (location.getLongitude() * 1E6));


 mc.animateTo(p);
 mc.setZoom(17);
 mapView.setSatellite(true);
 mapView.setStreetView(true);
 mapView.invalidate();

}

On 29 Mar., 15:20, Adrian Vintu  wrote:
> List providers;
>
> Normally you should get only some warning on this, but it depends on your
> switches.
>
> If you use Eclipse, just hover over your error/warning and you will get
> options on how to fix it. Also Ctrl+1 to get the options.
>
> BR,
> Adrian Vintuhttp://adrianvintu.com
>
>
>
> On Mon, Mar 29, 2010 at 3:08 PM, ckloch  wrote:
> > In my effort to develop a small location finder app for HTC Hero with
> > Android 1.5, I am using the code below that should work on Android
> > 1.6.
> > My problem is that includes the commandline to find the available GPS
> > satelittes: List providers;
>
> > Eclipse tells me that I have to parameterize List, but not how.
> > Please, help me to understand List providers and what I can do to get
> > it working?
> > Thank you in advance for your help.
>
> > protected void onResume() {
> >        List providers;
> >        super.onResume();
>
> >        locationManager = (LocationManager)
> > getSystemService(Context.LOCATION_SERVICE);
> >        providers = locationManager.getProviders(true);
>
> >            if (!providers.isEmpty()) {
> >              location = locationManager.getLastKnownLocation((String)
> > providers
> >                   .get(0));
> >               locationManager.requestLocationUpdates((String)
> > providers.get(0),
> >                   15000, 1, this);
> >             }
> >             GeoPoint p = new GeoPoint((int) (location.getLatitude() *
> > 1E6),
> >                 (int) (location.getLongitude() * 1E6));
> >             mc.animateTo(p);
> >             mc.setZoom(17);
> >             mapView.setSatellite(true);
> >             mapView.setStreetView(true);
> >             mapView.invalidate();
>
> >    }
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
>
> > NEW! Try asking and tagging your question on Stack Overflow at
> >http://stackoverflow.com/questions/tagged/android
>
> > To unsubscribe from this group, send email to
> > android-beginners+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-beginners?hl=en
>
> > To unsubscribe from this group, send email to android-beginners+
> > unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> > ME" as the subject.- Skjul tekst i anførselstegn -
>
> - Vis tekst i anførselstegn -

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


Re: [android-beginners] Re: How to save a file to res/raw ?

2010-03-31 Thread Mark Murphy
Kritzli wrote:
> Thanks for your replies. That are bad news for me.
> Hm, if i cant't save them to res/raw directory, i still can write and
> read them to the local data store, can't i ?
> I mean can I access data/data//files/ ?

Yes. Files that ship with the application (e.g., res/raw/) are
read-only. Files that you write to are read-write.

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

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


[android-beginners] Re: How to save a file to res/raw ?

2010-03-31 Thread Kritzli
Thanks for your replies. That are bad news for me.
Hm, if i cant't save them to res/raw directory, i still can write and
read them to the local data store, can't i ?
I mean can I access data/data//files/ ?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


[android-beginners] API demo search invoke, received search action by onNewIntent()

2010-03-31 Thread Yee
Hi Guys:

For invoke search android example, every time query search result is
received by onCreate(). How can i make it received by onNewIntent().
What kind of operation can cause onNewIntent() receive intent?


thx

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.


Re: [android-beginners] Proper way to finish an activity

2010-03-31 Thread Peter Fortuin
Hi DroidBy,

Maybe it's a good idea to read the following:
http://developer.android.com/guide/topics/fundamentals.html#actlife
Read the part about the Activity lifecycle. That should answer your
questions.

Kind regards,

Peter


2010/3/31 DroidBy 

> I think someone here can anwer me..
>
> I have an application with 3 activities, A, B and C.
> Three points here:-
> 1. In normal user sequence, activity A will start activity B, activity
> B will then start activity C.
>
> 2. In case, user is also allowed to cancel activity B (by a button),
> and it will resume back to activity A.
>
> 3. If activity B is interrupted by any application which comes into
> foreground, activity B should be killed and user should start from
> activity A if user navigate back to my application.
>
> In point 2, I have called finish() if user click on the button;
>
> In point 3, I have called finish in activity B onPause() function
>
> End up, I get an warning saying that I have duplicate finish request
> by Activity Manager as in point 2, the onPause() will be called also.
>
> So, does anyone here no how should I do in handling for point 2 so
> that I am able to resume to activity A after user cancels activity B?
> Or how should I do in case to stop my activity B so that user always
> start from activity A?
>
>
> Any best advise here?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Proper way to finish an activity

2010-03-31 Thread DroidBy
I think someone here can anwer me..

I have an application with 3 activities, A, B and C.
Three points here:-
1. In normal user sequence, activity A will start activity B, activity
B will then start activity C.

2. In case, user is also allowed to cancel activity B (by a button),
and it will resume back to activity A.

3. If activity B is interrupted by any application which comes into
foreground, activity B should be killed and user should start from
activity A if user navigate back to my application.

In point 2, I have called finish() if user click on the button;

In point 3, I have called finish in activity B onPause() function

End up, I get an warning saying that I have duplicate finish request
by Activity Manager as in point 2, the onPause() will be called also.

So, does anyone here no how should I do in handling for point 2 so
that I am able to resume to activity A after user cancels activity B?
Or how should I do in case to stop my activity B so that user always
start from activity A?


Any best advise here?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.