[android-beginners] Re: how to change colours in a .xml defined layout in run time

2010-08-06 Thread ckloch
Thank you very much for your input
I have solved the problem and the application is now ready for trial.

best regards
ckloch

On 23 Jun., 17:38, TreKing treking...@gmail.com wrote:
 On Wed, Jun 16, 2010 at 6:55 AM, ckloch htc.kl...@hotmail.com wrote:
  In theory it seems to be easy, but I would highly appreciate your help on
  how to do this in Android as I cannot see how I start changing the colours
  of the individual bar in the screen after initially defining the screen.

 Whatever View you're using to represent the bars should have some background
 property for changing it's background image or color. Try that.

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

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

ATTENTION: Android-Beginners will be permanently disabled on August 9 2010. For 
more information about this change, please read [http://goo.gl/xkfl] or visit 
the Group home page.

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: How comes that the estimate time becomes negative

2010-08-06 Thread ckloch
Dear all,

I have solved my problem, so the issue below is no logner relevant

Thank you for all the great input I have got in this forum

best regards
CKLOCH

On 22 Jun., 11:25, ckloch htc.kl...@hotmail.com wrote:
 Dear all,

 I have developed a small app that helps the driver to regulate his
 speed in order to pass the traffic light when it is green; and thereby
 minimizing the number of times that he has to stop for red.

 But, the app does not always work as anticipated.
 In my app, I need to get the timedifference from when he starts
 driving to the actual time.
 This time is needed in order to calculate whether he will reach the
 light when it is green, or if he needs to slow down in case the
 current speed is too high.

 I will appreciate any help that can guide me in the right direction to
 identify the problem: is it due to Java and that it cannot control the
 on-going queueing of GPS data? is it due to problems with HTC Hero and
 Android 1.5; or is it something much more simple that causes my
 problem. Please, send me your input.
 I have inserted the most relevant parts of the code below which is
 structurized as:

 1) gpspos() is the function called when I want to start the routine
 (the main app is launched before).

 2) initial_time should contain the timesample from when I call the
 routine. That is the reason why I set it to zero in the beginning and
 then update it the first time the conditions  distance_1 radius and
 counter_L are fulfilled. These conditions are fulfilled when I call
 gpspos().

 3) time=location.getTime() is the GPS clock.

 4) double spend_time_1_sec = (time - initial_time); determines the
 time spend since I called gpspos().

 Thank you for your time and helpCKLOCH

 public void gpspos() {
 super.onResume();

 LocationManager locMgr = (LocationManager)
 getSystemService(Context.LOCATION_SERVICE);
                 LocationListener locListener = new LocationListener()
                 {

                 double initial_time = 0;

                 public void    onLocationChanged(Location location)
                 {

                     if (location != null)
                             {
                             double time = location.getTime()/1000;
                             double spend_time_1_sec = (time -
 initial_time);

                                 if (distance_1radius 
 counter_L==1)  // This is only true once when the routine gpspos() is
 called
                         {
                         initial_time = location.getTime()/1000; //
 initial_time is in seconds
                         }
                             }
                 }



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

ATTENTION: Android-Beginners will be permanently disabled on August 9 2010. For 
more information about this change, please read [http://goo.gl/xkfl] or visit 
the Group home page.

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: how to self-close an Activity

2010-07-30 Thread Indicator Veritatis
I have the same question. And even if they are done with it, I have
another question: how do you suppose the user will react when he sees
it auto-close? That is, do you really think the user expects this? I
am not aware of any other app that does this, the user's expectation
is based on these other apps, a de facto standard has emerged. That
standard is: let the user close it.

Ruby programmers like to talk about the principle of least surprise:
the principle applies at least as well to UI design as it does to
code.

On Jul 29, 10:53 am, TreKing treking...@gmail.com wrote:
 On Thu, Jul 29, 2010 at 6:39 AM, cellurl gpscru...@gmail.com wrote:
  I want to auto-close my about-window after 10 seconds

 Why? Do you not trust the user to do this? What if they're not done with it?

 -
 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 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: How can my app let people pick a picture that I use as background in my app?

2010-07-30 Thread cellurl
I believe in transparency... In 1 month, my app has had 41 total
installs, 21 paid (non canceled).

-- 
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: how to self-close an Activity

2010-07-30 Thread cellurl
my customers have requested auto-close. Its not actually closing an
about-box, its on a things-are-progressing type pop-up window.
Also, my customers are in their car, so they need to safely glance at
the screen while its safely docked on the dashboard. I have resisted
it for 6 months, but I can always put it back...

jim





-- 
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: how to self-close an Activity

2010-07-30 Thread TreKing
On Fri, Jul 30, 2010 at 1:04 PM, cellurl gpscru...@gmail.com wrote:

 Its not actually closing an about-box, its on a things-are-progressing
 type pop-up window.


Well that makes quite the difference =)

I still wonder why a things-are-progressing type pop-up would close after
some time and not, you know, when things-are-done-progressing ... but it's
your app.

Regardless, I would go with Justin's suggestion to use a Timer.

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

-- 
You received this message because you are subscribed to the Google
Groups Android 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: how to self-close an Activity

2010-07-30 Thread Indicator Veritatis
Also, if it is a things are progressing display rather than an About
box, why aren't you using an android.Widget.ProgressBar instead?
People are used to seeing a Progress Bar disappear when the underlying
things are done. But they are not so used to About boxes (or things
like them) disappearing.

Besides: what is the point of making an entire Activity for this? Of
course, since I don't know your app, I can't be 100% sure, but it does
sound like overkill.

On Jul 30, 12:07 pm, TreKing treking...@gmail.com wrote:
 On Fri, Jul 30, 2010 at 1:04 PM, cellurl gpscru...@gmail.com wrote:
  Its not actually closing an about-box, its on a things-are-progressing
  type pop-up window.

 Well that makes quite the difference =)

 I still wonder why a things-are-progressing type pop-up would close after
 some time and not, you know, when things-are-done-progressing ... but it's
 your app.

 Regardless, I would go with Justin's suggestion to use a Timer.

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

-- 
You received this message because you are subscribed to the Google
Groups Android 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: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Nick Richardson
Step 1: Create new activity
Step 2: Create intent to launch that activity
Step 3: startActivityForResult()
Step 4: 
Step 5: Profit!

http://developer.android.com/reference/android/app/Activity.html#StartingActivities


On Wed, Jul 28, 2010 at 7:57 PM, cellurl gpscru...@gmail.com wrote:

 Can you elaborate a bit please? Intent covers so much material.
 Thank you very much!
 Jim


 On Jul 25, 10:36 am, Paul Turchenko paul.turche...@gmail.com wrote:
  Use intent to pick a picture and start activity for result
 
  On Jul 24, 10:47 pm, cellurl gpscru...@gmail.com wrote:
 
   How do I launch some external application to show phone pictures and
   let users pick one?
 
   The picture will serve as a background in my app.
   So all in all, I just need their selection. e.g. the path/name once
   they have chosen it.
 
   Something simple would be nice ;-)
 
   thanks
   jim

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




-- 
//Nick Richardson
//richardson.n...@gmail.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


Re: [android-beginners] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Justin Anderson
 Step 4: 
That would be onActivityResult()... taken directly from the link you posted

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


On Thu, Jul 29, 2010 at 2:53 PM, Nick Richardson
richardson.n...@gmail.comwrote:

 Step 1: Create new activity
 Step 2: Create intent to launch that activity
 Step 3: startActivityForResult()
 Step 4: 
 Step 5: Profit!


 http://developer.android.com/reference/android/app/Activity.html#StartingActivities


 On Wed, Jul 28, 2010 at 7:57 PM, cellurl gpscru...@gmail.com wrote:

 Can you elaborate a bit please? Intent covers so much material.
 Thank you very much!
 Jim


 On Jul 25, 10:36 am, Paul Turchenko paul.turche...@gmail.com wrote:
  Use intent to pick a picture and start activity for result
 
  On Jul 24, 10:47 pm, cellurl gpscru...@gmail.com wrote:
 
   How do I launch some external application to show phone pictures and
   let users pick one?
 
   The picture will serve as a background in my app.
   So all in all, I just need their selection. e.g. the path/name once
   they have chosen it.
 
   Something simple would be nice ;-)
 
   thanks
   jim

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




 --
 //Nick Richardson
 //richardson.n...@gmail.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.comandroid-beginners%2bunsubscr...@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] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Nick Richardson
Indeed it would - I was hoping celluri would pick that part up on his own,
but you had to go and ruin the surprise!! :)

On Thu, Jul 29, 2010 at 1:58 PM, Justin Anderson janderson@gmail.comwrote:

  Step 4: 
 That would be onActivityResult()... taken directly from the link you posted

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


 On Thu, Jul 29, 2010 at 2:53 PM, Nick Richardson 
 richardson.n...@gmail.com wrote:

 Step 1: Create new activity
 Step 2: Create intent to launch that activity
 Step 3: startActivityForResult()
 Step 4: 
 Step 5: Profit!


 http://developer.android.com/reference/android/app/Activity.html#StartingActivities


 On Wed, Jul 28, 2010 at 7:57 PM, cellurl gpscru...@gmail.com wrote:

 Can you elaborate a bit please? Intent covers so much material.
 Thank you very much!
 Jim


 On Jul 25, 10:36 am, Paul Turchenko paul.turche...@gmail.com wrote:
  Use intent to pick a picture and start activity for result
 
  On Jul 24, 10:47 pm, cellurl gpscru...@gmail.com wrote:
 
   How do I launch some external application to show phone pictures and
   let users pick one?
 
   The picture will serve as a background in my app.
   So all in all, I just need their selection. e.g. the path/name once
   they have chosen it.
 
   Something simple would be nice ;-)
 
   thanks
   jim

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




 --
 //Nick Richardson
 //richardson.n...@gmail.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.comandroid-beginners%2bunsubscr...@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.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en




-- 
//Nick Richardson
//richardson.n...@gmail.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


Re: [android-beginners] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Justin Anderson
I figured I would let him figure out Step 5 the hard way  ;-)

Unless you have an absolutely freaking amazing app there is no profit.  I
have an app on the market that I think is pretty cool.  There is a free
version and a donate key for $0.99 that unlocks a few extra features.

I've made about $170 or so since last October...  With the amount of time I
put in to it I think I am making less than a penny per hour.  But I do it
for the fun of programming and because it is an app that I wanted on my
phone and couldn't find any that fully suited my needs...



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


On Thu, Jul 29, 2010 at 3:34 PM, Nick Richardson
richardson.n...@gmail.comwrote:

 Indeed it would - I was hoping celluri would pick that part up on his own,
 but you had to go and ruin the surprise!! :)

 On Thu, Jul 29, 2010 at 1:58 PM, Justin Anderson 
 janderson@gmail.comwrote:

  Step 4: 
 That would be onActivityResult()... taken directly from the link you
 posted

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


 On Thu, Jul 29, 2010 at 2:53 PM, Nick Richardson 
 richardson.n...@gmail.com wrote:

 Step 1: Create new activity
 Step 2: Create intent to launch that activity
 Step 3: startActivityForResult()
 Step 4: 
 Step 5: Profit!


 http://developer.android.com/reference/android/app/Activity.html#StartingActivities


 On Wed, Jul 28, 2010 at 7:57 PM, cellurl gpscru...@gmail.com wrote:

 Can you elaborate a bit please? Intent covers so much material.
 Thank you very much!
 Jim


 On Jul 25, 10:36 am, Paul Turchenko paul.turche...@gmail.com wrote:
  Use intent to pick a picture and start activity for result
 
  On Jul 24, 10:47 pm, cellurl gpscru...@gmail.com wrote:
 
   How do I launch some external application to show phone pictures and
   let users pick one?
 
   The picture will serve as a background in my app.
   So all in all, I just need their selection. e.g. the path/name once
   they have chosen it.
 
   Something simple would be nice ;-)
 
   thanks
   jim

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




 --
 //Nick Richardson
 //richardson.n...@gmail.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.comandroid-beginners%2bunsubscr...@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.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en




 --
 //Nick Richardson
 //richardson.n...@gmail.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.comandroid-beginners%2bunsubscr...@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] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Nick Richardson
Join the club... I've made $8 in three weeks from mine.  At this rate, i'll
pay for my market account about the time it starts to snow :)

On Thu, Jul 29, 2010 at 2:39 PM, Justin Anderson janderson@gmail.comwrote:

 I figured I would let him figure out Step 5 the hard way  ;-)

 Unless you have an absolutely freaking amazing app there is no profit.  I
 have an app on the market that I think is pretty cool.  There is a free
 version and a donate key for $0.99 that unlocks a few extra features.

 I've made about $170 or so since last October...  With the amount of time I
 put in to it I think I am making less than a penny per hour.  But I do it
 for the fun of programming and because it is an app that I wanted on my
 phone and couldn't find any that fully suited my needs...




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


 On Thu, Jul 29, 2010 at 3:34 PM, Nick Richardson 
 richardson.n...@gmail.com wrote:

 Indeed it would - I was hoping celluri would pick that part up on his own,
 but you had to go and ruin the surprise!! :)

 On Thu, Jul 29, 2010 at 1:58 PM, Justin Anderson janderson@gmail.com
  wrote:

  Step 4: 
 That would be onActivityResult()... taken directly from the link you
 posted

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


 On Thu, Jul 29, 2010 at 2:53 PM, Nick Richardson 
 richardson.n...@gmail.com wrote:

 Step 1: Create new activity
 Step 2: Create intent to launch that activity
 Step 3: startActivityForResult()
 Step 4: 
 Step 5: Profit!


 http://developer.android.com/reference/android/app/Activity.html#StartingActivities


 On Wed, Jul 28, 2010 at 7:57 PM, cellurl gpscru...@gmail.com wrote:

 Can you elaborate a bit please? Intent covers so much material.
 Thank you very much!
 Jim


 On Jul 25, 10:36 am, Paul Turchenko paul.turche...@gmail.com wrote:
  Use intent to pick a picture and start activity for result
 
  On Jul 24, 10:47 pm, cellurl gpscru...@gmail.com wrote:
 
   How do I launch some external application to show phone pictures
 and
   let users pick one?
 
   The picture will serve as a background in my app.
   So all in all, I just need their selection. e.g. the path/name once
   they have chosen it.
 
   Something simple would be nice ;-)
 
   thanks
   jim

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




 --
 //Nick Richardson
 //richardson.n...@gmail.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.comandroid-beginners%2bunsubscr...@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.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en




 --
 //Nick Richardson
 //richardson.n...@gmail.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.comandroid-beginners%2bunsubscr...@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.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this 

