[android-beginners] Re: Bluetooth Debugging on phones

2010-07-27 Thread DonFrench
Well, I use Eclipse and view the log file with the LogCat View, which
works great -- other than the well-known problem with occasionally
having to reset adb or restart eclipse to get the log file refreshed.
I can't imagine that using the command line creates some other problem
but I haven't tried it.


On Jul 27, 2:01 am, Megh msi...@gmail.com wrote:
 Ah, sorry.

 Debugging statements like: Log.e(TAG, ++ ON START ++);
 that would show up on the LogCat when using the emulator, don't work
 when the phone is plugged in and the app is running on it.

 I'm wondering if this is true, or it's just me missing something.
 Also, does anyone have any other recommendations for using debugging
 statements?

 On Jul 23, 7:07 pm, Nick Richardson richardson.n...@gmail.com wrote:

  Your question is quite vague.  I have never had an issue connecting my N1 to
  the debugger via Eclipse.

  What exactly is your problem?

  On Fri, Jul 23, 2010 at 9:06 AM, Megh msi...@gmail.com wrote:
   Hi, can anyone recommend the best way to debug Bluetooth applications?
   I'm running it on Nexus Ones because Bluetooth isn't supported on the
   emulator but this makes it rather difficult to debug. I'm hoping
   someone knows something about it that I don't! Thanks and much
   appreciated.

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


[android-beginners] Re: Making option menu background non-translucent

2010-07-09 Thread DonFrench
So, it's impossible then???

On Jul 7, 1:46 pm, DonFrench dcfre...@gmail.com wrote:
 The optionsmenuappears to have a translucent background by default.
 Is there a way to change that to non-translucent, non-transparent.

-- 
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: Making option menu background non-translucent

2010-07-09 Thread DonFrench
Yeah, I spent quite a few hours searching and researching with no luck
but I did not try stackoverflow.  Will do so.  Thanks.

On Jul 9, 11:22 am, Justin Anderson janderson@gmail.com wrote:
  *So, it's impossible then???*

 Not necessarily, it just means that no one on this group knows the answer.

 You can try stackoverflow or the android developers group as well.  Or you
 can also try googling and seeing if anyone has a tutorial or something about
 this...

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

 On Fri, Jul 9, 2010 at 12:18 PM, DonFrench dcfre...@gmail.com wrote:
  So, it's impossible then???

  On Jul 7, 1:46 pm, DonFrench dcfre...@gmail.com wrote:
   The optionsmenuappears to have a translucent background by default.
   Is there a way to change that to non-translucent, non-transparent.

  --
  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] Making option menu background non-translucent

2010-07-07 Thread DonFrench
The options menu appears to have a translucent background by default.
Is there a way to change that to non-translucent, non-transparent.

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

2010-06-30 Thread DonFrench
Thank you!

