[android-developers] Re: BroadcastReceiver not recei ving an alarm’s broadcast

2010-03-30 Thread Kevin S.
Something like that happened to me in the manifest also.  It would be
nice if it generated a compile error.   But thanks for posting the
solution.

-Kevin

On Mar 30, 6:40 am, Juanjo juan...@gmail.com wrote:
 Ok, I found the problem, hope this thread helps somebody else with the
 same stupid errors:

 My receiver was inside the manifest but outside the application
 tags :-/

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: conditional compilation

2010-03-30 Thread Kevin S.
  It really isn't very easy to do this.  In general, you can do
something like

public class MyClass
{
   public static final boolean  HAS_CHEEZBURGER=true;

   public void someMethod()
   {
   if( MyClass.HAS_CHEEZBURGER)
   {
   doCheezburger();
   } else
   {
   noCheezBurger();
   }
   }
}

   The compiler I think will see that HAS_CHEEZBURGER is constant and
can never change, and may optimize away the branch not taken.  Perhaps
some more knowledgeable folk could comment on that.

  If on the otherhand, you really really think you need to do
preprocessing using eclipse and Java, you can.   See the following
link.

http://www.boldinventions.com/index.php?option=com_contentview=articleid=81:javapreprocessorusingeclipsecatid=34:category-electronics-articlesItemid=53

-Kevin



On Mar 30, 5:57 am, Dilip Dilip dileep2m...@gmail.com wrote:
 Hi All,
  How to do conditional compilation in JAVA.

 something like in C, C++ :

 #ifdef TRUE_CONDITION

 #else

 #endif

 Thanks and Regards,
   Dileep

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Delay before starting

2010-03-30 Thread Kevin S.
FileOutputStream implements the java.io.flushable interface.

http://developer.android.com/reference/java/io/Flushable.html

-Kevin

On Mar 30, 5:52 am, perumal316 perumal...@gmail.com wrote:
 Hi All,

 I am writing a application which will write to a file. Now I want to
 show the contents of the file but

 How do I delay the show function so that there is enough time for the
 writing to be done before continuing?

 Thanks In Advance,
 Perumal

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: onRelease for ListView-Adapter

2010-03-29 Thread Kevin S.
Have you tried view.setOnTouchListener()?  I think you then get a
motionEvent which you can look at to determine if the event was a
touch up or a touch down.  I've not tried it in a listview before,
however.

-Kevin

On Mar 27, 1:54 pm, lukas lukas.zielin...@googlemail.com wrote:
 Hello everyone,

 I'm programming my first Android application and I've stumbled over a
 little problem.

 I've created my own adapter (extends BaseAdapter) for my ListView
 and in my public View getView(...) I have the following code:

  view.setOnClickListener(new View.OnClickListener() {

                                         @Override
                                         public void onClick(View v) {
                                                 
 v.setBackgroundColor(Color.RED);
                                                 testClick(clickPos); //my 
 test method that shows a Toast-
 message..
                                         }

 My problem: How do I set the color back to Color.BLACK after the
 user releases the touchscreen?

 I'm looking for something that is similar to Javascripts onMouseUp
 or onKeyUp methods. An OnClickReleaseListener() perhaps?

 Can you point me in the right direction?

 Thank you.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Being legally harassed, by a large iPhone developer

2010-03-23 Thread Kevin S.
I wouldn't be a big rush to talk to a lawyer.   Remember that they get
paid by the hour, and the bigger the fuss and the more it drags out
over time, the more money the lawyers make.   So far Firemint has made
no investment in this besides sending a couple letters.

-Kevin

On Mar 22, 2:14 pm, Brion Emde brione2...@gmail.com wrote:
 Sorry to continue the off-topic posting, everyone!

 I'm no lawyer and I think you should talk to one. Many cities' bar

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Problem about GPS

2010-03-18 Thread Kevin S.
  I think what he means is that Google Maps can still get your
approximate location by knowing which cell towers you are closest
too.  It uses this to get a general location when the GPS doesn't have
enough signal.

-Kevin

On Mar 18, 2:27 am, Andreas andreas.bex...@gmail.com wrote:
 Hi,

 I'm not sure what you mean, and I think it would help if you would
 elaborate a bit. GPS is generally wireless, since the problem of
 getting a cable to connect to objects in low earth orbit is still not
 solved. ( *_^)

 The connection to GPS satellites is generally a _lot_ better outside,
 since the signal does not penetrate buildings very well. That is a
 limitation of the GPS technology rather than of Android, and hence
 cannot be solved through software. What you can do is trying to use
 coarse location or wifi positioning, that might or might not be
 suitable for your needs.

 Best regards,

 Andreas

 On Mar 18, 1:49 pm, Ewing ewing0...@gmail.com wrote:



  I have a problem about getting GPS

  My app can getting GPS but only can using in outdoor , it cannot get
  the wireless GPS.
  Have anyone can tell me how can I getting wireless GPS when getting
  GPS in long time.

  Thank you

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


[android-developers] 3D Physics Engine For Android Demo

2010-03-15 Thread Kevin S.
   I've completed my first Android application.   It as 3D demo with a
physics engine.   It uses the phone's accelerometer so that you can
shake the world by moving the phone around.   There are  options to
adjust things like gravity, friction, and elasticity.

  The physics engine is a 100% Java port of the open source JigLib
physics engine.

  However, I only have a Motorola Droid, and I don't know if it will
work on any other phone.   The project is set to use Android 1.6.

  Before I put it in the market, I was hoping to get some feedback
from the developer community here.

  If anybody is interested in 3D stuff or physics simulation, you can
give the app a try.   The link is on the follow page.   There is a
screen shot there so you can get an idea of what the app is.

http://www.pieintheskysoftware.com/menuitem-resources-pie-3d-physics-1-0.html

-Kevin

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


[android-developers] Re: 3D Physics Engine For Android Demo

2010-03-15 Thread Kevin S.

Thanks very much for the feedback Streets, Marc and Mario...

I spent a lot of time using the profiler in a Windows version to
reduce the allocation, but I still may need to work on it a bit more.

When I was looking at physics engines before JJigLib I tried ODE4j,
but it was too slow.   I didn't see JBullet at the time.   Thanks for
the tip on JStackAlloc.

Thanks for the extra points!

-Kevin

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


[android-developers] Re: Want to start building 3d games, pointers?

2010-03-15 Thread Kevin S.

 1) Initially I wont need it, but how do you handle for touch
 interactions with a given 3d object on screen? I've heard of doing
 things like mapping screen vertices to objects and when you touch in x
 region, you are touching x object. Is there an easier way?

Android is using OpenGL ES   See  http://www.khronos.org/opengles/

Sounds like what you are interested in is gluProject() and
gluUnProject()   see   
http://developer.android.com/reference/android/opengl/GLU.html



 2) I intend to take a 3d format and import into my app, and there is
 plenty of documentation on the formats I intend to use, so I can write
 an importer... but does android 2.1 support anything out of box?