[android-beginners] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-28 Thread cellurl
Can you elaborate a bit please? Intent covers so much material.
Thank you very much!
Jim


On Jul 25, 10:36 am, Paul Turchenko paul.turche...@gmail.com wrote:
 Use intent to pick a picture and start activity for result

 On Jul 24, 10:47 pm, cellurl gpscru...@gmail.com wrote:

  How do I launch some external application to show phone pictures and
  let users pick one?

  The picture will serve as a background in my app.
  So all in all, I just need their selection. e.g. the path/name once
  they have chosen it.

  Something simple would be nice ;-)

  thanks
  jim

-- 
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: How to open a new Activity in a new window (calling a new activity)?

2010-07-25 Thread poojan9118
Intent intent = new intent(this,class_name.class);
startActivity(intent);
finish();
try this!!

On Jul 23, 4:09 am, Victoria Busse victoriasarabu...@gmail.com
wrote:
 Alright, thanks, I'll try that now :)

 On Thu, Jul 22, 2010 at 11:09 PM, Justin Anderson
 janderson@gmail.comwrote:

  Yes... Intents can be used for your own Activities.  You do need to make
  sure that you have the activity you are trying to call in your manifest file
  though.

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

  On Thu, Jul 22, 2010 at 3:20 PM, Victoria Busse 
  victoriasarabu...@gmail.com wrote:

  Then this must have been a misunderstanding I thought intents were only
  for calling already existing apps of the phone and not my own created 
  ones..
  :))

  And if I now understand it correctly if I click on the button I can simply
  call the intent from the java file I created to open the new view?!?!

  On Thu, Jul 22, 2010 at 10:16 PM, Justin Anderson 
  janderson@gmail.com wrote:

  And why would you not use an Intent and create a new activity for this?
  From what you are describing I see no reason why you wouldn't want to do 
  it
  this way.

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

  On Thu, Jul 22, 2010 at 3:13 PM, Victoria Busse 
  victoriasarabu...@gmail.com wrote:

  I am working on a video editing app and when I select a video from a
  gallery like view a menu comes, from which I can choose edit video ... 
  and
  from there a new view/window should open that loads the video into 
  it I
  hope that makes it a bit clearer :)

  On Thu, Jul 22, 2010 at 10:10 PM, Justin Anderson 
  janderson@gmail.com wrote:

  Not really sure I follow...  What do you mean by selected content?

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

  On Thu, Jul 22, 2010 at 3:07 PM, Victoria Busse 
  victoriasarabu...@gmail.com wrote:

  Hi there,

  sorry for the following explanation... I just didn't know how to
  describe it differently...

  What I would like to do is when I click a certain button, my app
  should open a new window and loading the selected content into this 
  new
  window/view. It shouldn't be like e.g. the send intent, which opens a
  completely different, but still be part of my app just showing a 
  completely
  new view...

   I just don't know right now, what I have to do or even if this is
  possible, so if anyone could help me or direct into the correct 
  direction or
  knows a great tut for that...any sort of help is more than welcome...

  Thank you very much

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

   

[android-beginners] Re: How to access xml layout

2010-07-08 Thread Connie
Oh yes, I forgot that I hit that one as well. For the people who find
this thread in the future, you can also not have underscores in the
xml name.

Connie

On Jul 7, 5:05 pm, Amit Sood sood.is...@gmail.com wrote:
 Connie,

 This was happening because you cannot use letter in caps in the filenameOn 
 Thu, Jul 8, 2010 at 2:32 AM, Connie Walsh con...@walshclan.biz wrote:
  I have had this happen a couple of times. These are some things I tried:

     1. Closed other open projects.
     2. Checked the directory that the file is actually in the reslayout. I
     have mistakenly put it in the resvalues area.
     3. Closed the project and reopen.

  God Bless,
  Connie

  613-424-1146 (home)

  On 7 July 2010 16:43, Amit Sood sood.is...@gmail.com wrote:

  i have created another xml file in the res--layout folder and that too is
  not coming up when i do R.layout.

  On Thu, Jul 8, 2010 at 2:09 AM, Amit Sood sood.is...@gmail.com wrote:

  it gives an error which sayes Home cannot be resolved

  On Thu, Jul 8, 2010 at 2:04 AM, Justin Anderson janderson@gmail.com
   wrote:

  What happens when you just use R.layout.Home and build?

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

  On Wed, Jul 7, 2010 at 2:25 PM, Amit Sood sood.is...@gmail.com wrote:

  Thanks for the reply.

  Yes you are correct it should come up in the eclipse popup but for some
  reason it is not.

  I have attached my project for your reference

  Please advise.

  Massive thanks

  On Thu, Jul 8, 2010 at 1:40 AM, Justin Anderson 
  janderson@gmail.com wrote:

  * I have created a new java class, but when i do R.layout. in the
  setContentView method i cannot find my Home.xml file*.* I can see the
  main.xml which is created by default.*

  Not sure exactly what you mean here...

  You should be able to access it via 'R.layout.Home'. If you are
  talking about the popup window in Eclipse for autofill then you will 
  need to
  rebuild your project (which will rebuild the R class) and then it 
  should
  show up.

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

  On Wed, Jul 7, 2010 at 1:52 PM, Amit Sood sood.is...@gmail.comwrote:

  Hello,

  I have just created a new xml file to define layout for one of my
  activity

  res
  |__layout
             |__Home.xml

  I have created a new java class, but when i do R.layout. in the
  setContentView method i cannot find my Home.xml file. I can see the
  main.xml which is created by default.

  package com.abc.ViewsApp;
  import android.app.Activity;
  import android.os.Bundle;
  public class clHome extends Activity
  {
        �...@override
         protected void onCreate(Bundle savedInstanceState) {
                 // TODO Auto-generated method stub
                 super.onCreate(savedInstanceState);
                 setContentView(R.layout.);
         }
  }

  Please advise.

  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.comandroid-beginners%2Bunsubscr
   i...@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.comandroid-beginners%2Bunsubscr
   i...@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.comandroid-beginners%2Bunsubscr
   i...@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] Re: How to (properly) get device orientation data?

2010-06-22 Thread repDetect()
On Jun 17, 11:56 am, lawrizy lawr...@gmail.com wrote:
 Hi,

 I wanna thank you very much for your explanation. The official
 documentation was very difficult to understand. And the example in the
 api sample (the compass) does use a depreciated methods  (with
 sensorlistener).

Nice, I'm glad it's been useful.
Just remember, this is definitely not definitive.

 I don't understand what does remapCoordinateSystem and his parameters,
 could you help?

Hmm, not sure where is the difficulty, but in my example it
demonstrates remapping to camera's line of view (Y axis along the
camera's axis instead of the device length) as used in augmented
reality applications.

I think that on this one the documentation is pretty extensive try
looking it up again at:
http://developer.android.com/reference/android/hardware/SensorManager.html#remapCoordinateSystem(float[],%20int,%20int,%20float[])

For what it worth, Rick Deckard.

-- 
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: How to (properly) get device orientation data?

2010-06-22 Thread lawrizy
Thank you for your answer. I will try on a device.


On 22 juin, 11:17, repDetect() n6mba50...@gmail.com wrote:
 On Jun 17, 11:56 am, lawrizy lawr...@gmail.com wrote:

  Hi,

  I wanna thank you very much for your explanation. The official
  documentation was very difficult to understand. And the example in the
  api sample (the compass) does use a depreciated methods  (with
  sensorlistener).

 Nice, I'm glad it's been useful.
 Just remember, this is definitely not definitive.

  I don't understand what does remapCoordinateSystem and his parameters,
  could you help?

 Hmm, not sure where is the difficulty, but in my example it
 demonstrates remapping to camera's line of view (Y axis along the
 camera's axis instead of the device length) as used in augmented
 reality applications.

 I think that on this one the documentation is pretty extensive try
 looking it up again 
 at:http://developer.android.com/reference/android/hardware/SensorManager...[],%20int,%20int,%20float[])

 For what it worth, Rick Deckard.

-- 
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: How to (properly) get device orientation data?

2010-06-21 Thread Ricky
Hi,

Thanks for the explanation. It was very useful.  I am trying to get 2
variables to store the lat/lon.  Can we do that continuously? As in
have 3 variables. One each for current azimuth, Lat and lon.  What
changes would we need to make in the code you provided here?
implementing LocationListener along with the this listener should do I
guess? But I tried and am unable to get both location and orientation
at the 'same time'.
thanks
Ricky

On Jun 17, 9:56 am, lawrizy lawr...@gmail.com wrote:
 Hi,

 I wanna thank you very much for your explanation. The official
 documentation was very difficult to understand. And the example in the
 api sample (the compass) does use a depreciated methods  (with
 sensorlistener).

 I don't understand what does remapCoordinateSystem and his parameters,
 could you help?

 Thank you.

 On 16 juin, 06:28, repDetect() n6mba50...@gmail.com wrote:

  Hi,
  While trying to retrieve orientation data I found some pretty straight
  forward code making use of SensorEventListener for
  Sensor.TYPE_ORIENTATION and it works fine, but the
  Sensor.TYPE_ORIENTATION constant has been deprecated recently - I
  believe it was on 8 (API level) - which I understand to mean that
  while I can still use it, I shouldn't.
  The documentation [1] only says use SensorManager.getOrientation()
  instead. [2] but as a newbie, I had difficulties following that
  detailed instruction.

  So the question is:
  How to properly get device orientation data?

  In an attempt to make this discussion constructive, here is what I
  managed to figure out, hopefully it will attract corrections relevant
  to my limitations and not just general pointers to material I already
  read (and misunderstood) and perhaps also benefit other newbies
  struggling with this task.
  So please fix any misconceptions or errors you find below.

  The most important thing to realize is that
  SensorManager.getOrientation() doesn't get the orientation from the
  sensors (as with SensorEvent for Sensor.TYPE_ORIENTATION), it merely
  Computes the device's orientation based on the rotation matrix which
  you must provide as the first parameter.
  In a similar fashion SensorManager.getRotationMatrix() doesn't read
  sensors data to produce the rotation matrix, it depends on you to
  provide the data through the third and forth arguments (gravity,
  geomagnetic), also note that the values of these arguments must be
  within expected limits or the method will fail. This holds in
  particular for the case where these are initialized to zeros, as this
  will imply free fall for gravity and something even more disturbing
  for geomagnetic.
  Don't take my word on it look it up for yourself in the source [3],
  for the Java end at list.

  Once that was digested it appears the only way to get sensor data is
  through registering a sensor event listener (I thought it would be
  really nice if I could query the sensors's readings at will and that
  what I naively assumed was done by the get methods in SensorManager,
  could anyone comment why this is not made available?), then that data
  may be used to calculate the orientation as outlined below:

  1) Retrieve sensor data from accelerometer and magnetic field sensor
  as required by getRotationMatrix():
  This actually involves a number of steps in the Activity class:
  1.1) Obtain a sensor manager.
  NOTE: Context.getSystemService needs a Context, typically called
  within an Activity's context.
                  mSensMan = (SensorManager) getSystemService(SENSOR_SERVICE);

  1.2) Register a sensor event listener for each of the above sensor
  types.
                  mSensMan.registerListener(this,
  mSensMan.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD),
                                  SensorManager.SENSOR_DELAY_UI);
                  mSensMan.registerListener(this,
  mSensMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
                                  SensorManager.SENSOR_DELAY_UI);

  1.3) In the listener's onSensorChanged method copy the data from the
  SensorEvent.values.
  NOTE: The data must be copied off the event.values as the system is
  reusing that array in all SensorEvents, simply assigning won't work.
  public void onSensorChanged(SensorEvent event) {
          switch (event.sensor.getType()) {
                  case Sensor.TYPE_ACCELEROMETER:
                          System.arraycopy(event.values, 0, mGravs, 0, 3);
                          break;
                  case Sensor.TYPE_MAGNETIC_FIELD:
                          System.arraycopy(event.values, 0, mGeoMags, 0, 3);
                          break;
                  default:
                          return;
          }

  }

  2)  Pass the copied sensor data as arrays to
  SensorManager.getRotationMatrix() to receive the rotation matrix.
  SensorManager.getRotationMatrix(mRotationM, null, mGravs, mGeoMags)

  Optionally transform the returned rotation matrix through
  SensorManager.remapCoordinateSystem() or 

[android-beginners] Re: How to (properly) get device orientation data?

2010-06-17 Thread lawrizy
Hi,

I wanna thank you very much for your explanation. The official
documentation was very difficult to understand. And the example in the
api sample (the compass) does use a depreciated methods  (with
sensorlistener).

I don't understand what does remapCoordinateSystem and his parameters,
could you help?

Thank you.

