My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 01, 2008 by marcus.mitschack
ProgressStalled  
Problems with instantiation of own mock location provider classes prohibit successfull development.

Introduction

Android 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 classes

The 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 instantiation

But 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


Sign in to add a comment
Hosted by Google Code