Re: [android-developers] Regarding retrieving date and time from cell tower

2011-10-09 Thread TreKing
On Sat, Oct 8, 2011 at 3:10 AM, sourabh sahu souruit...@gmail.com wrote: Is there any way to get date and time from cell tower in android programmatically. IDK, but is there a reason you need it specifically from the cell tower? The device has this information ...

Re: [android-developers] Adding an image to the left of ExpandableList arrow icon

2011-10-09 Thread TreKing
On Sat, Oct 8, 2011 at 6:01 PM, dashman erjdri...@gmail.com wrote: How can one add an image to the left of ExpandableList arrow icon - ala the built-in call-log page There is no image to the left of the ExpandalbeList arrow icon in the call-log page (Nexus 2.3.4 stock).

Re: [android-developers] call startActivityForResult from button

2011-10-09 Thread TreKing
On Sun, Oct 9, 2011 at 12:14 AM, John jnb...@gmail.com wrote: ((Activity) getApplicationContext()).startActivityForResult(intent, BROWSE_FOR_FOLDER); Do not use getApplicationContext() unless you know what you're doing. It is the context associated with your Application, not your Activity.

[android-developers] Re: call startActivityForResult from button

2011-10-09 Thread John
this is the button. How do I get the Activity that the button is housed in inside the Button.OnClick() event handler? On Oct 8, 11:28 pm, TreKing treking...@gmail.com wrote: On Sun, Oct 9, 2011 at 12:14 AM, John jnb...@gmail.com wrote:  ((Activity)

[android-developers] Re: Video in WebView

2011-10-09 Thread Efi Merdler-Kravitz
By video you mean youtube? On Oct 9, 7:49 am, Siva Prakash siva.yuvan2...@gmail.com wrote: Thanks This code is working for normal web pages but not with video/audio private WebView myWebView; private ProgressDialog pd ; this.myWebView = (WebView) this.findViewById(R.id.webView); Bundle

Re: [android-developers] Re: Video in WebView

2011-10-09 Thread Siva Prakash
Yes I want to play a video from You tube or from another HTML file. On Sun, Oct 9, 2011 at 1:22 PM, Efi Merdler-Kravitz efi.merd...@gmail.comwrote: By video you mean youtube? On Oct 9, 7:49 am, Siva Prakash siva.yuvan2...@gmail.com wrote: Thanks This code is working for normal web

Re: [android-developers] Android Benchmark

2011-10-09 Thread ehsan azimzadeh
I want to determine which bytecodes are usually execute. In other words I'm doing a bytecode profiling. This is not only in a specific domain. Is there any universal and valid benchmark? Ehsan On 8 October 2011 15:09, Damien Cooke cooke.dam...@gmail.com wrote: Not sure what you are trying to

[android-developers] Multithreading in Android?

2011-10-09 Thread venugopal reddy
Hi dear friends, I Created one Internet application(using webview). its working fine. I have one doubt, In Applications If click our application icon it will open in browser . i can operate.. now my requirement is if i close the browser straight away that application should be closed...

Re: [android-developers] Re: Video in WebView

2011-10-09 Thread gyanu maharjan
check this.. http://stackoverflow.com/questions/4810421/open-video-player-in-webview On Sun, Oct 9, 2011 at 1:46 PM, Siva Prakash siva.yuvan2...@gmail.comwrote: Yes I want to play a video from You tube or from another HTML file. On Sun, Oct 9, 2011 at 1:22 PM, Efi Merdler-Kravitz

Re: [android-developers] Re: textView Clears on Rotation

2011-10-09 Thread Kostya Vasilyev
09.10.2011 2:41, Studio LFP ?: *TreKing, Kostya, Romain Guy,* I do understand what you guys are saying, so I am listening, but it seems to be a contradiction since it seems most of the internal applications use it, including quite a few that Google themselves send with the devices.

[android-developers] Re: working with tabs (tabhost)

2011-10-09 Thread Kristoffer
Hello. Thanks for the reply, but iam not sure how i should implement that in my code, here is my code that build the tabs. TabHost tabHost = getTabHost(); TabHost.TabSpec spec; Intent intent; intent = new Intent().setClass(this, Main.class); spec = tabHost.newTabSpec(main).setIndicator(Main)

Re: [android-developers] Regarding retrieving date and time from cell tower

2011-10-09 Thread sourabh sahu
In my application,I need current date and time, but as of now if user changes the date of a device.the previous dates are coming.I want it to be exact current date and time. Thanks, sourabh On Sat, Oct 8, 2011 at 11:06 PM, TreKing treking...@gmail.com wrote: On Sat, Oct 8, 2011 at 3:10 AM,

Re: [android-developers] Regarding retrieving date and time from cell tower

2011-10-09 Thread Kostya Vasilyev
Not every cellular network provides date and time. I believe it's mandatory for CDMA (because of the nature of the protocol), but some GSM networks don't provide this info. If you need an independent time source, consider using NTP to obtain time from the Internet. -- Kostya 09.10.2011

[android-developers] How do I can start a new Activity after 1 minute?

2011-10-09 Thread Zwiebel
I have a button. If the user clicks on it, I want to start a new Activity after 1 minute. Between the click and the new activity, the user can click on an another button more times. How I can start the new Activity after 1 minute, if the user clicks the button? I tried to make it with a new

Re: [android-developers] Regarding retrieving date and time from cell tower

2011-10-09 Thread sourabh sahu
This is the problem, case is there is no internet and data connectivity, only gsm network is available,I dont want to use any internet services. Please provide any suggestion. Thanks Regards, Sourabh On Sun, Oct 9, 2011 at 3:10 AM, Kostya Vasilyev kmans...@gmail.com wrote: Not every cellular

[android-developers] Check App instalation way

2011-10-09 Thread viktor
Is it possible to check how an app was installed onto device? For e. : Market or it is installed by user, or it is in system folder system/app/*. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

Re: [android-developers] Can we 'include' a xml into another preference xml by file? and by jar(another package)?

2011-10-09 Thread Mark Murphy
On Sat, Oct 8, 2011 at 12:25 PM, Build account newandroi...@gmail.com wrote: 1. Can we include a xml layout file from another JAR package?  Like include layout=@com.Test.TestJar.layout/layout02 / ???  Is this possible? Not that I am aware of. Note that you can call addPreferencesFromResource()

Re: [android-developers] How do I can start a new Activity after 1 minute?

2011-10-09 Thread Mark Murphy
On Sun, Oct 9, 2011 at 6:18 AM, Zwiebel hunzwie...@gmail.com wrote: I have a button. If the user clicks on it, I want to start a new Activity after 1 minute. Between the click and the new activity, the user can click on an another button more times. How I can start the new Activity after 1

[android-developers] Re: How do I can start a new Activity after 1 minute?

2011-10-09 Thread viktor
CountDownTimer, help you, you can stop timer anytime. On 9 Жов, 13:18, Zwiebel hunzwie...@gmail.com wrote: I have a button. If the user clicks on it, I want to start a new Activity after 1 minute. Between the click and the new activity, the user can click on an another button more times. How I

[android-developers] layout changes when on-screen keyboard shows/hides suggestions

2011-10-09 Thread Alexander Bürger
Dear Android experts, I have a little problem with a layout of an activity. Some elements are moving in a strange way depending on the state of the on-screen keyboard. For testing, I made an Activity that only calls setContentView with this layout: LinearLayout

[android-developers] Re: How do I can start a new Activity after 1 minute?

2011-10-09 Thread Zwiebel
Ok thanks I could make it now with it, I had a problem in my code. Now I have an another problem: Even if the user exit the program in THE minute, my Activity will appear itself. How can I do against it? On okt. 9, 12:22, Mark Murphy mmur...@commonsware.com wrote: On Sun, Oct 9, 2011 at 6:18 AM,

[android-developers] Re: Check App instalation way

2011-10-09 Thread viktor
Done! ApplicationInfo On 9 Жов, 13:20, viktor victor.scherb...@gmail.com wrote: Is it possible to check how an app was installed onto device? For e. : Market or it is installed by user, or it is in system folder system/app/*. -- You received this message because you are subscribed to the

Re: [android-developers] Re: How do I can start a new Activity after 1 minute?

2011-10-09 Thread Mark Murphy
On Sun, Oct 9, 2011 at 7:26 AM, Zwiebel hunzwie...@gmail.com wrote: Ok thanks I could make it now with it, I had a problem in my code. Now I have an another problem: Even if the user exit the program in THE minute, my Activity will appear itself. How can I do against it? Call removeCallbacks()

[android-developers] Re: How do I can start a new Activity after 1 minute?

2011-10-09 Thread Zwiebel
I tried to call removeCallbacks in onPause, like this: removeCallbacks(r1); but it doesn't good. Here is my code: public class Screen extends Activity{ int counter = 0; Intent result; Runnable r1; @Override protected void onCreate(Bundle

Re: [android-developers] Re: Database cursor as null

2011-10-09 Thread gyanu maharjan
hi , i have solved similar problem.i have a list generated from the phone contact and on the top of populated list view i have added text field and search button so the user can search from the populated list.You and my fuction seems similar i.e list view Since i am using list view i used cursor

Re: [android-developers] Re: How do I can start a new Activity after 1 minute?

2011-10-09 Thread Mark Murphy
On Sun, Oct 9, 2011 at 8:17 AM, Zwiebel hunzwie...@gmail.com wrote: I tried to call removeCallbacks in onPause, like this: removeCallbacks(r1); but it doesn't good. What does doesn't good mean? Another possibility is for you to set yourself a boolean flag that your Runnable examines, and

[android-developers] Re: How do I can start a new Activity after 1 minute?

2011-10-09 Thread Zwiebel
It want me to create a new method removeCallbacks(Runnable) On okt. 9, 14:24, Mark Murphy mmur...@commonsware.com wrote: On Sun, Oct 9, 2011 at 8:17 AM, Zwiebel hunzwie...@gmail.com wrote: I tried to call removeCallbacks in onPause, like this: removeCallbacks(r1); but it doesn't good. What

[android-developers] stop progress bar when parsing JSON finish.

2011-10-09 Thread Muchamad Jeffri
hello, i want to ask how to implement progress bar spinner in background and then stop when parsing JSON data finish to list view. this my source code. package com.cob.json; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import

Re: [android-developers] Re: How do I can start a new Activity after 1 minute?

2011-10-09 Thread Mark Murphy
On Sun, Oct 9, 2011 at 9:10 AM, Zwiebel hunzwie...@gmail.com wrote: It want me to create a new method removeCallbacks(Runnable) removeCallbacks() is a method on View. Just as you called postDelayed() on a View, you call removeCallbacks() on a View. -- Mark Murphy (a Commons Guy)

[android-developers] Re: call startActivityForResult from button

2011-10-09 Thread Rich
In the scope of an inner class, use OuterClass.this to refer to the Activity. So, if your activity class is named MainActivity, call MainActivity.this.startActivityForResult(intent). The other option is to define a method in the activity that does this work and call the Activity's method from

[android-developers] Re: How do I can start a new Activity after 1 minute?

2011-10-09 Thread Zwiebel
Really thanks for helps! I could make it with it! :) On okt. 9, 15:23, Mark Murphy mmur...@commonsware.com wrote: On Sun, Oct 9, 2011 at 9:10 AM, Zwiebel hunzwie...@gmail.com wrote: It want me to create a new method removeCallbacks(Runnable) removeCallbacks() is a method on View. Just as you

Re: [android-developers] Re: textView Clears on Rotation

2011-10-09 Thread Studio LFP
I'm compiling a list of things that need to happen in both cases. So far it looks like a lot bigger challenge to not use the android:configChanges than to use it. I've read the optimization post plenty of times and do understand it, but I'd like to get the big picture for the usages of both to

[android-developers] Re: stop progress bar when parsing JSON finish.

2011-10-09 Thread Studio LFP
Check out the AsyncTask object: http://developer.android.com/reference/android/os/AsyncTask.html Simple sample would be like: private class AsyncInit extends AsyncTaskVoid, Void, Void { public static boolean bThreadRunning = false; public Context context; private

[android-developers] Re: Multithreading in Android?

2011-10-09 Thread Studio LFP
Android is designed to keep applications around in a paused state unless it needs the memory back. If it does need memory from currently paused applications, it will close them to free up the required memory. This is to make sure the user can move around faster and provide a better user

Re: [android-developers] Re: textView Clears on Rotation

2011-10-09 Thread Mark Murphy
On Sun, Oct 9, 2011 at 10:59 AM, Studio LFP studio@gmail.com wrote: 3. Special consideration now has to be taken with AsyncTasks since they are linked to the UI and need to be stopped, location of processing saved and restarted False. Special consideration may be required but they do not

[android-developers] Re: layout changes when on-screen keyboard shows/hides suggestions

2011-10-09 Thread Studio LFP
Try making the Button and the EditText height match_parent (or fill_parent) instead of wrap_content. I've run into this before and I think the Button and EditText aren't quite the same initial height when using wrap_content. When the keyboard pops up, it might be pushing the Button up to the

[android-developers] Alternative 9-patch image creator - Patchworker

2011-10-09 Thread Will Shackleton
Hi I recently made a desktop application which simplifies the process of creating and exporting 9-patch images - Patchworker - http://digitalsquid.co.uk/patchworker/ Once an image is loaded (including SVG images), the 9patch areas can be manipulated with simple handles around the image. The

Re: [android-developers] Alternative 9-patch image creator - Patchworker

2011-10-09 Thread Romain Guy
Hi Will, Thanks for sharing! This UI is indeed a little better but I noticed you seem to support only 9-patches, not n-patches. Did I miss something? On Sun, Oct 9, 2011 at 9:29 AM, Will Shackleton w.shackle...@gmail.comwrote: Hi I recently made a desktop application which simplifies the

Re: [android-developers] Re: layout changes when on-screen keyboard shows/hides suggestions

2011-10-09 Thread Alexander Bürger
Hi, Try making the Button and the EditText height match_parent (or fill_parent) instead of wrap_content. That makes them same height, but this height is still changing, which looks weird. Why is the LinearLayout containing text field and button changing its height at all? This does not make

[android-developers] ListFragment addHeaderView and addFooterView issue

2011-10-09 Thread emanuele
hello there, I ve two ListFragments maganed by a tabhost. Firt time I switch between tab all is alright. The headerView is correctly added. The second time I switch between fragment I get this execption: 10-05 15:15:01.585: ERROR/AndroidRuntime(23263): java.lang.IllegalStateException: Cannot add

Re: [android-developers] Alternative 9-patch image creator - Patchworker

2011-10-09 Thread Mark Murphy
On Sun, Oct 9, 2011 at 12:36 PM, Romain Guy romain...@android.com wrote: Thanks for sharing! This UI is indeed a little better but I noticed you seem to support only 9-patches, not n-patches. Did I miss something? Um, what's an n-patch? -- Mark Murphy (a Commons Guy) http://commonsware.com |

[android-developers] Re: Alternative 9-patch image creator - Patchworker

2011-10-09 Thread Will Shackleton
Hi It currently only does 9-patches; I can add n-patch support, although I just hadn't thought to while writing the program. I'd imagine most images would be 9patches (rather than n-patches), so it would probably be an optional feature. Will On Oct 9, 5:36 pm, Romain Guy romain...@android.com

Re: [android-developers] Re: layout changes when on-screen keyboard shows/hides suggestions

2011-10-09 Thread Mark Murphy
On Sun, Oct 9, 2011 at 12:36 PM, Alexander Bürger acfbuer...@googlemail.com wrote: That makes them same height, but this height is still changing, which looks weird. Why is the LinearLayout containing text field and button changing its height at all? This does not make sense to me. The only

[android-developers] Re: Alternative 9-patch image creator - Patchworker

2011-10-09 Thread Will Shackleton
n-patches are (I think!) images which have multiple expanding sections. This would be useful if there was detail in the middle of a graphic, with 2 blank regions to be expanded. On Oct 9, 5:49 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Oct 9, 2011 at 12:36 PM, Romain Guy

[android-developers] scrollview can't work programmatically

2011-10-09 Thread billconan
Hello guys, I want to use scrollview in my app. I tried to add a text view into the scrollview, but I can't see anything rendered, except the background color of the scroll view. here is how I did it: public class MyView extends ViewGroup { ScrollView myScrollview; Textview tv;

[android-developers] Re: BitmapFactory.decodeStream() returning null when trying to load image from SD card

2011-10-09 Thread clark
BitmapFactory.decodeFile() works, so I guess I'll use that for files and decodeStream() for images included in my assets. On Oct 8, 4:08 pm, clark clarkd...@gmail.com wrote: I'm currently working on a Live Wallpaper that uses OpenGL and ran into a problem with decodeStream() always returning

Re: [android-developers] Alternative 9-patch image creator - Patchworker

2011-10-09 Thread Romain Guy
9-patches on Android are actually n-patches. You can have more than one stretching region. The draw9patch tool from the SDK will show you what happens if you draw several stretch regions. On Sun, Oct 9, 2011 at 9:49 AM, Mark Murphy mmur...@commonsware.com wrote: On Sun, Oct 9, 2011 at 12:36 PM,

[android-developers] Help: Nexus can't boot - OutOfMemory

2011-10-09 Thread David Goldfarb
Ok, I was stupid... My phone repeatedly warned me that I was low on memory and I not only ignored the warnings, I installed a game that seems to slowly grow its memory usage. Anyway, my poor phone, a stock Nexus One, finally gave up today. It won't reboot. When it tries it repeatedly crashes

[android-developers] Re: sending email automatically

2011-10-09 Thread scame
Не совсем понял, что ты именно хочешь. Чтобы тебе автоматически письмо отсылалось по какому-то интервалу? Создай сервис, запусти в нём поток и по таймеру хреначь. Или я не понял. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to

[android-developers] Re: Compilation error on my if else statement

2011-10-09 Thread scame
Wow. http://download.oracle.com/javase/tutorial/java/nutsandbolts/if.html -- 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] How to display search button in actionbar on tablet (app minSdk = 8)

2011-10-09 Thread Jean-Michel
Hi guys, I just (late and fairly stupidly) realised that one of the big differences of Honeycomb is the lack of always there standard buttons (home, back, search, menu). Home seems to be there all the time, as well as back (at least it is for my app). I found out how to get my menu back (target

Re: [android-developers] How to display search button in actionbar on tablet (app minSdk = 8)

2011-10-09 Thread Mark Murphy
On Sun, Oct 9, 2011 at 4:58 PM, Jean-Michel jeanmichel.caz...@gmail.com wrote: I found out how to get my menu back (target a SDK below 11) Your options menu, with targetSdkVersion=11 or higher, will be in the action bar, on the right. but I have been Googling for last 3 hours in order to

Re: [android-developers] How to display search button in actionbar on tablet (app minSdk = 8)

2011-10-09 Thread Ralph Bergmann | the4thFloor.eu
take a look at http://developer.android.com/guide/topics/search/search-dialog.html#UsingSearchWidget and http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/SearchViewActionBar.html Am 09.10.11 22:58, schrieb Jean-Michel: Hi guys, I just (late and

[android-developers] Re: sending email automatically

2011-10-09 Thread lbendlin
If you didn't understand what he/she wanted, then why bother replying? The usage of a service is not relevant to the stated problem. -- 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] Re: Update that is not signed appropriately

2011-10-09 Thread Doug
Do you have the same app with the same package name on Amazon with DRM enabled? If so, that may be a problem. When someone downloads an app from Amazon, the Android Market app will still check it for updates on the Android Market. When Amazon DRM is enabled, they mangle the signature of your

Re: [android-developers] sending email automatically

2011-10-09 Thread rahul verma
Yeah i too need to know that. .whenever we try to send a mail a gmail app screen comes ,what is the way to omit that i mean send the mail automatically On 8 Oct 2011 22:43, Palike palo...@centrum.sk wrote: Hi, at first sorry for my English. I need to make app that will automatically send a file

Re: [android-developers] sending email automatically

2011-10-09 Thread rahul verma
What is SMTP? On 10 Oct 2011 06:16, rahul verma rahulsgonnar...@gmail.com wrote: Yeah i too need to know that. .whenever we try to send a mail a gmail app screen comes ,what is the way to omit that i mean send the mail automatically On 8 Oct 2011 22:43, Palike palo...@centrum.sk wrote: Hi,

[android-developers] Getting info from a calling activity advice

2011-10-09 Thread erik wagner
Hi, I'm trying to do something where I have an activity that needs to call another activity. I use the startActivityForResult and pass it a integer as the second parameter. I know I can check for that information after the second activity is done but my question is; is there a way I can know

[android-developers] Re: Scenario where initLoader() does not call onLoadFinished()

2011-10-09 Thread aleksej
I have the same issue. It looks like the bug in CurorLoader. Any ideas of workaround fix for that? On Oct 8, 12:29 am, kaciula catalin.moro...@gmail.com wrote: I have a simple activity with one fragment. The fragment uses a CursorLoader to load some data from a ContentProvider. I just call

[android-developers] Re: scrollview can't work programmatically

2011-10-09 Thread Studio LFP
I think it has to do with you are extending ViewGroup. Try this redone code where it is extending LinearLayout instead and see if it does what you need it to. public class MyView extends LinearLayout { ScrollView myScrollView; TextView tv; public MyView( Context

[android-developers] Re: USB Bluetooth

2011-10-09 Thread gjs
Hi Did you pair the Usb Bluetooth with your Android device ? Regards On Oct 7, 6:33 pm, tushar tushar.2...@gmail.com wrote: Hi, I am enabling USB Bluetooth on Set top box.I am able to send the files to various phones but not able to reveive any.below erros it shows while connecting:

[android-developers] Re: Bitmap 32 bitperpixel image to Bitmap 8 bitperpixe image

2011-10-09 Thread gjs
Hi, You can implements the method yourself - Read each 32 or 24bit RGB value, take some sort of average value from each of the R, G B bytes, then store this averaged value in your single grayscale byte. Usually some weighting is applied to the RGB values see

Re: [android-developers] Getting info from a calling activity advice

2011-10-09 Thread TreKing
On Sun, Oct 9, 2011 at 8:06 PM, erik wagner erik.j.wag...@gmail.com wrote: If not, can anyone provide some advice on how to get a value from a calling activity to the called activity? Put data in the intent you send to the second activity.

[android-developers] Duplicate Media Files

2011-10-09 Thread perumal316
Hi All, I am using the below mentioned intent to start the native camera app for taking picture. Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri); startActivityForResult(intent, 1); Now the issue is, the

[android-developers] A noob question about MultipartEntity

2011-10-09 Thread routis
Hi I guess this is a stupid noob question but I want to know why Android framework does not provide with MultipartEntity class and if there is future plan to support this. Thank you for your reading. -- You received this message because you are subscribed to the Google Groups Android Developers

[android-developers] how to make a url get fitted to an android device screen

2011-10-09 Thread Sivasankar K
i want to load an url either in browser or webview, but i need the entire page to be fitted inside the device screen. There should not be any scroll bars either in horizontal or vertical. I cant make any changes in the web side. In that particular webpage i have a image of width960 and height640,

[android-developers] Re: HTC and LG haven't implemented Android in the right way

2011-10-09 Thread Nightwolf
Probably your source texture image has no any transparency. That's why black squares are visible. Setting alpha to 0.25f makes your stars look faded. You should not change the alpha value in glColor4f. You should prepare star image with transparency. Anyway I still think that it's possible to get

[android-developers] Why dither a bitmap

2011-10-09 Thread dara kok
Can somebody here explain me why dithering is needed in Android? Thanks dara kok -- 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

[android-developers] Problem with PagerAdapter using various Views

2011-10-09 Thread Dominik Erbsland
I used this tutorial to make a little sample app with the PagerAdapter to swipe through views smoothly. http://code.google.com/p/viewpagerexample/source/browse/trunk/AwesomePager/src/com/geekyouup/paug/awesomepager/AwesomePagerActivity.java But the problem there is that they only use one TextView

[android-developers] Get GPS Location in a Broadcast Receiver.

2011-10-09 Thread shihab Shuvro
hi, i m new in android. i want to get GPS Loction in a broadcast receiver . but it shows error .my code is here. public void onReceive(Context context, Intent intent) { LocationManager locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); // erros in