0

does it mean

multiple android apps sharing the same code at runtime

or

other way around?

i am thinking that it is the concept though which multiple apps sharing the common code before building process but after building process all app binary(i.e .apk) files have their own copy of the same shared library code.

am i thinking right?

if i am right what are the possibilities to achieve this(i.e to share a library between two or more apps at run time)?

Sandeep Sharma
  • 1,855
  • 3
  • 19
  • 34

2 Answers2

0

i am thinking that it is the concept though which multiple apps sharing the common code before building process but after building process all app binary(i.e .apk) files have their own copy of the same shared library code.

You are correct in this statement, depending on which IDE you're using, you can import projects, mark them as libraries, reference them as a library in your consuming project, and then use them independently.

A common example would be the android-support-v7-appcompat, many apps depend on this project, so many will reference them independently. At compile time, whatever technology you're using, generally ANT or Gradle will compile independently as well.

Example for Android Studio and Eclipse (ADT)

Community
  • 1
  • 1
em_
  • 2,134
  • 2
  • 24
  • 39
0

Yes, you can do with gradle in productFlavors option.

Suppose, you want to create two application like paid and free but both application code are same except some of feature so you can put common code in one library.

More details : Go to productFlavors in this link https://developer.android.com/tools/building/configuring-gradle.html

  • i am not sure if i am thinking right?(referenced to my question).can you tell me on that.Actually i want to understand how to share a common library between 2 different apps at runtime. – Sandeep Sharma Sep 14 '15 at 07:52