IntroductionAndroid lbs offers the possibility to create own mock location provider classes. But currently deployment of own mock provider classes does not work due the security model. Creating and Deploying own mock provider classesThe development sounds simple, just create your class extending LocationProviderImpl and create an dir in /data/misc/location naming your provider and insert an text file named "class" there, containing the classname (including packages). Security model prohibits instantiationBut the security model of android prohibits loading of the class. Every class in an application is not visible to other applications, only exceptions are services and intents. Therefore the classloader of the android location manager service can not find the named class and therefore instantiating own mock providers won't work. This has cost several developers some time to find out, see developer group. There is no way around this, every try including: - patching the jar - files - implementing the location provider as inner class of an visible service and some more have failed. Therefore currently development ist stalled till this issue is resolved by google. MMI
|