On 16 juin, 06:28, repDetect() n6mba50...@gmail.com wrote:
 Hi,
 While trying to retrieve orientation data I found some pretty straight
 forward code making use of SensorEventListener for
 Sensor.TYPE_ORIENTATION and it works fine, but the
 Sensor.TYPE_ORIENTATION constant has been deprecated recently - I
 believe it was on 8 (API level) - which I understand to mean that
 while I can still use it, I shouldn't.
 The documentation [1] only says use SensorManager.getOrientation()
 instead. [2] but as a newbie, I had difficulties following that
 detailed instruction.

 So the question is:
 How to properly get device orientation data?

 In an attempt to make this discussion constructive, here is what I
 managed to figure out, hopefully it will attract corrections relevant
 to my limitations and not just general pointers to material I already
 read (and misunderstood) and perhaps also benefit other newbies
 struggling with this task.
 So please fix any misconceptions or errors you find below.

 The most important thing to realize is that
 SensorManager.getOrientation() doesn't get the orientation from the
 sensors (as with SensorEvent for Sensor.TYPE_ORIENTATION), it merely
 Computes the device's orientation based on the rotation matrix which
 you must provide as the first parameter.
 In a similar fashion SensorManager.getRotationMatrix() doesn't read
 sensors data to produce the rotation matrix, it depends on you to
 provide the data through the third and forth arguments (gravity,
 geomagnetic), also note that the values of these arguments must be
 within expected limits or the method will fail. This holds in
 particular for the case where these are initialized to zeros, as this
 will imply free fall for gravity and something even more disturbing
 for geomagnetic.
 Don't take my word on it look it up for yourself in the source [3],
 for the Java end at list.

 Once that was digested it appears the only way to get sensor data is
 through registering a sensor event listener (I thought it would be
 really nice if I could query the sensors's readings at will and that
 what I naively assumed was done by the get methods in SensorManager,
 could anyone comment why this is not made available?), then that data
 may be used to calculate the orientation as outlined below:

 1) Retrieve sensor data from accelerometer and magnetic field sensor
 as required by getRotationMatrix():
 This actually involves a number of steps in the Activity class:
 1.1) Obtain a sensor manager.
 NOTE: Context.getSystemService needs a Context, typically called
 within an Activity's context.
                 mSensMan = (SensorManager) getSystemService(SENSOR_SERVICE);

 1.2) Register a sensor event listener for each of the above sensor
 types.
                 mSensMan.registerListener(this,
 mSensMan.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD),
                                 SensorManager.SENSOR_DELAY_UI);
                 mSensMan.registerListener(this,
 mSensMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
                                 SensorManager.SENSOR_DELAY_UI);

 1.3) In the listener's onSensorChanged method copy the data from the
 SensorEvent.values.
 NOTE: The data must be copied off the event.values as the system is
 reusing that array in all SensorEvents, simply assigning won't work.
 public void onSensorChanged(SensorEvent event) {
         switch (event.sensor.getType()) {
                 case Sensor.TYPE_ACCELEROMETER:
                         System.arraycopy(event.values, 0, mGravs, 0, 3);
                         break;
                 case Sensor.TYPE_MAGNETIC_FIELD:
                         System.arraycopy(event.values, 0, mGeoMags, 0, 3);
                         break;
                 default:
                         return;
         }

 }

 2)  Pass the copied sensor data as arrays to
 SensorManager.getRotationMatrix() to receive the rotation matrix.
 SensorManager.getRotationMatrix(mRotationM, null, mGravs, mGeoMags)

 Optionally transform the returned rotation matrix through
 SensorManager.remapCoordinateSystem() or multiplying by a
 transformation matrix.

 3) Pass the rotation matrix to SensorManager.getOrientation() to
 receive the orientation as yaw, pitch and roll expressed in radians.
 SensorManager.getOrientation(mRotationM, mOrientation);

 Voila.

 Below the relevant code is wrapped with a complete Activity to allow
 for testing and to get the whole picture, once again - corrections and
 remarks are requested - the TODO: tags would also indicate areas where
 knowledge is lacking.

 Please handle with care, this newbie is still a little wet and
 slippery!

 

Re: [android-beginners] Re: How to set onClickListener for elements in a Vector

2010-06-17 Thread Justin Anderson
I have never used FrameLayout... so I'm not sure what the correct way to do
this would be.  Hopefully someone else out there has some answers...
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Wed, Jun 16, 2010 at 8:39 PM, KC kane.coch...@gmail.com wrote:

 You brought up a very good point and it got me thinking.  I don't
 think its looping through the Vector.  I have another class that takes
 the values, creates a Canvas and draws text and a simple image on it.
 I need to figure out how to draw a button onto a Canvas.  Right now,
 all I can do is drawText and drawBitmap.  If I can figure out how to
 draw a button, I can probably create a listener on it.

 Any thoughts would be more than welcomed!  Thank you.


 On Jun 16, 4:52 pm, KC kane.coch...@gmail.com wrote:
  Sorry, good point.  The parent is a FrameLayout.  Please let me know
  if I can provide you with more info and thanks so much for trying to
  help with this, I really appreciate it.
 
  KC
 
  On Jun 16, 4:32 pm, Justin Anderson janderson@gmail.com wrote:
 
 
 
   Well, what is the parent layout?  There are different ways/methods to
 do
   this for ListView, ExpandableListView, LinearLayout, RelativeLayout,
 etc...
 
   --
   There are only 10 types of people in the world...
   Those who know binary and those who don't.
   --
 
   On Wed, Jun 16, 2010 at 2:19 PM, KC kane.coch...@gmail.com wrote:

 --
 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.comandroid-beginners%2bunsubscr...@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


[android-beginners] Re: How to set onClickListener for elements in a Vector

2010-06-17 Thread KC
Thanks, Justin. I hope someone can help, because I've spent hours
trying things that clearly don't work :(  Nothing I try is
successfully attaching a click or touch listener to the View I created
and added.

Thanks for trying to help though.


On Jun 17, 5:23 am, Justin Anderson janderson@gmail.com wrote:
 I have never used FrameLayout... so I'm not sure what the correct way to do
 this would be.  Hopefully someone else out there has some answers...
 --
 There are only 10 types of people in the world...
 Those who know binary and those who don't.
 --



 On Wed, Jun 16, 2010 at 8:39 PM, KC kane.coch...@gmail.com wrote:
  You brought up a very good point and it got me thinking.  I don't
  think its looping through the Vector.  I have another class that takes
  the values, creates a Canvas and draws text and a simple image on it.
  I need to figure out how to draw a button onto a Canvas.  Right now,
  all I can do is drawText and drawBitmap.  If I can figure out how to
  draw a button, I can probably create a listener on it.

  Any thoughts would be more than welcomed!  Thank you.

  On Jun 16, 4:52 pm, KC kane.coch...@gmail.com wrote:
   Sorry, good point.  The parent is a FrameLayout.  Please let me know
   if I can provide you with more info and thanks so much for trying to
   help with this, I really appreciate it.

   KC

   On Jun 16, 4:32 pm, Justin Anderson janderson@gmail.com wrote:

Well, what is the parent layout?  There are different ways/methods to
  do
this for ListView, ExpandableListView, LinearLayout, RelativeLayout,
  etc...

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

On Wed, Jun 16, 2010 at 2:19 PM, KC kane.coch...@gmail.com wrote:

  --
  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.comandroid-beginners%2Bunsubscr 
  i...@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


[android-beginners] Re: How to set onClickListener for elements in a Vector

2010-06-16 Thread KC
Sorry, good point.  The parent is a FrameLayout.  Please let me know
if I can provide you with more info and thanks so much for trying to
help with this, I really appreciate it.

KC

On Jun 16, 4:32 pm, Justin Anderson janderson@gmail.com wrote:
 Well, what is the parent layout?  There are different ways/methods to do
 this for ListView, ExpandableListView, LinearLayout, RelativeLayout, etc...

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



 On Wed, Jun 16, 2010 at 2:19 PM, KC kane.coch...@gmail.com wrote:

-- 
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: How to set onClickListener for elements in a Vector

2010-06-16 Thread KC
You brought up a very good point and it got me thinking.  I don't
think its looping through the Vector.  I have another class that takes
the values, creates a Canvas and draws text and a simple image on it.
I need to figure out how to draw a button onto a Canvas.  Right now,
all I can do is drawText and drawBitmap.  If I can figure out how to
draw a button, I can probably create a listener on it.

Any thoughts would be more than welcomed!  Thank you.


On Jun 16, 4:52 pm, KC kane.coch...@gmail.com wrote:
 Sorry, good point.  The parent is a FrameLayout.  Please let me know
 if I can provide you with more info and thanks so much for trying to
 help with this, I really appreciate it.

 KC

 On Jun 16, 4:32 pm, Justin Anderson janderson@gmail.com wrote:



  Well, what is the parent layout?  There are different ways/methods to do
  this for ListView, ExpandableListView, LinearLayout, RelativeLayout, etc...

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

  On Wed, Jun 16, 2010 at 2:19 PM, KC kane.coch...@gmail.com wrote:

-- 
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: How do I auto-generate code from xml like Android does it?

2010-06-15 Thread Zigurd
It depends on what your aim is. If you want to make instances of
subclasses of views and layouts, you can do that my naming them in
layout files.

If you want something more general purpose, try JAXB.

Or you can roll your own with the XML parser in Android, and
reflection.

On Jun 3, 11:09 am, drozzy dro...@gmail.com wrote:
 Hey guys,
 I would really like to achieve what Android is currently doing for
 it's resources: auto-generating class with member variables from the
 xml (or json) files.

 I would like to have an text or xml file of items, with ids, names,
 values and would like to generate Java code from it (in Eclipse).
 So if my json (or xml) file is something like:

 parts = [
     { 'partA' : { 'id' : 2342,  'name' : 'Part A'} },
     { 'partB' : {'id' : 53, 'name' : 'Part Beee'} },

     etc
 ]

 Then I can refer to my helper class:

    Parts.ids.partA  // is an int of value 2342
    Parts.names.partA  // is a String Part A

 and I would like this file to regenerate automatically every time I
 change the xml file

 Is that what Android plugin for eclipse is for - or is this just part
 of eclipse build process? Any help is appreciated.

 I've also asked this question on stackoverflow but getting little
 traction there with only 2 
 answers:http://stackoverflow.com/questions/2960122/generate-java-code-in-eclipse

-- 
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: How do I compile the connectbot source code?

2010-05-31 Thread {n8}
Couldn't help but notice the url you downloaded from is read-only.
Try adding read-write instead of read-only to the end of the url.

I know that for example, importing the original aosp Launcher from the
source into Eclipse gives a trillion errors...but compiles completely
fine with make lol so idk


On May 31, 4:26 am, T1000 t1...@zando.dyndns.org wrote:
 Hello,

 I'm trying to import the connectbot source code and compile it.
 However, I can't get it to cooperate.http://code.google.com/p/connectbot/
 What do I have to do to import someone else's code into Android?

 I'm running the Android 2.1 SDK, and I downloaded the latest source
 using the command:
 svn checkouthttp://connectbot.googlecode.com/svn/trunk/connectbot/
 connectbot-read-only
 That downloaded it to my hard drive. Now I tried to import it into
 Eclipse, but there are a lot of errors. Help!

 Description     Resource        Path    Location        Type
 R cannot be resolved    EntropyView.java
 /ConnectBot/src/org/connectbot/util     line 90 Java Problem
 The import org.connectbot.R cannot be resolved  EntropyView.java
 /ConnectBot/src/org/connectbot/util     line 22 Java Problem
 R cannot be resolved    ExceptionHandler.java
 /ConnectBot/src/com/nullwire/trace      line 67 Java Problem
 R cannot be resolved    ExceptionHandler.java
 /ConnectBot/src/com/nullwire/trace      line 137        Java Problem
 The import org.connectbot.R cannot be resolved  ExceptionHandler.java
 /ConnectBot/src/com/nullwire/trace      line 17 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 84 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 86 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 88 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 90 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 91 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 93 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 94 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 96 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 98 Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 100        Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 111        Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 121        Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 203        Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 204        Java Problem
 R cannot be resolved    GeneratePubkeyActivity.java
 /ConnectBot/src/org/connectbot  line 230        Java Problem
 R cannot be resolved    HelpActivity.java       /ConnectBot/src/org/connectbot
 line 45 Java Problem
 R cannot be resolved    HelpActivity.java       /ConnectBot/src/org/connectbot
 line 48 Java Problem
 R cannot be resolved    HelpActivity.java       /ConnectBot/src/org/connectbot
 line 49 Java Problem
 R cannot be resolved    HelpActivity.java       /ConnectBot/src/org/connectbot
 line 52 Java Problem
 R cannot be resolved    HelpTopicActivity.java
 /ConnectBot/src/org/connectbot  line 36 Java Problem
 R cannot be resolved    HelpTopicActivity.java
 /ConnectBot/src/org/connectbot  line 41 Java Problem
 R cannot be resolved    HelpTopicActivity.java
 /ConnectBot/src/org/connectbot  line 42 Java Problem
 R cannot be resolved    HelpTopicActivity.java
 /ConnectBot/src/org/connectbot  line 45 Java Problem
 R cannot be resolved    HostEditorActivity.java
 /ConnectBot/src/org/connectbot  line 254        Java Problem
 R cannot be resolved    HostEditorActivity.java
 /ConnectBot/src/org/connectbot  line 335        Java Problem
 R cannot be resolved    HostEditorActivity.java
 /ConnectBot/src/org/connectbot  line 337        Java Problem
 R cannot be resolved    HostListActivity.java
 /ConnectBot/src/org/connectbot  line 162        Java Problem
 R cannot be resolved    HostListActivity.java
 /ConnectBot/src/org/connectbot  line 165        Java Problem
 R cannot be resolved    HostListActivity.java
 /ConnectBot/src/org/connectbot  line 166        Java Problem
 R cannot be resolved    HostListActivity.java
 /ConnectBot/src/org/connectbot  line 204        Java Problem
 R cannot be resolved    HostListActivity.java
 /ConnectBot/src/org/connectbot  line 223        Java Problem
 R cannot be resolved    HostListActivity.java
 /ConnectBot/src/org/connectbot  line 236        Java Problem
 R cannot be 

[android-beginners] Re: How to cleanly finish an activity? (activity timeouts prevent restarting an app)

2010-05-27 Thread Jason Tomlinson
You may be interested in reading a recent blog post by a Googler title
When to Include an Exit Button in Android Apps (Hint: Never),
http://blog.radioactiveyak.com/2010/05/when-to-include-exit-button-in-android.html

On May 26, 8:00 am, bb13 steveves...@comcast.net wrote:
 My app (as currently designed) offers the user a menu quit option
 that calls finish() on the activity, where I do saving and cleanup in
 the onPause and onDestroy methods.   When initially downloaded to the
 emulator things run fine, but after quitting, when I go to the apps
 page and click on my app icon, I get a blank screen and an occasional
 notice that the activity is not responding.

 I have found a few postings of this same problem, but no good answers.

 My log shows that the finish() does cause on Pause then onStop then
 onDestroy to be called in sequence as expected.  All successfully
 complete and return.  But I still get an activity destroy timeout (and
 at the attempted restart, a launch timeout expired).  The only thing
 non-trivial is a game thread, but the terminate and join with the UI
 thread in onDestroy seems to work just fine (I commented out all uses
 of just about everything else in Android, e.g. SoundPool, view
 Animation).

 I looked at the LunarLander example application.  It stops
 differently (e.g. doesn't call finish(), terminates the game thread
 when the surface is destroyed), but it has similar although less
 repeatable problems (e.g. unexpected termination messages, destroy and
 launch timeout messages in the log, subsequent clicks on the app icon
 just open a black screen).

 Any suggestions?  Any guidelines for a good way to exit an
 application so it can be cleanly restarted?

-- 
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: How to debug

2010-05-10 Thread Indicator Veritatis
Even before running the application under the debugger, a good first
step is to look at LogCat in the DDMS Perspective: there will probably
be a Java Exception logged there, that Exception is what caused the
shutdown. Look for your own source code's line number in the stack
trace.