It's openGl ES, so you can draw Lines, Points and Triangles.
 AFAIK there is no built in calls for drawing higher level structures.
   For my app I wrote a parser which could take files exported from
Blender and generated Java source code which then calls
the OpenGL functions to draw the triangles.


 3) For basic menus and screen overlays, are those typically drawn with
 opengl stuff too? Or a diff sort of view layed over the top of
 glsurface?

In my app I used the standard Android menu and preference stuff.  It
seems to work ok.  I had to pause the rendering when the menu
comes up, or else it was not as responsive as it should be.

-Kevin

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


[android-developers] Re: Problem with ListPreference in preference view

2010-03-08 Thread Kevin S.
  I have the same problem which I have lost about 5 hours on.   I
finally found this:

http://code.google.com/p/android/issues/detail?id=4497

After removing all the text from the Dialog Message xml attribute of
the list preference,  it started working.It was especially
irritating that there was no message in the log that anything was
wrong.

-Kevin


On Jan 17, 8:29 pm, Chris.H mrchi...@gmail.com wrote:
 This is my first Android app (which is a soft keyboard, with dvorak
 layout) and so far it has gone pretty smoothly (either because or
 despite working from the sample code). I've had some problems (with
 special/swedish characters) that I've managed to take care of, but
 this problem I can't figure out how to solve..

 I've added a preferences view to the app for some(/a) settings, I used
 this reference:http://www.old.kaloer.com/android-preferences/and it
 worked pretty well (besides some hick up from launching the activity
 from a service).

 But when I click the list item to edit it, i get an empty dialog
 (Title and button is shown right and with the text I set in the xml-
 file, but no list, screenshot:http://i49.tinypic.com/2501p55.png).
 I can't see any problem with the program code (which isn't many
 lines..) or the xml (the arrays are generated by the Android utils in
 Eclipse and the preferences is a mix of auto and manual). You can see
 both Java code and XML here:http://pastebin.com/m4c52c3a2(titles etc
 in Swedish..)
 (I've also tried a EditTextPreference item, which seemed to work
 fine..)

 I have also looked at the log/output using adb, and can't see any
 problems there either, so I have no idea onto how to solve this...
 So i need some help..

 Regards
 Christopher H

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


[android-developers] Custom Dialog example may be incorrect

2009-11-21 Thread Kevin S.
I spent quite a long time trying to get my first custom dialog box to
work, following the example in the Android Dev Guide.

Specifically:

http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog
---
Context mContext = getApplicationContext();
Dialog dialog = new Dialog(mContext);

dialog.setContentView(R.layout.custom_dialog);
dialog.setTitle(Custom Dialog);
---

  I kept getting a badtokenexception whenever I tried to show the
dialog.

  Eventually I found a forum posting which suggested changing it to:

new Dialog(this);

  Which made the problem go away.

  My question is if the example is incorrect, or was the code not
intended to be used in an Activity method?


-Kevin



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


[android-developers] Re: Displaying Text such as score in an OpenGL game

2009-11-17 Thread Kevin S.
It's not that bad, you can just copy the LabelMaker and NumericSprite
classes and then call them in the same way that example does in the
render.

That's good news, I'll go down that path then.

 Thanks for the reply!

-Kevin

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


[android-developers] Displaying Text such as score in an OpenGL game

2009-11-16 Thread Kevin S.
   I have a the beginnings of an Open GL game running, and have gotten
to the point where it would be nice to have the FPS displayed.  Since
I will probably want to be able to put score or other info up anyway,
I started searching for how to do that.

  I found the SpriteTest example,

http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/OpenGLES/SpriteText/

  It looks nice, but really complex.   Is there an easier way?

-Kevin


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