On Jun 27, 12:29 am, Indicator Veritatis mej1...@yahoo.com wrote:
 That was completely uncalled for and even completely unjustifiable.
 Why, your own response is more like that of a petulant child than
 any thingDonFrenchsaid.

 After all Don French gave an excellent list of reasons why it is
 better to view DDMS LogCat output in Eclipse rather than running it
 standalone. What is more, he showed very much the opposite of the
 petulance you so unfairly accuse him of by patiently detailing all
 these advantages of viewing in Eclipse.

 Real software professionals recognize your fix it yourself as the
 real petulance, since real software engineers understand that such
 bugs should be fixed by the person(s) most familiar with that part of
 the code. Code diving is all too often a terrible waste of a good
 engineer's time. Worse yet, it often causes other bugs down the road,
 because the 'diver' did not understand the code well enough. This is
 WHY it should be fixed by the person(s) most familiar with the
 relevant code, not by anyone who feels the need for the fix.

 Personally, I hope Google's team will find the time to fix it
 relatively soon, but I am not going to sweat it if they don't. But I
 will join Don in saying that it would be a valuable fix, it is likely
 being given too low a priority -- as often happens even in the best-
 run projects.

 Finally, if the Google team does recognize this as a bug, how do we
 find it in the bug database? Some of us would like to vote for it;)

 On Jun 23, 6:08 pm, Mikey frak@gmail.com wrote:

  Spoken like a petulant child - fix it yourself if you think you can do 
  better...

  On 24 Jun 2010, at 01:06,DonFrenchwrote: Thanks but I really prefer to 
  view LogCat in Eclipse because it is so
   much easier to find what you want.  In Eclipse, for example, user-
   generated log output is split into individual tabs based on the tags
   you set.   Also, in the main log tab everything is color coded. To
   find the stack trace associated with a Force Close, for example, you
   just scroll up until you see a block of red output.  Google did a
   great job in designing the Eclipse LogCat viewer except for the
   unfortunate bug that they have ignored for so long.

   On Jun 22, 11:11 am, Kostya Vasilyev kmans...@gmail.com wrote:
   Don,

   I can recommend running adblogcat from the OS's command line window.

   This way, it's always around, you can make it as large as you want, and
   can do filtering by piping through grep or find, if necessary.

   -- Kostya

   22.06.2010 22:02,DonFrenchпишет:

   I useLogCata lot when debugging but it is an ir ritation that it
   frequently has to be reset to get the latest log output. I am only
   aware of two ways to get the log output when this happens: 1) Go to
   the DDMS perspective and then pull down the menu in the Devices view
   and select reset adb, and 2) Exit Eclipse and restart it.  Some of the
   time Reset adb works but often it does not and I have to exit and
   restart Eclipse.  So, first, am I doing something wrong that causes
   LogCatto stop functioning?  And second, is there another way to
   refresh the log other than the two methods I mentioned?  And third, is
   this a bug in the Android Eclipse plug-in?  If it is, why doesn't
   Google fix it?

   --
   Kostya Vasilev -- WiFi Manager + pretty widget 
   --http://kmansoft.wordpress.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

-- 
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: Fwd: Log cAT DISAPPERAS

2010-06-30 Thread DonFrench
This is a known bug.  Here is a thread about this.
http://groups.google.com/group/android-beginners/browse_thread/thread/bb0f47904241a462/b728a0538cd9a7cd?lnk=gstq=donfrench#b728a0538cd9a7cd

As I mentioned in that thread, you usually don't have to restart
Eclipse.

On Jun 29, 3:36 pm, Emmen Farooq farooq.em...@gmail.com wrote:
 -- Forwarded message --
 From: Emmen Farooq farooq.em...@gmail.com
 Date: Wed, Jun 30, 2010 at 3:34 AM
 Subject: Log cAT DISAPPERAS
 To: android-beginners@googlegroups.com

 It happpens with me during work that the log cat stops showing , i.e.
 the place where theers logcat is totally white no output at all of any
 sort and clickng on the  D I V
  and E buttons doesnt help , I have to restart ecllipse and there it
 somes up , the restarting is a very hectic procedure , I have ecliipse
 version , please guide

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

2010-06-23 Thread DonFrench
Thanks but I really prefer to view LogCat in Eclipse because it is so
much easier to find what you want.  In Eclipse, for example, user-
generated log output is split into individual tabs based on the tags
you set.   Also, in the main log tab everything is color coded. To
find the stack trace associated with a Force Close, for example, you
just scroll up until you see a block of red output.  Google did a
great job in designing the Eclipse LogCat viewer except for the
unfortunate bug that they have ignored for so long.


On Jun 22, 11:11 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Don,

 I can recommend running adblogcat from the OS's command line window.

 This way, it's always around, you can make it as large as you want, and
 can do filtering by piping through grep or find, if necessary.

 -- Kostya

 22.06.2010 22:02, DonFrench пишет:

  I useLogCata lot when debugging but it is an ir ritation that it
  frequently has to be reset to get the latest log output. I am only
  aware of two ways to get the log output when this happens: 1) Go to
  the DDMS perspective and then pull down the menu in the Devices view
  and select reset adb, and 2) Exit Eclipse and restart it.  Some of the
  time Reset adb works but often it does not and I have to exit and
  restart Eclipse.  So, first, am I doing something wrong that causes
 LogCatto stop functioning?  And second, is there another way to
  refresh the log other than the two methods I mentioned?  And third, is
  this a bug in the Android Eclipse plug-in?  If it is, why doesn't
  Google fix it?

 --
 Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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: Problems with Google Groups?

2010-06-22 Thread DonFrench
Thanks, it was the Cookie Monster!

On Jun 21, 3:13 pm, RichardC richard.crit...@googlemail.com wrote:
 Had the same problem in Firefox, deleting the cookies for
 groups.google.* fixed it.

 Hope this helps

 /Richard

 On Jun 21, 7:15 pm, Greg Donald gdon...@gmail.com wrote:

  On Mon, Jun 21, 2010 at 12:43 PM,DonFrenchdcfre...@gmail.com wrote:
   I just fired up an IE 8.0 instance and the problem does not exist with
   it, only with FF.  And using a new instance of FF does not help.
   Here is a screen grab of the page for this thread on FireFox:

  http://www.donfrenchphotography.com/MiscPhotos/ScreenGrab.jpg

  This sort of thing happens to me sometimes when Ad Block causes style
  sheets to not load.

  --
  Greg Donald
  destiney.com | gregdonald.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] LogCat

2010-06-22 Thread DonFrench
I use LogCat a lot when debugging but it is an irritation that it
frequently has to be reset to get the latest log output. I am only
aware of two ways to get the log output when this happens: 1) Go to
the DDMS perspective and then pull down the menu in the Devices view
and select reset adb, and 2) Exit Eclipse and restart it.  Some of the
time Reset adb works but often it does not and I have to exit and
restart Eclipse.  So, first, am I doing something wrong that causes
LogCat to stop functioning?  And second, is there another way to
refresh the log other than the two methods I mentioned?  And third, is
this a bug in the Android Eclipse plug-in?  If it is, why doesn't
Google fix 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 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: Problems with Google Groups?

2010-06-21 Thread DonFrench
I just fired up an IE 8.0 instance and the problem does not exist with
it, only with FF.  And using a new instance of FF does not help.
Here is a screen grab of the page for this thread on FireFox:

http://www.donfrenchphotography.com/MiscPhotos/ScreenGrab.jpg


On Jun 21, 10:08 am, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Jun 21, 2010 at 1:03 PM, Don French dcfre...@gmail.com wrote:
  Am I the only one who can no longer post or read messages on the Google
  Groups pages?  All the GG pages I have tried, which is just the Android
  pages so far, are totally hosed for me and have been for several days.  I am
  using FireFox 3.6.3 and haven't tried other browsers, so maybe it is a
  browser-specific problem.   Anyone else having this problem?

 If you are experiencing an infinite redirect sort of behavior, then I
 have seen that too. It only seems to occur on browsers where I am
 logged in -- when I fire up a separate browser, the pages load fine.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|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


[android-beginners] Re: The application has stopped unexpectedly. Please try again.

2010-05-13 Thread DonFrench
Well that was a puzzler for sure.  I was not aware of this caps-lock
feature either.  Glad you found the answer and thanks for letting
the rest of us know what caused the problem.

On May 12, 11:34 pm, T1000 t1...@zando.dyndns.org wrote:
 Hi,

 Thanks for everyone's help. I haven't had a chance to try the numeric
 property yet, but I did find out what was causing the problem! For
 some reason, the Android emulator is configured for a foreign
 language? All of the letters on the soft keyboard are standard
 English letters, except the key in the lower left corner (capslock?).
 When capslock is down, the decimal point (period) is no longer a
 decimal point. It looks almost the same as a decimal point. Whether I
 type it on the soft keyboard on the virtual Android screen, the
 keyboard in the right of the emulator, or on my actual computer
 keyboard, it always comes out as a funky decimal point with capslock
 down! This funky decimal point was crashing parseDouble, and ignored
 by the Scanner. I've been using computers for 20 years, and I've
 never used a computer that changed the decimal point with caps lock
 enabled. Shift has to be held down, and then you get a ! Also, the
 capslock state remains the same whenever I reboot the emulator! I've
 also never seen that happen!

 http://webpages.charter.net/deham5/Android/Android-idiot-button.gif

 How to I run the emulator with a standard English keyboard? Help!

 Thanks.

 At 12:37 PM 5/12/2010, you wrote:



 Add the android:numeric property to your EditText fields, by default
 it's off:

      android:numeric=signed|decimal

 See
 http://developer.android.com/reference/android/widget/TextView.html#a...
 As TreKing suggested, don't use Scanner, it's an overkill, but don't
 forget to catch the exception.

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

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

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

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

 NEW! Try asking and tagging your question on Stack Overflow 
 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] How to create a new folder on the SD card?

2010-05-06 Thread DonFrench
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 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


[android-beginners] Re: Bluetooth on/off in Android 1.5+

