Reading up more on adding the API to Android..is it correct that I'd
essentially be building a SDK Add On? If so, I've been reading about
the files present at
http://android.git.kernel.org/?p=platform/vendor/sample.git;a=tree and
following that guide, I've created the frameworks, and sdk_addon
directory in addition to my <product> directory that already existed
to build Android for 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 custom API that
> I can send to a application developer so that they can point Eclipse
> at it to get access to the API?
>
> 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
>> new directory that contains the Java and Jni directories and the
>> appropriate files in those directories. I configured the Android.mk
>> files to both create the shared library and the JAR file.
>>
>> When I build Android, 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 the new class I defined and it's public methods like is visible
>> within Eclipse inside android.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 recommend adding custom 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 of adding new APIs 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 the new APIs, but I'm wondering what's
>>>> a better way of deploying these new APIs 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 regarding android app development, you might get fast response
>>>> > at
>>>> > 'android-developers'
>>>> >
>>>> > here's my 2 pennies:
>>>> > - if you want to create a new app, use SDK,and compile your .java source
>>>> > to
>>>> > dalvik executable. (.dex)
>>>> > note android has dalvik VM, so, regular .class wont be supported.
>>>> >
>>>> > - if you want to modify exisiting android component, download complete
>>>> > android filesystem 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 sample api in local copy of android on 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 this api. 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
>>> Android framework 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.