Hi Shridutta,

     Very nice blog. It works for me . Thanks a lot ::)

Thanks
Shiv


On Fri, May 24, 2013 at 9:45 PM, shridutt kothari <shriduttkoth...@gmail.com
> wrote:

> Hi Shiv,
>
> For more details please my blog @
> http://shriduttkothari.blogspot.in/2013/05/adding-new-system-service-in-android_24.html
>
>
> let me know if you still face any issues.
>
> Thanks,
> Shridutt Kothari
> Impetus 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 path
>>
>>          framework/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.mk
>>
>>     3. I created Service class in this path
>>          
>> frameworl/base/services/java/**com/android/server/your_custom**_service
>> and registerd in SystemService.java
>>
>>     4.  I register my manager like below in the class
>> /frameworks/base/core/**java/android/app/ContextImpl.**java
>>
>>            registerService("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 
>> lines
>>
>>                   public static final String DEMO_SERVICE = "service_name
>> ";
>>
>>   6. After using all above steps I am using   getSystemService(Context.
>> DEM**O_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.Runtimd
>> E/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
>> implemented
>> E/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 more
>>
>>   How to solve this one..
>>
>> Thanks
>> Shiv
>>
>>
>> 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<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/**
>>> 88fff90131f54d45dc496c45127ac1**d16ad257df<https://github.com/CyanogenMod/android_frameworks_base/commit/88fff90131f54d45dc496c45127ac1d16ad257df>
>>>
>>> ·         http://developer.android.com/**reference/android/app/Service.*
>>> *html <http://developer.android.com/reference/android/app/Service.html>
>>>
>>>       http://developer.android.com/**guide/topics/fundamentals/**
>>> services.html<http://developer.android.com/guide/topics/fundamentals/services.html>
>>>
>>>       
>>> http://www.opersys.com/blog/**esc-india-2011-wrapup<http://www.opersys.com/blog/esc-india-2011-wrapup>
>>>
>>> ·         http://processors.wiki.ti.com/**index.php/Android-Adding_**
>>> SystemService<http://processors.wiki.ti.com/index.php/Android-Adding_SystemService>
>>>
>>>       https://github.com/**CyanogenMod/android_**frameworks_base/commit/
>>> **88fff90131f54d45dc496c45127ac1**d16ad257df<https://github.com/CyanogenMod/android_frameworks_base/commit/88fff90131f54d45dc496c45127ac1d16ad257df>
>>>
>>> ·         http://iserveandroid.blogspot.**in/2011/01/how-to-implement-**
>>> your-own-status-bar.html?**showComment=1368108678394#**
>>> c8749284632889235398<http://iserveandroid.blogspot.in/2011/01/how-to-implement-your-own-status-bar.html?showComment=1368108678394#c8749284632889235398>
>>>
>>>             http://www.alittlemadness.**com/2010/06/07/understanding-**
>>> the-android-build-process/<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-porting+unsubscr...@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-porting+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
unsubscribe: android-porting+unsubscr...@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-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to