Well, you can define a placeholder resource in the library (so its code can
reference it) and overide it (use same id) in the application(s).

Or you can make Application subclasses with onCreate: not my preferred way
of doing this, but a good match for this particular case.

Either way, you will want to load any significant amount of data in the
service, so that the device feels less hiccupy after a reboot.

-- Kostya

2011/6/12 Simon Platten <[email protected]>

>  I really want to keep the data and the application code seperate...my
> application activity really does nothing except add the data from a resource
> and call the library routines.
>
> The library which is common to all applications is where the boot recevier
> resides, so I need some way to get to the application resources from the
> library / onreceiver method.
>
> Thank you,
> Simon
>
>
> On 12/06/2011 11:14 AM, Kostya Vasilyev wrote:
>
> Really depends on what kind of array it is and where it originaly comes
> from (a constant in the code, or from a file).
>
> It sounds like you already have correct initialization code, it's just not
> getting called at the right time.
>
> Two ways to ensure it gets called are: a lazy-initialize singleton, or a
> subclass of Application and its onCreate. I very much prefer the former (and
> not alone in this).
>
> -- Kostya
>
>  2011/6/12 Simon Platten <[email protected]>
>
>>  In that case I should probably create the array in a persistent store and
>> load it when required?
>>
>>
>>
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to