androidlocation-provider

How to import com.android.location.provider?


How I can import com.android.location.provider for creating custom unbundled location provider? I use android studio and I import .jar file but it doesn't work . in java code I wrote :

import com.android.location.provider.LocationProviderBase;

but It makes error and compiler can't reference to the library .


Solution

  • Finally I found the solution. Library com.android.location.provider.LocationProviderBase is not in public android API which is implemented in android.jar and can not be used easily.For referencing to this library you should use reflection in java and linking process occurs at runtime.

    OR

    You should get source of this package and manually add it to your project.