getSystemService is a method of Activity, not of LunarView nor of LunarView.LunarThread. That is why the first one works and the second does not.
On Feb 18, 12:27 pm, cellurl <[email protected]> wrote: > This works: > > public class Translate extends Activity implements OnClickListener { > LocationManager lm = > (LocationManager)getSystemService(Context.LOCATION_SERVICE); > > } > > This doesn't: (ERR sez: the method getSystemService(String) is > undefined for the type LunarView.LunarThread) > > public class LunarView extends SurfaceView implements > SurfaceHolder.Callback { > class LunarThread extends Thread { > > LocationManager lm = > (LocationManager)getSystemService(Context.LOCATION_SERVICE); > > } > > } > > I am hacking the lunar lander sample code, trying to put in location > info. > Any tricks appreciated. > -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 [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

