I have found different codes that explain how to use the GPSTracker class called from the MainActivity. In fact I was able to successfully follow the one from HERE an make it work for me.
Now my problem is that I want to call the same GPSTracker, not from the MainActivity class, but from a class one level deeper than MainActivity class.
So, 'MainActivity' calls function 'X' from second level class 'func'. Then, from class 'func' I am calling the constructor GPSTracker gps = new GPSTracker(func.this);. Then I obviously have the GPSTracker included in my eclipse project.
Up to this point eclipse doesn't mark any error in the code, but using the debugger tool I found that gps.canGetLocation() is always false. I want to point out that I declare
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
in the manifest file. I also want to point out that of course I have wifi and gps enabled.
Any help deeply appreciated.