On May 9, 2:55 pm, Ubuntu Explorer ubuntuexplo...@gmail.com wrote:
 Sorry, Forgot to add that I want to do it from within Eclipse IDE.

 On Mon, May 10, 2010 at 6:55 AM, Ubuntu Explorer
 ubuntuexplo...@gmail.comwrote:

  Hi,

  I am able to write basic android applications now. Thanks for all your
  help.

  However, when there are certain runtime issues, I cannot detect them using
  simulator. There is one msg that says Unexpectedly shutdown (I also see
  this for alarm clock and other apps sometimes - though I cannot figure out
  why?).

  How to run android apps in debug mode to see where the issue is?

  Regards
  UE.

 --
 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 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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


Fwd: [android-beginners] Re: How to debug

2010-05-10 Thread joshua hublar
Oh, you really need to watch this video from Google IO 2009.  How to debug
like a NINJA (yar).
http://developer.android.com/videos/index.html#v=Dgnx0E7m1GQ






On Mon, May 10, 2010 at 2:45 PM, Trang phitr...@gmail.com wrote:

 Test

 Indicator Veritatis mej1...@yahoo.com wrote:

 Even before running the application under the debugger, a good first
 step is to look at LogCat in the DDMS Perspective: there will probably
 be a Java Exception logged there, that Exception is what caused the
 shutdown. Look for your own source code's line number in the stack
 trace.
 
 On May 9, 2:55 pm, Ubuntu Explorer ubuntuexplo...@gmail.com wrote:
  Sorry, Forgot to add that I want to do it from within Eclipse IDE.
 
  On Mon, May 10, 2010 at 6:55 AM, Ubuntu Explorer
  ubuntuexplo...@gmail.comwrote:
 
   Hi,
 
   I am able to write basic android applications now. Thanks for all your
   help.
 
   However, when there are certain runtime issues, I cannot detect them
 using
   simulator. There is one msg that says Unexpectedly shutdown (I also
 see
   this for alarm clock and other apps sometimes - though I cannot figure
 out
   why?).
 
   How to run android apps in debug mode to see where the issue is?
 
   Regards
   UE.
 
  --
  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 athttp://
 stackoverflow.com/questions/tagged/android
 
  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
  For more options, visit this group athttp://
 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.comandroid-beginners%2bunsubscr...@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.comandroid-beginners%2bunsubscr...@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


[android-beginners] Re: How to debug

2010-05-09 Thread Ubuntu Explorer
Sorry, Forgot to add that I want to do it from within Eclipse IDE.

On Mon, May 10, 2010 at 6:55 AM, Ubuntu Explorer
ubuntuexplo...@gmail.comwrote:

 Hi,

 I am able to write basic android applications now. Thanks for all your
 help.

 However, when there are certain runtime issues, I cannot detect them using
 simulator. There is one msg that says Unexpectedly shutdown (I also see
 this for alarm clock and other apps sometimes - though I cannot figure out
 why?).

 How to run android apps in debug mode to see where the issue is?

 Regards
 UE.


-- 
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: How to debug

2010-05-09 Thread Yoann Katchourine
How do you launch usually ?
Try right clicking on the bug, near the green arrow, and then select android
app.

Yoann Katchourine, from my phone. (+33)6.50.40.15.82

Le 9 mai 2010 23:56, Ubuntu Explorer ubuntuexplo...@gmail.com a écrit :

Sorry, Forgot to add that I want to do it from within Eclipse IDE.



On Mon, May 10, 2010 at 6:55 AM, Ubuntu Explorer ubuntuexplo...@gmail.com
wrote:

 Hi,

 I a...

-- 
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: How to create a new folder on the SD card?

2010-05-07 Thread Jon Jacob
You hate finding the answer  ;)

This is good to know, anyway.  Thanks for posting the answer.

