DEV Community

Cover image for Develop & Publish your own SDK in Android - Part 2(Getting started with SDK development)

Develop & Publish your own SDK in Android - Part 2(Getting started with SDK development)

Mohit Rajput on January 27, 2019

In the previous part, we learned about the structure of an AAR file and gradle dependency. In this tutorial, you will learn- How to develop a new...
Collapse
 
hadimousavi79 profile image
hadimousavi79

Hi dear @mohitrajput987
Can develop own SDK for Android in other language such as c++ and python?
If your answer is yes can you say how can develop in other language with example and short tutorial from scratch?
please

Collapse
 
mohitrajput987 profile image
Mohit Rajput

Hi, yes
In many android projects, you can see .so libraries which are developed in c++.
For that you need NDK.
You can find many ndk tutorials in internet.

Collapse
 
hadimousavi79 profile image
hadimousavi79

Hi dear @mohitrajput987 . Thank you for answering my question.
But can you explain more about create Android SDK with c++ ( .so libraries and ndk ) please?
Because I couldn't find how to create SDK with c++

Collapse
 
omarjoya profile image
Omar • Edited

Hi, I have a question, once you publish your Android library to github packages, aws buckets or Bintray, and implemented into a new Android application, are you able to see the code?

I obfuscated my code, my aar file generated is obfuscated but the code is visible anyway after import the library into a new app

The obfuscated classes are not accesible from any class, but If I try to search the file, I can find it and see all the code

Collapse
 
mohitrajput987 profile image
Mohit Rajput

User will be able to see obfuscated code. To hide code like Google, I have tried many frameworks but they didn't work perfectly. I am still doing research on it.

Collapse
 
balasaptanglabs profile image
bala-murugan

do you have completed the research ? can you suggest me some of the best obfuscation methods you found ? Thank you

Thread Thread
 
mohitrajput987 profile image
Mohit Rajput

I didn't check but found a source: github.com/alipov/android-sdk-hide...
You can check this and share feedback

Collapse
 
christyjacob4 profile image
Christy Jacob

First of all, thanks a lot for this series.
I have a use case where I need to create a kotlin library that can be used in both android and other kotlin server projects. Do you have any resources for that ?

Collapse
 
mohitrajput987 profile image
Mohit Rajput

Hey, you can follow the same procedure for that. In the Android Studio, you can click on "New Module" then "Java or Kotlin Library".
The publishing procedure will be same.

Just FYI, JCenter is not accepting new libs now so you can publish it somewhere else i.e. maven central.

Collapse
 
joaoclobocar profile image
joaoclobocar

Thanks,

This post helped me a lot.

Collapse
 
mohitrajput987 profile image
Mohit Rajput

Thanks Joaoclobocar. Keep reading.

Collapse
 
samtech23 profile image
Uncle Sam

Well explained.. this is getting clearer

Collapse
 
mohitrajput987 profile image
Mohit Rajput

Thank you so much. Keep reading my blogs and share your feedback.

Collapse
 
rajdeep_datta_c6496360390 profile image
Rajdeep Datta

I had one doubt, are you making a library in your android app project or creating a different project to create a library?

Collapse
 
mohitrajput987 profile image
Mohit Rajput

We can do both. Generally I make different project. In main app module, I make sample which demonstrates the use of SDK.