Android的图书馆应自动启动 [英] android library should start automatically
问题描述
我开发Android库名为samplelib.jar包含在一个单独的类中的方法 executeFlow() CallMyFlow 。
我的主要项目加入这个库,并要求 CallMyFlow.executeFlow()
在OnCreate中(中),它完美的作品的时间。
I am developing an android library named samplelib.jar which contains a method executeFlow() in a seperate class CallMyFlow.
I added this library in my main project and called CallMyFlow.executeFlow()
at the time of OnCreate() which works perfectly.
但我需要在 executeFlow()方法应该不调用它的的OnCreate()自动运行。
我想简单地说jar添加到我的项目。而库本身要找到的OnCreate()正在发生的事情,它应该自动调用的 executeFlow()方式。
But i need the executeFlow() method should run automatically without calling it in OnCreate(). I want to simply add that jar into my project. And the library itself want to find the OnCreate() is happening and it should automatically call the executeFlow() method.
我不用想添加任何额外的code到我的主要项目(即)调用的的OnCreate(),或延长在库中的任何自定义类的方法。可能吗?我试了一下,但无法得到的结果。任何想法都欢迎。
I need not want to add any extra code into my main project(i.e) calling the method in OnCreate(), or extending any custom class in library. Is it possible? I tried it, but could not get the result. Any ideas are welcome.
推荐答案
据Android SDK中我希望这是不可能的。
According to android SDK i hope it is not possible.
这篇关于Android的图书馆应自动启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!