To force download AGPS data I have to execute following code:
LocationManager locationmanager = (LocationManager)context.getSystemService("location");
Bundle bundle = new Bundle();
locationmanager.sendExtraCommand("gps", "force_xtra_injection", bundle);
locationmanager.sendExtraCommand("gps", "force_time_injection", bundle);
Is this possible to check if device has AGPS support? I want to be sure, that executing this piece of code is necessary.
That hack is not needed at all normally, and that’s why it’s not in the regular API. Here you can read a superb answer to a similar question.
But even if a certain device doesn’t support it, calling those methods won’t hurt.