2010-04-08 Thread DonFrench
Try this:

 Intent enableIntent = new
Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
 startActivityForResult(enableIntent, REQUEST_ENABLE_BT);


On Apr 7, 11:46 am, NoImJosh josh.n.willi...@gmail.com wrote:
 I have been searching for weeks for a way to turn on and off the
 bluetooth for any Android version from 1.5 onward.  I know it must be
 possible, since there are widgets in the marketplace that do just
 this, however I have never found any answers to my questions.  I do
 know that I can make it work for Android 1.x using reflection.  I also
 know it should be possible to use reflection on Android 2.x, but by
 retrieving the methods for a different class since the official
 bluetooth API was added in 2.0.  The code I've got so far is:

 private static void BT_Enable(Context context, boolean enable){
                 String V = android.os.Build.VERSION.RELEASE;
                 int ver = Integer.valueOf(V.substring(0, 1));
                 String eMethod = enable;
                 if (!enable) {
                         eMethod = disable;
                 }
                 try{
                         Object manager = 
 context.getSystemService(bluetooth);
                         Class? c = manager.getClass();
                         if (ver  1){c =
 Class.forName(android.bluetooth.BluetoothAdapter);}
                         Method method = c.getMethod(eMethod);
                         method.setAccessible(true);
                         method.invoke(manager);
                 }
                 catch (Exception e){
                         Toast.makeText(context, Error:  + e, 1).show();
                 }
         }

 One of the issues that exists in 2.x is that the call
 getSystemService(bluetooth) returns null, so to obtain the
 appropriate class I've added the following:

                         if (ver  1){c =
 Class.forName(android.bluetooth.BluetoothAdapter);}

 however, since there is no system Bluetooth service, there is no
 receiver object to invoke to, causing a failure.  Any help is greatly
 appreciated.

-- 
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: Bluetooth on/off in Android 1.5+

2010-04-08 Thread DonFrench
Right, I am only familiar with Bluetooth in 2.x.  Do you know of any
apps in 2.x that can turn on the BT radio without displaying this
dialog?  I have a feeling that it might not be possible.


On Apr 8, 9:44 am, NoImJosh josh.n.willi...@gmail.com wrote:
 While this does work for Android 2.x, since there is no
 BluetoothAdapter class in the 1.5 API, it does not compile correctly.
 Also, this pops up an alert dialog that asks if the user wants to turn
 bluetooth on or off, but it does nothing without user interaction,
 which is what I'm trying to accomplish.  Thank you for the response,
 I'm just do not think it will do what I need it to.

 On Apr 8, 12:34 pm, DonFrench dcfre...@gmail.com wrote:

  Try this:

   Intent enableIntent = new
  Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
   startActivityForResult(enableIntent, REQUEST_ENABLE_BT);

  On Apr 7, 11:46 am, NoImJosh josh.n.willi...@gmail.com wrote:

   I have been searching for weeks for a way to turn on and off the
   bluetooth for any Android version from 1.5 onward.  I know it must be
   possible, since there are widgets in the marketplace that do just
   this, however I have never found any answers to my questions.  I do
   know that I can make it work for Android 1.x using reflection.  I also
   know it should be possible to use reflection on Android 2.x, but by
   retrieving the methods for a different class since the official
   bluetooth API was added in 2.0.  The code I've got so far is:

   private static void BT_Enable(Context context, boolean enable){
                   String V = android.os.Build.VERSION.RELEASE;
                   int ver = Integer.valueOf(V.substring(0, 1));
                   String eMethod = enable;
                   if (!enable) {
                           eMethod = disable;
                   }
                   try{
                           Object manager = 
   context.getSystemService(bluetooth);
                           Class? c = manager.getClass();
                           if (ver  1){c =
   Class.forName(android.bluetooth.BluetoothAdapter);}
                           Method method = c.getMethod(eMethod);
                           method.setAccessible(true);
                           method.invoke(manager);
                   }
                   catch (Exception e){
                           Toast.makeText(context, Error:  + e, 1).show();
                   }
           }

   One of the issues that exists in 2.x is that the call
   getSystemService(bluetooth) returns null, so to obtain the
   appropriate class I've added the following:

                           if (ver  1){c =
   Class.forName(android.bluetooth.BluetoothAdapter);}

   however, since there is no system Bluetooth service, there is no
   receiver object to invoke to, causing a failure.  Any help is greatly
   appreciated.

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


