I am new in android programming, and I have a task to make a standalone android widget (app widget), which sends some data to PHP server. I need to find a way to get current device location from the widget class. The widget class is called Alarm and it extends AppWidgetProvider, and it should be launched without Activity.
I have found many examples explaining how to get GPS location using LocationManager and LocationListener from MainActivity, but it's not what I need, I need it to be without activity, only widget.
I'll appreciate any idea. Thanks in advance.