On May 6, 4:56 pm, DonFrench dcfre...@gmail.com wrote:
 I hate it when I find the answer two minutes after posting the
 question!   All I needed was this:

 uses-permission
 android:name=android.permission.WRITE_EXTERNAL_STORAGE /

 in the manifest.

 On May 6, 4:50 pm, DonFrench dcfre...@gmail.com wrote:



  I am not succeeding in creating a new folder on the SD card using the
  following code:

    try{
      String dirName = /sdcard/testdir;
      File newFile = new File(dirName);
      newFile.mkdirs();
      if(newFile.exists()){
          toastLong(directory exists);
          if(newFile.isDirectory()){
                  toastLong(isDirectory = true);
          } else toastLong(isDirectory = false);
      } else {
          toastLong(directory doesn't exist);
      }} catch(Exception e){

          toastLong(Exception creating folder  + e);

  }

  I don't get an exception but the message I do get is directory
  doesn't existand in fact the folder is not created.  Why doesn't this
  work and what is the right way to do this?

  --
  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 
  athttp://stackoverflow.com/questions/tagged/android

  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://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 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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


[android-beginners] Re: How to create a new folder on the SD card?

2010-05-07 Thread DonFrench
LOL!  No, I am glad that I found the answer but I just wish that I had
persisted in searching for it a little longer before posting my
question.  But the good news is that maybe someone else with the same
problem will read my post and find the answer faster than I did.


On May 7, 8:08 am, Jon Jacob jonjacobm...@gmail.com wrote:
 You hate finding the answer  ;)

 This is good to know, anyway.  Thanks for posting the answer.

 On May 6, 4:56 pm, DonFrench dcfre...@gmail.com wrote:



  I hate it when I find the answer two minutes after posting the
  question!   All I needed was this:

  uses-permission
  android:name=android.permission.WRITE_EXTERNAL_STORAGE /

  in the manifest.

  On May 6, 4:50 pm, DonFrench dcfre...@gmail.com wrote:

   I am not succeeding in creating a new folder on the SD card using the
   following code:

     try{
       String dirName = /sdcard/testdir;
       File newFile = new File(dirName);
       newFile.mkdirs();
       if(newFile.exists()){
           toastLong(directory exists);
           if(newFile.isDirectory()){
                   toastLong(isDirectory = true);
           } else toastLong(isDirectory = false);
       } else {
           toastLong(directory doesn't exist);
       }} catch(Exception e){

           toastLong(Exception creating folder  + e);

   }

   I don't get an exception but the message I do get is directory
   doesn't existand in fact the folder is not created.  Why doesn't this
   work and what is the right way to do this?

   --
   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 
   athttp://stackoverflow.com/questions/tagged/android

   To unsubscribe from this group, send email to
   android-beginners+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://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 
  athttp://stackoverflow.com/questions/tagged/android

  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://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 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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


[android-beginners] Re: How to create a new folder on the SD card?

2010-05-06 Thread DonFrench
I hate it when I find the answer two minutes after posting the
question!   All I needed was this:

uses-permission
android:name=android.permission.WRITE_EXTERNAL_STORAGE /

in the manifest.

On May 6, 4:50 pm, DonFrench dcfre...@gmail.com wrote:
 I am not succeeding in creating a new folder on the SD card using the
 following code:

   try{
     String dirName = /sdcard/testdir;
     File newFile = new File(dirName);
     newFile.mkdirs();
     if(newFile.exists()){
         toastLong(directory exists);
         if(newFile.isDirectory()){
                 toastLong(isDirectory = true);
         } else toastLong(isDirectory = false);
     } else {
         toastLong(directory doesn't exist);
     }} catch(Exception e){

         toastLong(Exception creating folder  + e);

 }

 I don't get an exception but the message I do get is directory
 doesn't existand in fact the folder is not created.  Why doesn't this
 work and what is the right way to do this?

 --
 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 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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] Re: How do I simulate a Home, Menu, Or Back key press

2010-05-06 Thread Mani Android
Dear all

Any one find out the solution how to simulate the  Power, Back and Menu keys
and other Hard keys?


Thanks in advance...





On Tue, Nov 10, 2009 at 7:44 AM, GT gswee...@gmail.com wrote:

 Update:

  I managed to get the soft Home button functioning by sending the
 Intent:

 Intent HomeIntent = new Intent();
 HomeIntent.setAction(Intent.ACTION_MAIN);
 HomeIntent.addCategory(Intent.CATEGORY_HOME);

 I still don't have a solution for the Back and Menu keys.
 Furthermore, I ran into problems setting my window to always display
 on top.  Since I have no hardware buttons the user needs access to
 this menu from anywhere.  Unfortunately I haven't found a way of doing
 this.

 Are devices without hardware keyboards not supported?  Is the only way
 to get this working by modifiying Android itself?

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.
 To post to this group, send email to android-beginners@googlegroups.com
 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@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


[android-beginners] Re: How to open a new activity when an expandableList row is clicked ?

2010-04-28 Thread ScCrow
I would still like to see an answer,but I have at least coded
a way to get the job done.  Duh,  Im using an array to store the
information, then using the subGroup to index into my array.  Not what
I wanted, but it will at least work.

Also, the information in my Toast now seems to be working properly, so
Im not sure what occurred there. Made no code changes that would have
affected them that I know of. Both the Group and the subGroup are not
incrementing as expected.

-- 
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: How often does an activity run?

2010-04-20 Thread Daniel Favela
Well, this seems like a good exercise to test my learning and reading as a
newbie in the Android scene.

If I'm understanding BobG correctly, he means that the calls to onDraw
depend entirely on your application.  Your *Hello World!* sample renders the
text once and never has to render anything again -- the view stays put as
you left it.  It's a callback: when something happens (like user input),
then onDraw() might be called if something new has to be drawn.

A game, for example, might process game logic at each frame.  This results
in onDraw() being called for each frame, since game logic might place a game
object in a position different from that it was in during the last frame.

Hello World, as mentioned, doesn't need to be updated in that way.  That's
why onDraw() is not called anymore.

With regards to the zombie sentiment, onDraw() does not actually take up
any more memory than any other function might take; it is called when
needed, I suspect, much like onCreate(), onStart(), onResume, onDestroy() do
(these are methods involved in an activity's life cycle; check out the
Android Application fundamentals page
herehttp://developer.android.com/guide/topics/fundamentals.html#lcycles
to
see where I'm pulling these potentially wrong statements from).  From what
I've read, Android does things in a very, very, very modular manner;
everything is there and safe until it's needed.

I'm guessing that if you were to press Home or Back while *Hello
World!*was running, then you brought it back to the foreground, it
would call
onDraw() again.

If I'm wrong in anything I've said, please correct me!  I hope that helps.

-Danny

On Mon, Apr 19, 2010 at 7:27 AM, BobG bobgard...@aol.com wrote:

 On Apr 19, 9:08 am, ~ TreKing treking...@gmail.com wrote:
  I don't know what you're asking. Activities don't really run like
 threads
  that have a definite function that gets executed to do work. They have
  functions that are invoked in response to system events (onCreate,
 onPause,
  onConfigurationChanged, etc).
 =
 Here is my 'model' that compares an embedded program to an android
 program:
 embedded program: main gets called by os, main calls initstuff(),
 falls into a while(1) loop that calls inputs(), process() and
 outputs() forever. The os can kill it if it has to. In the android
 program, the onCreate is the init, the os scheduler is the while(1)
 loop, and the onSensorChanged events are like the input and process
 functions, and the onDraw is like the output function. Sort of. Does
 this model make sense to anyone else? Can it be explained more clearly
 by another model?

 --
 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.comandroid-beginners%2bunsubscr...@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


[android-beginners] Re: How often does an activity run?

2010-04-20 Thread Indicator Veritatis
It is most definitely not a zombie process. A zombie process, by
definition, is one not even the shell command 'kill' can kill. The
process you just described is still able to receive events -- and will
the next time the OS decides to call onDraw.

It is Android that decides when to call onDraw(). However, you can
tell it to do so by calling postInvalidate() or invalidate() as
described in http://developer.android.com/guide/topics/graphics/index.html

On Apr 18, 11:37 pm, BobG bobgard...@aol.com wrote:
 If we run a simple little hello world program that just puts some text
 in a textview, I see the the onCreate runs, and I guess it calls
 ondraw once, then it sort of returns to the os, and if we have
 registered a sensor changed or an onclick listener, we can read the
 sensor and call invalidate and the os will call ondraw again, and it
 all is usually 'fast enough'. But my question is: Does ondraw ever get
 called again? Or is this now a 'zombie process' that will just sit
 there taking up memory until we kill it?

 --
 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 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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


[android-beginners] Re: How to get child Activity?

2010-04-19 Thread Rodrigo Chiossi
This might work, but it would require me to duplicate functional
methods from activity 2 into the main activity, which is undesirable.
So far, sending and intent upon releasing long press is working just
fine, and, although it adds some complexity to the code, it's by far
the simplest solution.

On Apr 16, 2:25 pm, Kitzy kitzyk...@gmail.com wrote:
 What if you left state b as part of activity 1? Then pressing button
 or releasing long-press would start activity 2 (with all of state a).

 Long pressing the button would inflate a view with state b (all inside
 activity 1)

 -Kitzy

 On Apr 16, 6:31 am, Rodrigo Chiossi xrodr...@gmail.com wrote:





  Hi Kitzy.
  If you just click the button, the second activity should start in a
  state A. if you longpress the button, the activity should start in a
  state B and go to state A upon releasing the button (In fact, upon
  releasing the screen, since the button does not exists in the second
  activity), so i can't start it after release. Your second suggestion
  is actually what I managed to do as a workaround: I broadcast an
  intent whenever the first activity receives an event and the second
  activity has already been started (I set a flag after starting). It's
  not a beautiful code, but it's the best solution so far...
  I know it would be easy just not to use this kind of interaction, but
  this is the key feature of the app.

  On Apr 16, 1:48 am, Kitzy kitzyk...@gmail.com wrote:

   What if you start your activity after release?  Or use a broadcast
   receiver?

   Why do you need the new activity to know when you release?

   -Kitzy

   On Apr 15, 10:35 am, Rodrigo Chiossi xrodr...@gmail.com wrote:

I have already tried 3 different approaches to the problem:
The first was this one i described previously, which would be the
ideal for my app.
The second one, i created an ActivityGroup which was responsible for
starting two activities and on LongClick event I was swaping the
DecorViews of the activities. Still, the same problem happened: the
ACTION_UP was being delivered to the wrong activity.
My last approach was to create a single activity and call
setContentView to swap between the two layouts, and still, the event
was not delivered to the right view.
I'm just wondering if there is a way for an Activity to request Input
events...

@Mark: you are right, i messed those approaches a little. I have the
getParent only when I use an ActivityGroup.

On Apr 15, 12:23 pm, Mark Murphy mmur...@commonsware.com wrote:

 Rodrigo Chiossi wrote:
  First, the user press a button on the main Activity. When the
  LongClick triggers, I start the second Activity wich also has a 
  button
  which should be pressed when the activity starts and should only be
  released when the user takes his finger off the screen.

 Why are you using multiple activities? UI events are not designed to
 span multiple activities.

  In order to triggers the onTouch of the button in the second 
  activity,
  i create a copy of the MotionEvent in the first activity and send it
  as an Intent Extra to the second activity which call it's own 
  onTouch
  passing this MotionEvent as parameter.

 Ick.

  Oh, and btw, I call it a 'child' activity since it has a 
  getParent()
  method which returns the main activity...

 Then you are not starting the child activity via startActivity().

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

 _Android Programming Tutorials_ Version 2.0 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 
   athttp://stackoverflow.com/questions/tagged/android

   To unsubscribe from this group, send email to
   android-beginners+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://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 
  athttp://stackoverflow.com/questions/tagged/android

  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://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 
 athttp://stackoverflow.com/questions/tagged/android

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

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

[android-beginners] Re: How often does an activity run?

2010-04-19 Thread BobG
On Apr 19, 9:08 am, ~ TreKing treking...@gmail.com wrote:
 I don't know what you're asking. Activities don't really run like threads
 that have a definite function that gets executed to do work. They have
 functions that are invoked in response to system events (onCreate, onPause,
 onConfigurationChanged, etc).
=
Here is my 'model' that compares an embedded program to an android
program:
embedded program: main gets called by os, main calls initstuff(),
falls into a while(1) loop that calls inputs(), process() and
outputs() forever. The os can kill it if it has to. In the android
program, the onCreate is the init, the os scheduler is the while(1)
loop, and the onSensorChanged events are like the input and process
functions, and the onDraw is like the output function. Sort of. Does
this model make sense to anyone else? Can it be explained more clearly
by another model?

-- 
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: How to get child Activity?

2010-04-16 Thread Rodrigo Chiossi
Hi Kitzy.
If you just click the button, the second activity should start in a
state A. if you longpress the button, the activity should start in a
state B and go to state A upon releasing the button (In fact, upon
releasing the screen, since the button does not exists in the second
activity), so i can't start it after release. Your second suggestion
is actually what I managed to do as a workaround: I broadcast an
intent whenever the first activity receives an event and the second
activity has already been started (I set a flag after starting). It's
not a beautiful code, but it's the best solution so far...
I know it would be easy just not to use this kind of interaction, but
this is the key feature of the app.

On Apr 16, 1:48 am, Kitzy kitzyk...@gmail.com wrote:
 What if you start your activity after release?  Or use a broadcast
 receiver?

 Why do you need the new activity to know when you release?

 -Kitzy

 On Apr 15, 10:35 am, Rodrigo Chiossi xrodr...@gmail.com wrote:





  I have already tried 3 different approaches to the problem:
  The first was this one i described previously, which would be the
  ideal for my app.
  The second one, i created an ActivityGroup which was responsible for
  starting two activities and on LongClick event I was swaping the
  DecorViews of the activities. Still, the same problem happened: the
  ACTION_UP was being delivered to the wrong activity.
  My last approach was to create a single activity and call
  setContentView to swap between the two layouts, and still, the event
  was not delivered to the right view.
  I'm just wondering if there is a way for an Activity to request Input
  events...

  @Mark: you are right, i messed those approaches a little. I have the
  getParent only when I use an ActivityGroup.

  On Apr 15, 12:23 pm, Mark Murphy mmur...@commonsware.com wrote:

   Rodrigo Chiossi wrote:
First, the user press a button on the main Activity. When the
LongClick triggers, I start the second Activity wich also has a button
which should be pressed when the activity starts and should only be
released when the user takes his finger off the screen.

   Why are you using multiple activities? UI events are not designed to
   span multiple activities.

In order to triggers the onTouch of the button in the second activity,
i create a copy of the MotionEvent in the first activity and send it
as an Intent Extra to the second activity which call it's own onTouch
passing this MotionEvent as parameter.

   Ick.

Oh, and btw, I call it a 'child' activity since it has a getParent()
method which returns the main activity...

   Then you are not starting the child activity via startActivity().

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

   _Android Programming Tutorials_ Version 2.0 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 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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


[android-beginners] Re: How to get child Activity?

2010-04-16 Thread Kitzy
What if you left state b as part of activity 1? Then pressing button
or releasing long-press would start activity 2 (with all of state a).

Long pressing the button would inflate a view with state b (all inside
activity 1)

-Kitzy

On Apr 16, 6:31 am, Rodrigo Chiossi xrodr...@gmail.com wrote:
 Hi Kitzy.
 If you just click the button, the second activity should start in a
 state A. if you longpress the button, the activity should start in a
 state B and go to state A upon releasing the button (In fact, upon
 releasing the screen, since the button does not exists in the second
 activity), so i can't start it after release. Your second suggestion
 is actually what I managed to do as a workaround: I broadcast an
 intent whenever the first activity receives an event and the second
 activity has already been started (I set a flag after starting). It's
 not a beautiful code, but it's the best solution so far...
 I know it would be easy just not to use this kind of interaction, but
 this is the key feature of the app.

 On Apr 16, 1:48 am, Kitzy kitzyk...@gmail.com wrote:

  What if you start your activity after release?  Or use a broadcast
  receiver?

  Why do you need the new activity to know when you release?

  -Kitzy

  On Apr 15, 10:35 am, Rodrigo Chiossi xrodr...@gmail.com wrote:

   I have already tried 3 different approaches to the problem:
   The first was this one i described previously, which would be the
   ideal for my app.
   The second one, i created an ActivityGroup which was responsible for
   starting two activities and on LongClick event I was swaping the
   DecorViews of the activities. Still, the same problem happened: the
   ACTION_UP was being delivered to the wrong activity.
   My last approach was to create a single activity and call
   setContentView to swap between the two layouts, and still, the event
   was not delivered to the right view.
   I'm just wondering if there is a way for an Activity to request Input
   events...

   @Mark: you are right, i messed those approaches a little. I have the
   getParent only when I use an ActivityGroup.

   On Apr 15, 12:23 pm, Mark Murphy mmur...@commonsware.com wrote:

Rodrigo Chiossi wrote:
 First, the user press a button on the main Activity. When the
 LongClick triggers, I start the second Activity wich also has a button
 which should be pressed when the activity starts and should only be
 released when the user takes his finger off the screen.

Why are you using multiple activities? UI events are not designed to
span multiple activities.

 In order to triggers the onTouch of the button in the second activity,
 i create a copy of the MotionEvent in the first activity and send it
 as an Intent Extra to the second activity which call it's own onTouch
 passing this MotionEvent as parameter.

Ick.

 Oh, and btw, I call it a 'child' activity since it has a getParent()
 method which returns the main activity...

Then you are not starting the child activity via startActivity().

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

_Android Programming Tutorials_ Version 2.0 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 
  athttp://stackoverflow.com/questions/tagged/android

  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://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 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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


[android-beginners] Re: How to get child Activity?

2010-04-15 Thread Rodrigo Chiossi
Thanks for the Answers, but none of them really seems like an option
for me.
Giving more details about what I am doing:
First, the user press a button on the main Activity. When the
LongClick triggers, I start the second Activity wich also has a button
which should be pressed when the activity starts and should only be
released when the user takes his finger off the screen.
In order to triggers the onTouch of the button in the second activity,
i create a copy of the MotionEvent in the first activity and send it
as an Intent Extra to the second activity which call it's own onTouch
passing this MotionEvent as parameter.
The problem is: Even with the second Activity up and running, when the
user takes his finger off the screen for the first time, the
MotionEvent ACTION_UP is delivered to the main activity instead of the
second one. I don know exactly why this happens, but I need to forward
this event to the second activity in order to release the button.
Oh, and btw, I call it a 'child' activity since it has a getParent()
method which returns the main activity...

On Apr 15, 5:56 am, Sebastián Treu sebastian.t...@gmail.com wrote:
 On Wed, Apr 14, 2010 at 3:03 PM, Rodrigo Chiossi xrodr...@gmail.com wrote:
  Hi there!

  I have a main Activity and I'm starting a child activity with
  startActivity(intent).
  I want to get the Activity Object created for the child. How can I do
  it?

 I don't know for what, as when you start the new child activity you
 are in it's context and the other is stopped. Although, If you want
 this, an ugly solution can be to have a Main class that extends
 Application and you implement a tree or a list or whatever you want of
 activities, and everytime you launch a new activity you add it to that
 tree, list or whatever. I don't know for what you will want to, but I
 think you can do that UGLY solution. Then, you add the Main class name
 to the xml manifest, and that class is instanciated before anything.
 You can access public methods with getApplication().

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

 Sebastián Treuhttp://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 get child Activity?

2010-04-15 Thread Justin Anderson
Not sure how well it would work, but if you REALLY want to do something like
this, you cold possibly try to just change the view of your current activity
instead of starting a new activity.

I wouldn't recommend it and I'm not sure if that will really work... There
are lots of people who have problems trying to change the view of an
activity and the solution is usually to create a new activity instead of
changing the view.  In your case, however, it might be worth it to look
into...

All that being said, I think you may want to look at re-designing the
workflow of your app

Hope that helps somewhat,
Justin

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


On Thu, Apr 15, 2010 at 8:56 AM, Rodrigo Chiossi xrodr...@gmail.com wrote:

 Thanks for the Answers, but none of them really seems like an option
 for me.
 Giving more details about what I am doing:
 First, the user press a button on the main Activity. When the
 LongClick triggers, I start the second Activity wich also has a button
 which should be pressed when the activity starts and should only be
 released when the user takes his finger off the screen.
 In order to triggers the onTouch of the button in the second activity,
 i create a copy of the MotionEvent in the first activity and send it
 as an Intent Extra to the second activity which call it's own onTouch
 passing this MotionEvent as parameter.
 The problem is: Even with the second Activity up and running, when the
 user takes his finger off the screen for the first time, the
 MotionEvent ACTION_UP is delivered to the main activity instead of the
 second one. I don know exactly why this happens, but I need to forward
 this event to the second activity in order to release the button.
 Oh, and btw, I call it a 'child' activity since it has a getParent()
 method which returns the main activity...

 On Apr 15, 5:56 am, Sebastián Treu sebastian.t...@gmail.com wrote:
  On Wed, Apr 14, 2010 at 3:03 PM, Rodrigo Chiossi xrodr...@gmail.com
 wrote:
   Hi there!
 
   I have a main Activity and I'm starting a child activity with
   startActivity(intent).
   I want to get the Activity Object created for the child. How can I do
   it?
 
  I don't know for what, as when you start the new child activity you
  are in it's context and the other is stopped. Although, If you want
  this, an ugly solution can be to have a Main class that extends
  Application and you implement a tree or a list or whatever you want of
  activities, and everytime you launch a new activity you add it to that
  tree, list or whatever. I don't know for what you will want to, but I
  think you can do that UGLY solution. Then, you add the Main class name
  to the xml manifest, and that class is instanciated before anything.
  You can access public methods with getApplication().
 
  --
  If you want freedom, compile the source. Get gentoo.
 
  Sebastián Treuhttp://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.comandroid-beginners%2bunsubscr...@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: How to get child Activity?

2010-04-15 Thread Mark Murphy
Rodrigo Chiossi wrote:
 First, the user press a button on the main Activity. When the
 LongClick triggers, I start the second Activity wich also has a button
 which should be pressed when the activity starts and should only be
 released when the user takes his finger off the screen.

Why are you using multiple activities? UI events are not designed to
span multiple activities.

 In order to triggers the onTouch of the button in the second activity,
 i create a copy of the MotionEvent in the first activity and send it
 as an Intent Extra to the second activity which call it's own onTouch
 passing this MotionEvent as parameter.

Ick.

 Oh, and btw, I call it a 'child' activity since it has a getParent()
 method which returns the main activity...

Then you are not starting the child activity via startActivity().

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

_Android Programming Tutorials_ Version 2.0 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 get child Activity?

2010-04-15 Thread Rodrigo Chiossi
I have already tried 3 different approaches to the problem:
The first was this one i described previously, which would be the
ideal for my app.
The second one, i created an ActivityGroup which was responsible for
starting two activities and on LongClick event I was swaping the
DecorViews of the activities. Still, the same problem happened: the
ACTION_UP was being delivered to the wrong activity.
My last approach was to create a single activity and call
setContentView to swap between the two layouts, and still, the event
was not delivered to the right view.
I'm just wondering if there is a way for an Activity to request Input
events...

@Mark: you are right, i messed those approaches a little. I have the
getParent only when I use an ActivityGroup.

On Apr 15, 12:23 pm, Mark Murphy mmur...@commonsware.com wrote:
 Rodrigo Chiossi wrote:
  First, the user press a button on the main Activity. When the
  LongClick triggers, I start the second Activity wich also has a button
  which should be pressed when the activity starts and should only be
  released when the user takes his finger off the screen.

 Why are you using multiple activities? UI events are not designed to
 span multiple activities.

  In order to triggers the onTouch of the button in the second activity,
  i create a copy of the MotionEvent in the first activity and send it
  as an Intent Extra to the second activity which call it's own onTouch
  passing this MotionEvent as parameter.

 Ick.

  Oh, and btw, I call it a 'child' activity since it has a getParent()
  method which returns the main activity...

 Then you are not starting the child activity via startActivity().

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

 _Android Programming Tutorials_ Version 2.0 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 close activities in the navigation stack?

2010-04-15 Thread Stormtap Studios
Oh that does sound like a much better way to do it.  Thanks!

On Apr 15, 8:59 am, ~ TreKing treking...@gmail.com wrote:
 On Wed, Apr 14, 2010 at 4:55 PM, Stormtap Studios
 r...@stormtapstudios.comwrote:

  Does this make sense?

 I think you might run into trouble if Android kills your activities on the
 bottom of your custom stack. Then when you press back from the top, you'd
 skip a few and may end up closing your app completely instead of going
 down the stack ... I think.

 Is there a better way?



 I would just use startActivityForResult() for each activity that gets
 started along the way. If you need to immediately drop down to the root
 activity, just pass a flag back in your result to indicate the previous
 activity should immediately flag its own previous activity and finish()
 itself, until you get back to the root.

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

-- 
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 get child Activity?

2010-04-15 Thread Kitzy
What if you start your activity after release?  Or use a broadcast
receiver?

Why do you need the new activity to know when you release?

-Kitzy

On Apr 15, 10:35 am, Rodrigo Chiossi xrodr...@gmail.com wrote:
 I have already tried 3 different approaches to the problem:
 The first was this one i described previously, which would be the
 ideal for my app.
 The second one, i created an ActivityGroup which was responsible for
 starting two activities and on LongClick event I was swaping the
 DecorViews of the activities. Still, the same problem happened: the
 ACTION_UP was being delivered to the wrong activity.
 My last approach was to create a single activity and call
 setContentView to swap between the two layouts, and still, the event
 was not delivered to the right view.
 I'm just wondering if there is a way for an Activity to request Input
 events...

 @Mark: you are right, i messed those approaches a little. I have the
 getParent only when I use an ActivityGroup.

 On Apr 15, 12:23 pm, Mark Murphy mmur...@commonsware.com wrote:



  Rodrigo Chiossi wrote:
   First, the user press a button on the main Activity. When the
   LongClick triggers, I start the second Activity wich also has a button
   which should be pressed when the activity starts and should only be
   released when the user takes his finger off the screen.

  Why are you using multiple activities? UI events are not designed to
  span multiple activities.

   In order to triggers the onTouch of the button in the second activity,
   i create a copy of the MotionEvent in the first activity and send it
   as an Intent Extra to the second activity which call it's own onTouch
   passing this MotionEvent as parameter.

  Ick.

   Oh, and btw, I call it a 'child' activity since it has a getParent()
   method which returns the main activity...

  Then you are not starting the child activity via startActivity().

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

  _Android Programming Tutorials_ Version 2.0 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


[android-beginners] Re: How to close activities in the navigation stack?

2010-04-15 Thread Kitzy
Also look into the different flags you can set when you start an
activity, under Intent.java

-Kitzy

On Apr 15, 12:30 pm, Stormtap Studios r...@stormtapstudios.com
wrote:
 Oh that does sound like a much better way to do it.  Thanks!

 On Apr 15, 8:59 am, ~ TreKing treking...@gmail.com wrote:



  On Wed, Apr 14, 2010 at 4:55 PM, Stormtap Studios
  r...@stormtapstudios.comwrote:

   Does this make sense?

  I think you might run into trouble if Android kills your activities on the
  bottom of your custom stack. Then when you press back from the top, you'd
  skip a few and may end up closing your app completely instead of going
  down the stack ... I think.

  Is there a better way?

  I would just use startActivityForResult() for each activity that gets
  started along the way. If you need to immediately drop down to the root
  activity, just pass a flag back in your result to indicate the previous
  activity should immediately flag its own previous activity and finish()
  itself, until you get back to the root.

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

-- 
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: How do I import to eclipse projects that come with the android source?

2010-04-12 Thread Stephen
I've hit this issue as well.  I don't know why it happens, but in
addition to the first suggestion, I do the following so I can keep
everything neatly in my Workspace folder

1) Copy the code you want somewhere else
ie.  copy android-source/apps/whatever home-dir/whatever

2) Create a new project using existing code

