Not quite where you are Ashwin, but I am running into the same
problems.  I've posted a somewhat similar question, but no response
unfortunately.  All I wanted is to get PlatformLibrary to work on the
emulator and I can't even get that to work despite following the
README and all the suggestions/steps across other groups :(

I second your sentiment about your frustration and lack of
documentation, I think I've wasted three days trying to figure this
out

http://groups.google.com/group/android-porting/browse_thread/thread/93c62bf89836f96/adb63ef4d1af6aa1?q=mbethdev#adb63ef4d1af6aa1

MB

On Mar 22, 9:05 am, Ashwin Bihari <[email protected]> wrote:
> Reading up more onaddingtheAPItoAndroid..is it correct that I'd
> essentially be building a SDK Add On? If so, I've been reading about
> the files present 
> athttp://android.git.kernel.org/?p=platform/vendor/sample.git;a=treeand
> following that guide, I've created the frameworks, and sdk_addon
> directory in addition to my <product> directory that already existed
> to buildAndroidfor my board.
>
> I added the sample_addon.mk file to my <product> directory and then
> added that to <product>/AndroidProducts.mk file.
>
> Looking at the readme.txt file in the link above, it says to use:
>
>      make -j8 PRODUCT-sample_addon-sdk_addon
>
> So do I literally use the word PRODUCT here, or my product name or
> what? If I use PRODUCT, then it builds a Generic SDK? Is that what I
> want? The lack of documentation around this is seriously
> frustrating..having to google for days to get random snippets of
> information and try them out is so painstaking..
>
> Any and all help would be appreciated..
>
> Regards
> -- Ashwin
>
> On Sat, Mar 20, 2010 at 12:24 PM, Ashwin Bihari <[email protected]> wrote:
> > Guys,
>
> > Digging a bit further into this, turns out that my generated JAR file
> > looks exactly like the other ones that are generated by the build, so
> > I guess I'm OK there. I was looking in the
> >Android/out/target/product/<name>/system/framework directory. Now my
> > question is where is the JAR file from my build for my customAPIthat
> > I can send to a application developer so that they can point Eclipse
> > at it to get access to theAPI?
>
> > Regards
> > -- Ashwin
>
> > On Fri, Mar 19, 2010 at 7:23 PM, Ashwin Bihari <[email protected]> wrote:
> >> Dianne,
>
> >> OK, I've read up on the PlatformLibrary and using that and SimpleJNI
> >> as examples, I've converted our code to a similiar scheme. I created a
> >>newdirectory that contains the Java and Jni directories and the
> >> appropriate files in those directories. I configured theAndroid.mk
> >> files to both create the shared library and the JAR file.
>
> >> When I buildAndroid, I can see that my .so file gets built and deploy
> >> into /system/lib and the .jar file gets built and deployed into
> >> /system/framework.
>
> >> However, the contents of the .jar file is a Classes.dex file rather
> >> than thenewclass I defined and it's public methods like is visible
> >> within Eclipse insideandroid.jar.
>
> >> When I look at the
> >> target/common/obj/JAVA_LIBRARIES/com.example.android.test/ directory,
> >> I see a classes.jar file and in that is .class file that seems to have
> >> what I need, but that doesn't get compiled into the DEX file
> >> properly..what's the right thing to do to get the last piece working??
>
> >> Regards
> >> -- Ashwin
>
> >> On Tue, Mar 9, 2010 at 7:57 PM, Dianne Hackborn <[email protected]> 
> >> wrote:
> >>> We very strongly recommendaddingcustom APIs through a separate shared
> >>> library, as shown in the PlatformLibrary sample, rather than modifying the
> >>> framework library.  This will make things a lot easier for you (easier to
> >>> maintain patches or even no patches at all, works well with SDK tools), 
> >>> and
> >>> ensures that apps correctly report the special APIs they need (via
> >>> uses-library) so that the system and market can know whether they are
> >>> compatible with the device they are being installed on.
>
> >>> On Tue, Mar 9, 2010 at 7:53 AM, Ashwin Bihari <[email protected]> wrote:
>
> >>>> Guys,
>
> >>>> I've got a similar question in line ofaddingnewAPIs that I need to
> >>>> deploy for application developers, and wonder what's the best way to
> >>>> do it.
>
> >>>> We are delivering a platform to our customer's apps team and as part
> >>>> of the platform we need to add some custom APIs to access specific
> >>>> hardware resources, these are currently implemented through JNI and
> >>>> have associated JAR files. The test applications directly link in
> >>>> these JAR files to make use of thenewAPIs, but I'm wondering what's
> >>>> a better way of deploying thesenewAPIs without having developers
> >>>> specifically including JAR files??
>
> >>>> Deva, could you elaborate a little more about the dalvik executable
> >>>> and how that works, thanks
>
> >>>> Regards
> >>>> -- Ashwin
>
> >>>> On Tue, Mar 9, 2010 at 9:58 AM, Deva R <[email protected]> wrote:
> >>>> > hi,
> >>>> > as this's regardingandroidapp development, you might get fast response
> >>>> > at
> >>>> > 'android-developers'
>
> >>>> > here's my 2 pennies:
> >>>> > - if you want to create anewapp, use SDK,and compile your .java source
> >>>> > to
> >>>> > dalvik executable. (.dex)
> >>>> >  noteandroidhas dalvik VM, so, regular .class wont be supported.
>
> >>>> > - if you want to modify exisitingandroidcomponent, download complete
> >>>> >androidfilesystem source, modify, rebuild the component and use.
>
> >>>> > On Tue, Mar 9, 2010 at 12:26 PM, Anandi <[email protected]> wrote:
>
> >>>> >> Hi all,
>
> >>>> >> I want to add one sampleapiin local copy ofandroidon my machine. I
> >>>> >> don't want it to be distributed on the open source.
>
> >>>> >> For eg : I have mathlib.java file . This mathlib class has a native
> >>>> >> method add.
>
> >>>> >> Now i am not able to understand, where in the directory structure
> >>>> >> should i keep this java file.
>
> >>>> >> do i need to create .class and .h files manually for this or will
> >>>> >> build system take care of it?
>
> >>>> >> as per my understanding i'll need to have corresponding cpp
> >>>> >> implementation for thisapi. so, where do i keep this cpp file?
>
> >>>> >> Please suggest the steps to do this. Thanks in advance.
>
> >>>> >> Anu
>
> >>>> >> --
> >>>> >> unsubscribe:[email protected]
> >>>> >> website:http://groups.google.com/group/android-porting
>
> >>>> > --
> >>>> > unsubscribe:[email protected]
> >>>> > website:http://groups.google.com/group/android-porting
>
> >>>> --
> >>>> unsubscribe:[email protected]
> >>>> website:http://groups.google.com/group/android-porting
>
> >>> --
> >>> Dianne Hackborn
> >>>Androidframework engineer
> >>> [email protected]
>
> >>> Note: please don't send private questions to me, as I don't have time to
> >>> provide private support, and so won't reply to such e-mails.  All such
> >>> questions should be posted on public forums, where I and others can see 
> >>> and
> >>> answer them.

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

To unsubscribe from this group, send email to 
android-porting+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to