mDemoService;
}
it should be return mDemoService. Is I am correct ?
Thanks
Shiv
Hi Shiv,For more details please my blog @ http://shriduttkothari.blogspot.in/2013/05/adding-new-system-service-in-android_24.htmllet me know if you still face any issues.Thanks,Shridutt KothariImpetus Infotech
On Friday, May 17, 2013 7:06:39 PM UTC+5:30, Prasad wrote:Hi Shridutt,1. As you said in mail I created Manager class in below pathframework/base/core/java/android/os/my_manager.java/2. I created .aidl in same above path and I registered .aidl file in Framework/base/Android.mk3. I created Service class in this pathframeworl/base/services/java/com/android/server/your_custom_service and registerd in SystemService.java4. I register my manager like below in the class /frameworks/base/core/java/android/app/ContextImpl.javaregisterService("service_name", new ServiceFetcher() {public Object createService(ContextImpl ctx) {return new your_service_manager();}});5. Now inside /frameworks/base/core/java/android/content/Context.java, add following linespublic static final String DEMO_SERVICE = "service_name";6. After using all above steps I am using getSystemService(Context.DEMO_SERVICE ) to access API's in App layer but I am getting below error..ava.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.biometricclient/com.example.biometricclient.BioClient}: java.lang.RuntimdE/AndroidRuntime( 3020): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)E/AndroidRuntime( 3020): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)E/AndroidRuntime( 3020): at android.app.ActivityThread.access$600(ActivityThread.java:123)E/AndroidRuntime( 3020): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)E/AndroidRuntime( 3020): at android.os.Handler.dispatchMessage(Handler.java:99)E/AndroidRuntime( 3020): at android.os.Looper.loop(Looper.java:137)E/AndroidRuntime( 3020): at android.app.ActivityThread.main(ActivityThread.java:4424)E/AndroidRuntime( 3020): at java.lang.reflect.Method.invokeNative(Native Method)E/AndroidRuntime( 3020): at java.lang.reflect.Method.invoke(Method.java:511)E/AndroidRuntime( 3020): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)E/AndroidRuntime( 3020): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)E/AndroidRuntime( 3020): at dalvik.system.NativeStart.main(Native Method)E/AndroidRuntime( 3020): Caused by: java.lang.RuntimeException: Not implementedE/AndroidRuntime( 3020): at android.app.ContextImpl$ServiceFetcher.createService(ContextImpl.java:213)E/AndroidRuntime( 3020): at android.app.ContextImpl$ServiceFetcher.getService(ContextImpl.java:202)E/AndroidRuntime( 3020): at android.app.ContextImpl.getSystemService(ContextImpl.java:1193)E/AndroidRuntime( 3020): at android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:79)E/AndroidRuntime( 3020): at android.app.Activity.getSystemService(Activity.java:3999)E/AndroidRuntime( 3020): at com.example.biometricclient.BioClient.onCreate(BioClient.java:58)E/AndroidRuntime( 3020): at android.app.Activity.performCreate(Activity.java:4465)E/AndroidRuntime( 3020): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)E/AndroidRuntime( 3020): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)E/AndroidRuntime( 3020): ... 11 moreHow to solve this one..ThanksShiv
On Monday, 13 May 2013 19:42:04 UTC+5:30, shridutt kothari wrote:Hi Prasad,Texas has explained this in very good way here @ http://processors.wiki.ti.com/index.php/Android-Adding_SystemService.I have tested the procedure.Some useful related links for this are :
https://github.com/CyanogenMod/android_frameworks_base/commit/88fff90131f54d45dc496c45127ac1d16ad257df
· http://developer.android.com/reference/android/app/Service.html
http://developer.android.com/guide/topics/fundamentals/services.html
http://www.opersys.com/blog/esc-india-2011-wrapup
· http://processors.wiki.ti.com/index.php/Android-Adding_SystemService
http://www.alittlemadness.com/2010/06/07/understanding-the-android-build-process/
· http://tools.android.com/build
Let me know if any further jelp required.Thanks,Shridutt kothari
On Friday, May 10, 2013 12:16:10 PM UTC+5:30, Prasad wrote:Hi,How to add new module to a android framework. i.e By adding a new module I want to access API for application layer using getSystemService() method. How to do this one ? Is there any document or procedure to add new module to a framework.Thanks--
--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting
---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porti...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.