I have two games one is paid and other one is FREE. I have added many themes in my paid app.
I want to incorporate all the new things into my free game and sell things one by one, they both have different package name.
Is there any other way around like sharing user id between two apps rather than copy pasting code base of one to another?
I have developed both games in AndEngine.
You probably want to learn a bit about android Intents. They one way you could share data between the two apps. http://developer.android.com/training/sharing/send.html
If all you are passing is a simple bit of text it should be easy.
Another approach is using SharedPreferences, discussed in this Stack thread: The easiest way to pass data between application in Android Although the poster seems confident, I am not sure that another app can listen to the SharedPreferences of another app. And if you could it could constitute a serious security risk unless there is some way to assure that ONLY your apps can share that data.