[Solved] no reaction: context.getSystemService(Context.LOC..

Put your problem here if it does not fit any of the other categories.

[Solved] no reaction: context.getSystemService(Context.LOC..

Postby sommeralex » Sun Jan 20, 2008 4:16 am

there is no reaction on

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. TextView tv = new TextView(this);
  2.  
  3. public Context context;
  4.  
  5.  
  6.  
  7. tv.setText("1");
  8.  
  9. LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
  10.  
  11. tv.setText("2");
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


The Android Emulator only shows "1" but not "2" on the TextView Output - any ideas why?!!

thx..
alex


i could clarify it:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. LocationManager lm = (LocationManager) myMidlet.getSystemService(Context.LOCATION_SERVICE);
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
sommeralex
Experienced Developer
Experienced Developer
 
Posts: 95
Joined: Sun Jan 20, 2008 3:12 am
Location: Vienna

Top

Postby plusminus » Sun Jan 20, 2008 1:36 pm

Hello sommeralex,

does it work without the "LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);" in between :?:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby sommeralex » Sun Jan 20, 2008 2:54 pm

i am not sure, what you mean!

(question clarified anyway)
sommeralex
Experienced Developer
Experienced Developer
 
Posts: 95
Joined: Sun Jan 20, 2008 3:12 am
Location: Vienna

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests