Thoughts on Java files and forward compatibility?

Lauri Laanmets lauri.laanmets at proekspert.ee
Mon Jun 27 09:32:02 CEST 2011


On 27.06.2011 9:19, BogDan wrote:
> - and your Idea (which seems to god to be true:)  ), please test it and ask Google if this feature is/will be supported by all platforms.
OK, give me a week to test it.

BTW: Does anybody know a good idea to inherit Android Context to make a 
simple and generic class to only receive broadcast actions? The idea is 
the following:

     * Inherit as simple class as possible from BroadcastReceiver and 
Context.
     * Redirect "onReceive (Context context, Intent intent)" to native 
method.
     * Inherit Context to use "registerReceiver(BroadcastReceiver 
receiver, IntentFilter filter)" so that we don't need to do it in 
Manifest.xml
     * Then use JNI to register for all the Intents and so on.....

The only trouble is that Context is abstract but sub-class Action is 
already a screen item - maybe it's overkill to inherit from it just for 
the sake of BroadcastReceiver?

Lauri


More information about the Necessitas-devel mailing list