3) Once the project is created, right click on it and Refactor  Move
it into the Workspace folder.

Maybe someone more familiar with Eclipse/Android SDK can tell us why
it's like this, whether it's desired behaviour or not, but this seems
to be the best workaround I've found so far.

Hope it helps.

Stephen

-- 
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 display 'Column title' on the top of List ?

2010-04-09 Thread a2ronus
Hi JavaCoffee,

I assume that you're using a ListView?

1. To add a header that scrolls with the content, take a look at:
http://developer.android.com/intl/fr/reference/android/widget/ListView.html#addHeaderView(android.view.View).
2. For a fixed header, you can take a look at:
http://groups.google.com/group/android-developers/browse_thread/thread/23ea7d0394f11758/584c43cf6cae5a33?lnk=gstq=fixed+footer.
Although it's about a fixed footer, there is a code example there for
a fixed header.

Good luck,

a2ronus











On 8 apr, 15:37, Javacoffee dear.jinhy...@gmail.com wrote:
 Hia2ronus,

 I mean both cases.

 Would it be possible?

 Ciao,

 On Apr 7, 10:33 pm,a2ronusaaron.jan...@gmail.com wrote:



  Do you mean a fixed header that always stays on top? Or a header that
  moves with the content?

  On 5 apr, 13:09, Javacoffee dear.jinhy...@gmail.com wrote:

   Hi guys,

   I'm  a new follower in android and facing the problem of displaying
   List data in android programming.

   Yes, I agree with that it is quite a easy to represent List data but
   don't know how to show thecolumntitlesuch as 'Name or Address' on
   the top of List. (Just like Table columns)

   Any idea regarding to the agony would be greatly appreciated.

   Kind Regards,
   Jin

-- 
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: How to display 'Column title' on the top of List ?

2010-04-08 Thread Javacoffee
Hi a2ronus,

I mean both cases.

Would it be possible?

Ciao,

On Apr 7, 10:33 pm, a2ronus aaron.jan...@gmail.com wrote:
 Do you mean a fixed header that always stays on top? Or a header that
 moves with the content?

 On 5 apr, 13:09, Javacoffee dear.jinhy...@gmail.com wrote:



  Hi guys,

  I'm  a new follower in android and facing the problem of displaying
  List data in android programming.

  Yes, I agree with that it is quite a easy to represent List data but
  don't know how to show thecolumntitlesuch as 'Name or Address' on
  the top of List. (Just like Table columns)

  Any idea regarding to the agony would be greatly appreciated.

  Kind Regards,
  Jin

-- 
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 do I import to eclipse projects that come with the android source?

2010-04-08 Thread Gibson
Is it caused by you have already create a project called AlarmClock
under your eclipse workspace.
From my experience that when import another Android project you cannot
put the project into eclipse workspace. It will cause this project.
You can try like this.
Put your project under folder
home/eshock/android/AlarmClock/
and try it again.
Hope this can help you.

On Apr 8, 8:13 am, Chi Zhang elecpa...@gmail.com wrote:
 Hello
 I downloaded the sourcecode of the android platform, and when I try to build
 the sourcecode of projects, say, packages/apps/AlarmClock
 I selected creating an Android project using existing code in Eclipse, but I
 encountered the following problem:

 Invalid project description.
   /home/eshock/android/workspace/AlarmClock overlaps the location of another
 project: 'AlarmClock'

 Any suggestions?

 --
 Sincerely Yours,
 Chi Zhang

 elecpa...@gmail.com
 College of Computer Science and Technology, Zhejiang University

-- 
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 connect to a robot.

2010-04-07 Thread Alan Gauld


cellurl gpscru...@gmail.com wrote 


is there wifi? or just cellular...

Not sure how generic it is but my Samsung certainly has 
WiFi as well as cellular connectivity. Once set up it uses 
WiFi when its available and switches to cellular when its 
not - so far as I can tell, but I haven't set up the WiFi yet, 
I'm still reading through the manual! :-)


Alan G.

On Apr 6, 2:39 am, Alan Gauld alan.ga...@btinternet.com wrote:

cellurl gpscru...@gmail.com wrote

I want to control something external using Android.

 Q3: Are there any other interfaces I might be missing? GPIO pins or
 something? Android robot groups??

Wireless using IP/SSL or Bluetooth?

Just a thought.

--
Alan Gauld
Author of the Learn to Program web sitehttp://www.alan-g.me.uk/


--
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: How to display 'Column title' on the top of List ?

2010-04-07 Thread a2ronus
Do you mean a fixed header that always stays on top? Or a header that
moves with the content?


On 5 apr, 13:09, Javacoffee dear.jinhy...@gmail.com wrote:
 Hi guys,

 I'm  a new follower in android and facing the problem of displaying
 List data in android programming.

 Yes, I agree with that it is quite a easy to represent List data but
 don't know how to show the column title such as 'Name or Address' on
 the top of List. (Just like Table columns)

 Any idea regarding to the agony would be greatly appreciated.

 Kind Regards,
 Jin

-- 
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 connect to a robot.

2010-04-07 Thread cellurl
I am looking for the cheapest solution. So USB is probably it.
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


[android-beginners] Re: How can I find out if I read the GPS signal

2010-04-07 Thread davemac
The call to requestLocationUpdates is where you've got trouble. The
first argument should be the name of the provider sending you updates
(GPS or cell network). To get regular updates from GPS, you want
something like the following:

LocationManager locMgr = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
LocationListener locListener = new LocationListener()
{
public voidonLocationChanged(Location location)
{
 if (location != null)
 {
  Toast.makeText(getBaseContext(),
  New location latitude [ +
location.getLatitude() +
  ] longitude [ +
location.getLongitude()+],
  Toast.LENGTH_SHORT).show();
 }
}
public voidonProviderDisabled(String provider)
{
}
public voidonProviderEnabled(String provider)
{
}
public voidonStatusChanged(String provider,
int status, Bundle extras)
{
}
};
locMgr.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
0,// minTime in ms
0,// minDistance in meters
locListener);

In other words, you setup a callback handler to receive the update
messages (locListener in this case), and you tell the LocationManager
to send updates to that callback. You can call getLastKnownLocation
with a provider name (like GPS_PROVIDER) but the value returned could
be null if there is no last known location. Note that the zeros in
that last call really should be reasonable values; I only use zeros as
part of a demonstration.

We cover this topic in our new book Pro Android 2 in chapter 7, and
go into much more detail on working with the location providers as
well as overlays and maps.

- dave
www.androidbook.com

On Apr 7, 8:43 am, ckloch ckl...@gmail.com wrote:
 As part of an application for registrer whether a vehicle can pass the
 next traffic light without having stop for red light, I am trying to
 get the GPS Location.

 So far I have tried the code below, but the HTC Tattoo telephone keeps
 stopping the application.
 The reason is that the List providers remains empty.

 Is there any way that I can extend my code, so I can understand why
 providers remains empty.
 I know I get a NullPointerException, but I don't know why as GPS is
 enabled.

 I will really appreciate your help on how to get
 - status of the GPS
 - content of providers.

 The code is listed below (I don't get any compilation errors):

 protected void onResume() {
         List providers;
         final String tag = readdata;

         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, reply using remove me as the subject.


[android-beginners] Re: How to connect to a robot.

2010-04-06 Thread Alan Gauld


cellurl gpscru...@gmail.com wrote


I want to control something external using Android.

Q3: Are there any other interfaces I might be missing? GPIO pins or
something? Android robot groups??


Wireless using IP/SSL or Bluetooth?

Just a thought.


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/



--
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 connect to a robot.

2010-04-06 Thread DonFrench
I have an Android app in development that uses Bluetooth to control
this robotic camera mount:  http://www.thegadgetworks.com/.



On Apr 5, 7:45 pm, cellurl gpscru...@gmail.com wrote:
 I want to control something external using Android.

 Q1: Can I have two-RFCOMM channels running at the same moment? Eg,
 channel 1 for voice, channel 2 for my robot. Is that possible?

 Q2: I understand Android-USB doesn't support host mode, thus if I use
 USB, my external device becomes more expensive. Am I missing
 something?

 Q3: Are there any other interfaces I might be missing? GPIO pins or
 something? Android robot groups??

 Thanks for any replys.
 jp

-- 
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 connect to a robot.

2010-04-06 Thread cellurl
is there wifi? or just cellular...


On Apr 6, 2:39 am, Alan Gauld alan.ga...@btinternet.com wrote:
 cellurl gpscru...@gmail.com wrote

 I want to control something external using Android.

  Q3: Are there any other interfaces I might be missing? GPIO pins or
  something? Android robot groups??

 Wireless using IP/SSL or Bluetooth?

 Just a thought.

 --
 Alan Gauld
 Author of the Learn to Program web sitehttp://www.alan-g.me.uk/

-- 
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 connect to a robot.

2010-04-06 Thread cellurl
I want to create a Bluetooth channel for the robot, while the owner is
possibly already on a separate phonecall using Bluetooth.
My question is, can I create -two- separate bluetooth channels at the
same time?
-jp


On Apr 6, 9:47 am, DonFrench dcfre...@gmail.com wrote:
 I have an Android app in development that uses Bluetooth to control
 this robotic camera mount:  http://www.thegadgetworks.com/.

 On Apr 5, 7:45 pm, cellurl gpscru...@gmail.com wrote:

  I want to control something external using Android.

  Q1: Can I have two-RFCOMM channels running at the same moment? Eg,
  channel 1 for voice, channel 2 for my robot. Is that possible?

  Q2: I understand Android-USB doesn't support host mode, thus if I use
  USB, my external device becomes more expensive. Am I missing
  something?

  Q3: Are there any other interfaces I might be missing? GPIO pins or
  something? Android robot groups??

  Thanks for any replys.
  jp



-- 
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: How to connect to a robot.

2010-04-06 Thread DonFrench
I do not believe that is possible.  A Bluetooth device can only be
connected to one Bluetooth device at a time to the best of my
knowledge.


On Apr 6, 9:31 am, cellurl gpscru...@gmail.com wrote:
 I want to create a Bluetooth channel for the robot, while the owner is
 possibly already on a separate phonecall using Bluetooth.
 My question is, can I create -two- separate bluetooth channels at the
 same time?
 -jp

 On Apr 6, 9:47 am, DonFrench dcfre...@gmail.com wrote:

  I have an Android app in development that uses Bluetooth to control
  this robotic camera mount:  http://www.thegadgetworks.com/.

  On Apr 5, 7:45 pm, cellurl gpscru...@gmail.com wrote:

   I want to control something external using Android.

   Q1: Can I have two-RFCOMM channels running at the same moment? Eg,
   channel 1 for voice, channel 2 for my robot. Is that possible?

   Q2: I understand Android-USB doesn't support host mode, thus if I use
   USB, my external device becomes more expensive. Am I missing
   something?

   Q3: Are there any other interfaces I might be missing? GPIO pins or
   something? Android robot groups??

   Thanks for any replys.
   jp

-- 
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 connect to a robot.

2010-04-06 Thread cellurl
Thanks for that. So I will pursue USB and use a dock I guess. USB is
probably more appropriate...


-- 
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 get a list of Applications in Android

2010-04-04 Thread alexk-il
Hi Justin,

Thanks a lot for your help. Next time I'll try harder to look for the
answer on the web.

Best
Alex


On Apr 3, 6:53 pm, Justin Anderson janderson@gmail.com wrote:
 Very similar questions have been asked before... and I have answered them.
 Have you even attempted to find out for your self by searching stackoverflow
 and this group?  That being said, here are the answers:

 * 1. The list of installed Android applications*
 PackageManager.getInstalledApplications()http://developer.android.com/reference/android/content/pm/PackageMana...

 * 2. The list of running Android applications*
 ActivityManager.RunningTaskInfohttp://developer.android.com/reference/android/app/ActivityManager.Ru...

 * 3. The list of running Android services*
 ActivityManager.RunningServiceInfohttp://developer.android.com/reference/android/app/ActivityManager.Ru...

 Hope this helps,
 Justin

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

 On Sat, Apr 3, 2010 at 5:36 AM, alexk-il
 alexk.il.subscripti...@gmail.comwrote:



  Hi,

  I couldn't find this in the SDK documentation, so I wonder how to get
  programmatically the following  information:

  1. The list of installed Android applications
  2. The list of running Android applications
  3. The list of running Android services

  Thanks
  Alex

  --
  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.comandroid-beginners%2Bunsubscr 
  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


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

2010-04-02 Thread Kevin Duffey
Did you make sure to set your FB to developer mode.. or whatever it is, so
you can access it? I haven't looked much into it.

There is a REST api for FB that you can use as well. some
facebok.com/rest.php or something like that


On Thu, Apr 1, 2010 at 1:20 PM, wahib haq wahib.t...@gmail.com wrote:

 dear ali thanks for ur response. I'll share my data as well tomorrow
 as i dont have it rite now. But can you plz mail me your project
 folder to wahib.t...@gmail.com so that i can test it and see if i need
 to make any changes. Do instruct me if i need to make any extra
 changes other than adding keys of facebook application. or i guess the
 issue is with keys :S

 thanks in advance,

 regards,
 wahib

 On 4/2/10, Ali Asghar aliasghar...@gmail.com wrote:
  i just tested fbconnect and successfully logged in and posted a
  comment to my news feed. So im positive it works. if u did use the
  code from samples then ull have to share the Mainactivity class code
  and ur manifest so that the issue can be resolved.
 
  On Mar 31, 6:10 pm, wahib haq wahib.t...@gmail.com wrote:
  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 andjar...@gmail.com 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
   janderson@gmail.comwrote:
 
   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 andjar...@gmail.com
   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
   janderson@gmail.com
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 maqs...@salsoft.net
 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:
 
   activity android:name=com.codecarpet.fbconnect.FBLoginActivity
  android:theme=@android:style/
   Theme.Translucent.NoTitleBar/
  activity
   android:name=com.codecarpet.fbconnect.FBPermissionActivity
  android:theme=@android:style/
   Theme.Translucent.NoTitleBar/
  activity
   android:name=com.codecarpet.fbconnect.FBFeedActivity
  android:theme=@android:style/
   

[android-beginners] Re: how to dynamically create buttons?

2010-04-02 Thread paresh mayani
i think this will help you
Button b = new Button(this);
b.setText(Dynamic Button);
b.setLayoutParams(new 
LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));

On Apr 2, 11:13 am, mnavlani monishanavl...@gmail.com wrote:
 hello all,
 i wanted to create buttons at runtime. The no. of buttons to be
 displayed depends upon the input of user. But creating a button
 requires some code to be written in the .xml file. so how can i
 dynamically generate the code for n no. of buttons at runtime?

 regards!

-- 
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 dynamically create buttons?

2010-04-02 Thread mnavlani
thanks paresh!
i think this might help..
hey,
actually,the server would return an image at runtime. Now i want to
use this image for the dynamically created imagebutton...how can this
be done??

regards!

-- 
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 can i integrate facebook connect api in any android application?

2010-04-02 Thread Maxood
FYI: 
http://stackoverflow.com/questions/2544295/how-can-i-integrate-facebook-api-in-any-android-application

Wonder if you're based in Karachi. I'm working on the same task as
you. Please do call me on 0321-368-9818.


On Mar 31, 5:10 am, wahib haq wahib.t...@gmail.com wrote:
 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 andjar...@gmail.com 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
  janderson@gmail.comwrote:

  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 andjar...@gmail.com 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 janderson@gmail.com
   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 maqs...@salsoft.net 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:

  activity android:name=com.codecarpet.fbconnect.FBLoginActivity
             android:theme=@android:style/
  Theme.Translucent.NoTitleBar/
         activity
  android:name=com.codecarpet.fbconnect.FBPermissionActivity
             android:theme=@android:style/
  Theme.Translucent.NoTitleBar/
         activity
  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.comandroid-beginners%2Bunsubscr
   i...@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] Re: How to save a file to res/raw ?