Re: 回复: [android-beginners] How to send AT com mand in android?

2010-04-04 Thread DonFrench
What is this modem of which you speak?


On Apr 3, 12:52 am, lhsxqsc hh4...@gmail.com wrote:
 right

 在 2010-4-3 下午1:37,jitendra kumar android.jiten...@gmail.com编写:

 Hi All,

 I want to send At command throug my application to modem. Can some one
 please let me know how to send AT command thr my application??

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

 I ant to send below AT command to Mode.
 6.5 Hangup call +CHUPTable 13a: +CHUP action command syntax

 *Command*

 *Possible response(s)*

 +CHUP

+CHUP=?

 Please help me.

 Regards,
 Jitendra Kumar

 --
 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.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: Serial Data Transfer via Bluetooth

2010-03-17 Thread DonFrench
Then we are out of my comfort zone.  You might check this site though,
http://www.amarino-toolkit.net/documentation.html.  According to
Bonifaz Kaufmann, the developer of Amarino, they are communicating via
Bluetooth SPP with   the following devices, all pre 2.0.

* HTC Dream (aka T-Mobile G1, firmware 1.1, 1.5 and 1.6)
* HTC Magic (firmware 1.5 and 1.6)
* HTC Tattoo (firmware 1.6)
* Huawei U8220 (aka T-Mobile Pulse, firmware 1.5)
* (partially tested) Samsung Galaxy (firmware 1.5)

You can find the entire source code of Amarino here: 
http://code.google.com/p/amarino/
and it includes all the Bluetooth related stuff as well.  Good luck.




On Mar 17, 12:05 pm, BobG bobgard...@aol.com wrote:
 Hi Don. I think you need 2.0 or higher to run the bluetooth chat
 example.. wish it wasnt so... I have a dev phone 2 (Google Ion? Does
 it have other names? HTC something? TI something?) with 1.6. Someone
 know how to use the bt backport examples? What dir do I put the jar
 file in?

-- 
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: Serial Data Transfer via Bluetooth

2010-03-16 Thread DonFrench
Look at the Bluetooth Chat example and change the UUID to
1101--1000-8000-00805F9B34FB.  That should get you going.

On Mar 10, 7:29 pm, AnthonyB abia...@uic.edu wrote:
 I'm trying to get serial data from a USB Weather Board from Sparkfun
 Electronics using one of their SPP Bluetooth Modems.  This device will
 be able to send serial data over bluetooth and all I wan't to do is
 read and store the data.  I'm pretty sure this is possible but I'm
 still not great at writing code for an android device yet. After that
 I want to take that data and put it into a human-readable way for
 instance for temperature have (Temperature= 70F). The value of 70
 will come from the serial ascii string of bytes and I'll probably be
 able to work with the data after I get it and save it.  So can anyone
 give me a little bit of code on how to read and store the ascii string
 or give me a good example to look at?  Also the string is 46 bytes and
 starts with a # sign and ends with a $ sign and I'd like to use that
 to make sure I just get one string of data.  Any help or insight would
 be greatly appreciated.

 Thanks
 Tony

-- 
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: he application Settings(process com.android.settintgs) has stopped unexpectedly.

2010-03-09 Thread DonFrench
As you point out, there IS no support for Bluetooth in the emulator,
so there is nothing to enable.  If you decide to write your own
emulator and include Bluetooth support, please let us know as there
are many others who would like it also.


On Mar 6, 9:23 pm, Bhushan bhushanbhange...@gmail.com wrote:
 Android sdk 2.1 supports Bluetooth but we are unable to enable
 Bluetooth in emulator.
 while running Bluetooth chat application given in  sample code .
 It throws following error :
 The application Settings(process com.android.settintgs) has stopped
 unexpectedly.
 And even in SDK DOC its given that Bluetooth not supported by
 emulator.
 Emulator Limitations
 In this release, the limitations of the emulator include:
     * No support for placing or receiving actual phone calls. You can
 simulate phone calls (placed and received) through the emulator
 console, however.
     * No support for USB connections
     * No support for camera/video capture (input).
     * No support for device-attached headphones
     * No support for determining connected state
     * No support for determining battery charge level and AC charging
 state
     * No support for determining SD card insert/eject
     * No support for Bluetooth
 Plz reply us how to enable blutooth in emulator

     Reply     Reply to author     Forward

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