2010-04-02 Thread Kritzli
Hm, good idea. I don't know if it's possible.
But I'll give it a try.

On 2 Apr., 01:02, Sebastián Treu sebastian.t...@gmail.com wrote:
 On Thu, Apr 1, 2010 at 9:05 AM, Kritzli pfister.ta...@googlemail.com wrote:
  I'm not sure if it's possible to rewrite the code in java.
  Looking up at the Doc, if there's a way to create a keyboard without
  any xml I found this one:

  public  Keyboard  (Context  context, int layoutTemplateResId, 
  CharSequence  characters, int columns, int horizontalPadding)

  but, int layoutTemplateResId says (if I understand aright), I'll
  need an ID again, like the one in

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

  Although it creates an empty Keyboard. Very confusing...

 Sorry, this may sound stupid but, can't you just create a keyboard
 with a foo layout and then set it with the options of your custom xlm
 file parsed?

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

 Sebastián Treuhttp://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 dynamically create buttons?

2010-04-02 Thread ~ TreKing
On Fri, Apr 2, 2010 at 2:28 AM, mnavlani monishanavl...@gmail.com wrote:

 Now i want to use this image for the dynamically created imagebutton...how
 can this be done??


If you take 2 seconds to read the documentation on ImageButton you will find
that it's quite simple to set which image it uses.

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

-- 
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 block incoming call in Android?

2010-04-02 Thread jitendra kumar
mute the ringer is not a solution at all.

According to my finding , there are two way of blocking incoming call:

1) using Phone Object
2) using AT command to modem

--- for first approach i am not able to get Phone object. We need to find
out how can we get Phone object using below function call:

mPhone = PhoneFactory.getDefaultPhone();

I am able to build the project including above function call but while
executing the application i am getting below exception:

04-02 09:00:14.852: ERROR/AndroidRuntime(231): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{com.android.CMdroid/com.android.CMdroid.CMdroid}:
java.lang.RuntimeException: PhoneFactory.getDefaultPhone must be called from
Looper thread.
 Why Exception???

public static void makeDefaultPhone(Context context)

Looks like when native phone application create default phone using above
API, at same time PhoneFactory class store thread ID of Phone applicaton .


   public static void makeDefaultPhone(Context context) {
synchronized(Phone.class) {
if (!sMadeDefaults) {
   * sLooper = Looper.myLooper();*
sContext = context;

if (sLooper == null) {
throw new RuntimeException(
PhoneFactory.makeDefaultPhone must be called from
Looper thread);
}
When other application call getDefaultPhone() to get Phone object, in that
case getDefaultPhone checks for phone thread ID which is store in variable
called * sLooper*.

public static Phone getDefaultPhone() {
if (sLooper != Looper.myLooper()) {
throw new RuntimeException(
PhoneFactory.getDefaultPhone must be called from Looper
thread);
}

This is the reason why we are getting exception when we call:

 mPhone = PhoneFactory.getDefaultPhone();


--- For 2nd approach we need to know how to send call disconnect command to
modem using AT command.

*The ATResponseParser class parses part of the AT command syntax used*
*to**communicate with the mobile radio hardware in a mobile handset.
This
** is, in fact, a* * command syntax very much like the AT command syntax
used by modems, a ** standard* * described in the 3GPP document number TS
27.007 and related** specifications.*

We need to find out how / what command pass to modem to disconnect the call.

Regards,
Jitendra Kumar


On Sat, Mar 27, 2010 at 10:53 PM, Sam Lowry sam.lo...@dotzyne.com wrote:

 jitendra kumar wrote:

   I want to develop one call control application on android. As we know
   android sdk does not provide any API which block incoming call due to
   security reasion.
 
   Is there any possiablity to block incoming call using android open
  source api;s?

 Did, you ever work this out?

 ~S


 --
 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.comandroid-beginners%2bunsubscr...@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

To unsubscribe, reply using remove me as the subject.


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

2010-04-01 Thread Kritzli
I'm not sure if it's possible to rewrite the code in java.
Looking up at the Doc, if there's a way to create a keyboard without
any xml I found this one:

 public  Keyboard  (Context  context, int layoutTemplateResId, CharSequence  
 characters, int columns, int horizontalPadding)

but, int layoutTemplateResId says (if I understand aright), I'll
need an ID again, like the one in

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


Although it creates an empty Keyboard. Very confusing...


-- 
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 can i integrate facebook connect api in any android application?

2010-04-01 Thread Ali Asghar
i just tested fbconnect and successfully logged in and posted a
comment to my news feed. So im positive it works. if u did use the
code from samples then ull have to share the Mainactivity class code
and ur manifest so that the issue can be resolved.

On Mar 31, 6:10 pm, wahib haq wahib.t...@gmail.com wrote:
 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 andjar...@gmail.com 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
  janderson@gmail.comwrote:

  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 andjar...@gmail.com 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 janderson@gmail.com
   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 maqs...@salsoft.net 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:

  activity android:name=com.codecarpet.fbconnect.FBLoginActivity
             android:theme=@android:style/
  Theme.Translucent.NoTitleBar/
         activity
  android:name=com.codecarpet.fbconnect.FBPermissionActivity
             android:theme=@android:style/
  Theme.Translucent.NoTitleBar/
         activity
  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.comandroid-beginners%2Bunsubscr
   i...@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 

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

2010-04-01 Thread wahib haq
dear ali thanks for ur response. I'll share my data as well tomorrow
as i dont have it rite now. But can you plz mail me your project
folder to wahib.t...@gmail.com so that i can test it and see if i need
to make any changes. Do instruct me if i need to make any extra
changes other than adding keys of facebook application. or i guess the
issue is with keys :S

thanks in advance,

regards,
wahib

On 4/2/10, Ali Asghar aliasghar...@gmail.com wrote:
 i just tested fbconnect and successfully logged in and posted a
 comment to my news feed. So im positive it works. if u did use the
 code from samples then ull have to share the Mainactivity class code
 and ur manifest so that the issue can be resolved.

 On Mar 31, 6:10 pm, wahib haq wahib.t...@gmail.com wrote:
 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 andjar...@gmail.com 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
  janderson@gmail.comwrote:

  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 andjar...@gmail.com
  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
  janderson@gmail.com
   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 maqs...@salsoft.net 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:

  activity android:name=com.codecarpet.fbconnect.FBLoginActivity
 android:theme=@android:style/
  Theme.Translucent.NoTitleBar/
 activity
  android:name=com.codecarpet.fbconnect.FBPermissionActivity
 android:theme=@android:style/
  Theme.Translucent.NoTitleBar/
 activity
  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.comandroid-beginners%2Bunsubscr
  i...@googlegroups.com
  For more options, visit 

[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/my_app_name/files/filename ?

-- 
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/my_app_name/files/filename ?

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
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: 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
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 mmur...@commonsware.com 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


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 connect to mysql db directly without any middleWare servers ?

2010-03-30 Thread Torch


On Mar 30, 12:49 am, adel zalok adel.zalok...@gmail.com wrote:
 Hello ,
 I am trying to search for a way to be able to connect my android app
 to a mysql database without having to use a PHP server or any
 middleWare ,so Any Suggestions ?

 Thanks in Advance !!

JDBC works perfectly with MySQL Connector/J

However the Connector/J driver is GPL and your application must also
be GPL to use it. There are LGPL drivers for SQL Server through which
you can use in a closed source application.

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


[android-beginners] Re: How to connect to mysql db directly without any middleWare servers ?

2010-03-30 Thread Networks Geek
Thank you so much ,
I will Try that !!

On Mar 30, 8:31 am, Torch kurian...@gmail.com wrote:
 On Mar 30, 12:49 am, adel zalok adel.zalok...@gmail.com wrote:

  Hello ,
  I am trying to search for a way to be able to connect my android app
  to a mysql database without having to use a PHP server or any
  middleWare ,so Any Suggestions ?

  Thanks in Advance !!

 JDBC works perfectly with MySQL Connector/J

 However the Connector/J driver is GPL and your application must also
 be GPL to use it. There are LGPL drivers for SQL Server through which
 you can use in a closed source application.

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


Re: [android-beginners] Re: how to get sudoku source coed

2010-03-29 Thread mbaye dieng
Hello,
zou can find the sudoku code
herehttp://media.pragprog.com/titles/eband2/code/Sudokuv0/src/org/example/sudoku/Sudoku.java
.
Note that for the main for exemple, you have just to replace /sudoku.java
at the end of the link by main.xml.
For exemple, the link for the code of the R.java is
:R.javahttp://media.pragprog.com/titles/eband2/code/Sudokuv0/gen/org/example/sudoku/R.java

Enjoy!

2010/3/28 Paul Turchenko paul.turche...@gmail.com

 Seriously?

 On Mar 21, 9:22 pm, narwins nishkal...@gmail.com wrote:
  HI Every One
 
  I m new to the android development. I interested to learn android much
  n munch. I want to know where I will get source code of sudoku and how
  to build in eclipse. Please help me,
 
  Thank You

 --
 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.comandroid-beginners%2bunsubscr...@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.




-- 
Mbaye Dieng, engineer in computer science.
Address: Am annatal 47, 15344 Strausberg
Tel: (+49) 017635459747

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


[android-beginners] Re: how to get sudoku source coed

2010-03-28 Thread Paul Turchenko
Seriously?

On Mar 21, 9:22 pm, narwins nishkal...@gmail.com wrote:
 HI Every One

 I m new to the android development. I interested to learn android much
 n munch. I want to know where I will get source code of sudoku and how
 to build in eclipse. Please help me,

 Thank You

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


Re: [android-beginners] Re: how to get sudoku source coed

2010-03-28 Thread Pankaj Sharma
lol

On Sun, Mar 28, 2010 at 11:39 AM, Paul Turchenko
paul.turche...@gmail.comwrote:

 Seriously?

 On Mar 21, 9:22 pm, narwins nishkal...@gmail.com wrote:
  HI Every One
 
  I m new to the android development. I interested to learn android much
  n munch. I want to know where I will get source code of sudoku and how
  to build in eclipse. Please help me,
 
  Thank You

 --
 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.comandroid-beginners%2bunsubscr...@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

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.


[android-beginners] Re: How to block incoming call in Android?

2010-03-27 Thread Sam Lowry
jitendra kumar wrote:

  I want to develop one call control application on android. As we know
  android sdk does not provide any API which block incoming call due to
  security reasion.

  Is there any possiablity to block incoming call using android open
 source api;s?

Did, you ever work this out?

~S


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


[android-beginners] Re: How to call an intent of an installed application

2010-03-26 Thread Dan Liew
To call APN_SETTINGS you would do something like the following:

 Intent test = new Intent();

 test.setAction(android.settings.APN_SETTINGS);
 startActivity(test);

I have only learnt one way to start other intents in my applications
and that is by explicitly referencing the package name and class name.
For example if my package was com.android.mypackage and my class was
Called Super then I would start it with the following code

Intent test = new Intent();
test.setClassName(com.android.mypackage,com.android.mypackage.Super);
startActivity(test);

No doubt there are better ways. You can also get results from
Activities by calling startActivityForResult(intent, intentCode);

In your Android manifest you can setup intents so other applications
can call one of your applications as well although I do not know how
to do this. I advise you take a look at

http://developer.android.com/guide/topics/intents/intents-filters.html

http://developer.android.com/resources/faq/commontasks.html#opennewscreen

Happy programming!

On Mar 26, 9:42 am, rocky84 rocky84 hulkman...@gmail.com wrote:
 Hello all,

 as using the adb shell command adb shell am start -a
 android.settings.APN_SETTINGS
 i can call the APN settigns intent.
 if i installed a new app (say abc.apk) could anybody please let me know how
 can i call the intent
 of that particular application??

 my installed applicationa are stored in location /data/app-private
 thanks in advance

 rocky

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


[android-beginners] Re: How to call an intent of an installed application

2010-03-26 Thread Kitzy
If that application has an action asociated with it's intent, you
should use that:

Example:

Intent i = new Intent (com.abc.INTENT_ACTION);
startActivity (i);

If it doesn't have an action, you could try to call it with the
package name and class, although I don't know if it will let you call
it directly when it isn't your code:

Intent i = new Intent ();
i.addComponent (com.abc.packagename,
com.abc.packagname.ClassName);
startActivity (i);

You should try to use the fisrt example if it isn't you code because
the user might have a different activity they would prefer to use, eg.
They may have a custom calendar or alarm installed they setup to use
over the one which comes with the phone.

Sincerely,
-Kitzy

On Mar 26, 3:42 am, rocky84 rocky84 hulkman...@gmail.com wrote:
 Hello all,

 as using the adb shell command adb shell am start -a
 android.settings.APN_SETTINGS
 i can call the APN settigns intent.
 if i installed a new app (say abc.apk) could anybody please let me know how
 can i call the intent
 of that particular application??

 my installed applicationa are stored in location /data/app-private
 thanks in advance

 rocky

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


[android-beginners] Re: how to use touch screen on the emulator

2010-03-26 Thread Lazarus
I think touch = click, so OnClick = OnTouch.
Take it easy


On Mar 18, 10:10 am, mamila amt...@yahoo.com wrote:
 Hi all,
 my friend is trying to develop locale application that recognizes text
 entry using a touch screen input method. unfortunately, he was unable
 to figure out how to change the input method to touch screen.
 can anyone give us some suggestion on how to start the touch screen
 input method on the android emulator? we are currently using the 1.5
 version
 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 from this group, send email to 
android-beginners+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-beginners] Re: How to know the size of a file in adb shell prompt

2010-03-19 Thread rocky84 rocky84
Hello pskink  all,

i am more inerested in size of a particular file rather than other details
as with ls -l command.
i issued the below commands utility in perl to calculate the size of a file
abc.txt

*system(adb shell cd /data/app);
$filename = abc.txt;
$size_of_file = -s $filename;
print The file Size is . $size_of_file. Bytes.\n;*

but in o/p i am getting blank...

The file Size is  Bytes
 can anybody suggest me the most robust way to calculate the file size.


regds
rocky


On Thu, Mar 18, 2010 at 7:36 PM, skink psk...@gmail.com wrote:



 On Mar 17, 5:34 pm, rocky84 rocky84 hulkman...@gmail.com wrote:
  *Hello all,
 
  i want to extract the size of a file in adb shell using some perl
 utility.
 
  this works fine for me as below in windows but does not work in adb shell
  prompt (#)
 
  i used this function in windows stat($filename);
 
  can anybody please let me know how can i get file size in #prompt?
 
  regds
  rocky
  *

 ls -l filename

 l is for long

 pskink

 --
 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.comandroid-beginners%2bunsubscr...@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

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.


Re: [android-beginners] Re: How to know the size of a file in adb shell prompt

2010-03-19 Thread Mark Murphy
rocky84 rocky84 wrote:
 Hello pskink  all,
 
 i am more inerested in size of a particular file rather than other
 details as with ls -l command.
 i issued the below commands utility in perl to calculate the size of a
 file abc.txt
 
 *system(adb shell cd /data/app);
 $filename = abc.txt;
 $size_of_file = -s $filename;
 print The file Size is . $size_of_file. Bytes.\n;*
 
 but in o/p i am getting blank...
 
 The file Size is  Bytes
  can anybody suggest me the most robust way to calculate the file size.

http://exampledepot.com/egs/java.io/GetLength.html

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

Android App Developer Training: http://commonsware.com/training

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


[android-beginners] Re: How to know the size of a file in adb shell prompt

2010-03-18 Thread skink


On Mar 17, 5:34 pm, rocky84 rocky84 hulkman...@gmail.com wrote:
 *Hello all,

 i want to extract the size of a file in adb shell using some perl utility.

 this works fine for me as below in windows but does not work in adb shell
 prompt (#)

 i used this function in windows stat($filename);

 can anybody please let me know how can i get file size in #prompt?

 regds
 rocky
 *

ls -l filename

l is for long

pskink

-- 
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: How can I catch a ring event?

2010-03-18 Thread Andreas
Hi,

In TelephonyManager there's a method called listen. If you provide
that with a PhoneStateListener, you can use the callback method
onCallStateChanged to listen to the events CALL_STATE_IDLE,
CALL_STATE_RINGING and CALL_STATE_OFFHOOK.

Good luck!

Andreas

On Mar 12, 11:17 pm, df trfilmograp...@gmail.com wrote:
 Hi android developers!

 I'm clearly a newb, and I was wondering if anyone knows how I can
 detect a ring event on my cellphone through the android sdk?

 If you want to simply point me to a page in the api documents that
 would be a good answer for me, I just don't know how to start my
 research!

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


[android-beginners] Re: How to use built in email application to send email from my application

2010-03-17 Thread Gulfam
Hi Satish

Check this working for me:

public void launchEmailActivity(){

final  Intent emailIntent = new
Intent(android.content.Intent.ACTION_SEND);
emailIntent .setType(plain/text);
emailIntent .putExtra(android.content.Intent.EXTRA_EMAIL, new
String[]{});
emailIntent .putExtra(android.content.Intent.EXTRA_SUBJECT, 
Test
Subject);
emailIntent .putExtra(android.content.Intent.EXTRA_TEXT, 
Testing
email text);
this.startActivity(Intent.createChooser(emailIntent, Send
mail...));
}

Best Regards,
Gulfam Hassan


On Mar 11, 5:40 pm, Satish satishkolaw...@gmail.com wrote:
 Hello,

                 I want is to automatically compose an e-mail with a
 subject line, recipient address and an image attachment, and an e-mail
 app should then pop up with this                 automatically
 composed  message, to let the user decide whether to send, edit or
 discard the message.

 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


[android-beginners] Re: How to make a Widget start an app?

2010-03-16 Thread Ne0
If you want to start an app and only start an app, you should just put
a shortcut to the app on your home screen. If its an individual
activity you wanted to start, you could do something similar to this:

public class Widget extends AppWidgetProvider {
@Override
public void onUpdate(Context context, AppWidgetManager
appWidgetManager,
int[] appWidgetIds)
context.startActivity( new Intent(context,
yourActivity.class) );
}

Though i would suggest using shortcuts, its what they are designed for
and you dont have to write a widget!

Ne0


On 22 Jan, 00:00, Justin Anderson janderson@gmail.com wrote:
 Follow this 
 tutorial:http://android-developers.blogspot.com/2009/04/introducing-home-scree...

 This tutorial has the Widget start a service.  What I then did is have the
 service start an app.  I'm not sure that widget's can directly launch an
 application.

 Hope that helps,
 Justin

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

 On Sun, Jan 10, 2010 at 7:02 AM, Lyndon
 lyndon.smith.mob...@googlemail.comwrote:

  I am trying to do something that MUST be very simple but for the life
  of me I cannot find the answer.

  I have a very simple Widget taken from the book Hello, Android!

  All it does is display the date and time. It works fine.

  I want to make it respond to a 'click' and start the browser (or any
  app for that matter).

  I have spent absolutely ages researching how to do this and I can find
  no examples on the web.

  Can any one point me in the right direction, please.

  Regards

  Lyndon

  --
  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.comandroid-beginners%2bunsubscr...@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


[android-beginners] Re: How I get values from a ListPreference??

2010-03-04 Thread JGabiMark
I did it!

Thanks a lot!

On Mar 2, 10:41 pm, TreKing treking...@gmail.com wrote:
 On Mon, Mar 1, 2010 at 4:14 PM, JGabiMark jgabim...@gmail.com wrote:
  Now I want to get the value clicked in the ListPreference, in the java
  class.

  How can I do it?

 Use the key you've specified in the XML file (in this case denbora_3g) on
 a SharedPreferences object.

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

-- 
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: How to trace the functions called ? [by the app]

2010-02-24 Thread Naveen DS
Thanks a lot .. I will see to it .

fadden wrote:
 On Feb 23, 5:38 am, Naveen DS naveen.cse@gmail.com wrote:
    I tried trace view and dmtracedump, but these show info about the
  System functions rather than the user defined ones in app..br/

 The android.os.Debug method tracing shows all methods.  It doesn't
 discriminate based on whether something is part of the framework or
 not.

-- 
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: How to trace the functions called ? [by the app]

2010-02-23 Thread fadden
On Feb 23, 5:38 am, Naveen DS naveen.cse@gmail.com wrote:
   I tried trace view and dmtracedump, but these show info about the
 System functions rather than the user defined ones in app..br/

The android.os.Debug method tracing shows all methods.  It doesn't
discriminate based on whether something is part of the framework or
not.

-- 
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: How to make gap between two TextViews'?

2010-02-22 Thread jarnaud
Marco's right but here's another method you can explore: adding
padding to your textview.
Basically it's adding the gap inside the object instead of adding
borders.
Of course this will not work for you if the background colour of your
linear layout and
your textviews is different.

--
Jay - Android blog for developers: http://www.devandro.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


[android-beginners] Re: How to download android source code in windows machine

2010-02-19 Thread Kitzy
I have tried adding a sources directory to Android1.5 and unzip the
sources zip there (tried different one's people have bundled from
different places, including this last one) but keep getting an error
when Refreshing external folders

java.lang.IllegalArgumentException:
Element not found: /AndroidSDK1.5/sources.

Error Refreshing workspace
Element not found: /AndroidSDK1.5/sources/jp.

...and a few others...

I haven't had any error until I added the sources directory to my
sdk ...\platforms\android-1.5\sources and unziped into it.

I'm running on windows 7 and eclipse galleleo.

And ideas what the error means, or how to fix it?

Sincerly,
-Kitzy

On Feb 17, 12:21 pm, XCaffeinated ssatn...@gmail.com wrote:
 There is a great page here Attaching Android platform source in
 Eclipse:

 http://android.opensourceror.org/2010/01/18/android-source/

 that explains both how to get the correct sources for the platform you
 are looking for and how to get Eclipse to recognize it.

 The author also took the time to gather zips of sources for 1.5, 1.6
 and 2.1, which you can just download and start browsing immediately.
 Skip down to the section on 'What you came here for'. Immediately
 after that section he explains how to get it working with Eclipse.

 He also has links to several other related articles.

 Hope this helps!
 XCaf

 On Feb 17, 11:38 am, Kitzy kitzyk...@gmail.com wrote: I read online that 
 this link should work for the latest 
 source:http://git.source.android.com/?p=platform/frameworks/base.git;a=snaps...
  The filename is base-HEAD.tar.gz and is 30mb

  It does not support download accelerator and the speed average is
  15kbps.
  I haven't been able to get it to finish downloading however :(

  I did find however you can download Cupcake Android v1.5 source code
  21.6 
  mb:http://rgruet.free.fr/public/android-1.5-cupcake-src.ziphttp://www.di...

  And they are requesting mirrors to the code if you can set one up.

  If anyone knows any other sites or ways, they would be greatly
  appriciated.

  Sincierly,
  -Kitzy

  On Feb 10, 12:42 pm, Abhijeet Rukmangad talktoabhij...@gmail.com
  wrote:

   Hello,

   Any Idea how to download Android code on a windows machine..?

   It is mentioned on google site that code cannot be downloaded on windows
   machine.. So Is there any torrent available for same..?

   please let me know if anyone of you has downloaded the source code on
   windows machine..?

   Thanks in appreciation !!

   --
   Best Regards,
   Abhijeet Rukmangad- 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: How to style text in string array?

2010-02-19 Thread Mike
Hi Chris,

If you want to do something more in line with HTML formatting, then
use a WebView.  You can either load the html directly into the
webview, or load it from an html file packaged with your application.
The html file should go in the assets folder.

Hope this helps.

- Mike

On Feb 15, 6:49 am, Chrissshen chri...@googlemail.com wrote:
 Hi,

 I have a string array and was trying to style certain parts of the
 text with tags like b, i, ... but it doesn't work.
 The array looks like this:

 resources
         array name=hour1
                 itemblabla\nbblabla/b/item
         /array
 /resources

 The text is displayed in the textview like this:
 tTitel.setText(Html.fromHtml(Text[ii]));

 I tried it without Html.fromHtml too but this had no effect. The
 styling tags do work if i use them directly in the code, like:
 tTitel.setText(Html.fromHtml(blablabblabla/b);

 Any ideas how to style the text in an array??

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


  1   2   3   4   5   6   7   8   9   10   >