How to Integrate ringdroid fork into my Android app - android

here is the repo https://github.com/mitch000001/ringdroid
so run git clone https://github.com/mitch000001/ringdroid to copy on your local.
My question im having a slight issue getting this to work in my Android app. The end goal is to have my host app use ringdroid as a library project so i can make calls to it as if it were apart of my host app. My host app would be thus dependent on ringdroid project.
What i have done is imported ringdroid as its own project into eclipse. then i set this project to be a library (have to change one switch statement to if statement, no big deal). then on my host android project's properties i add ringdroid as a library. I want to be able to start ringdroid on the press of a button from within my host app.
In my host app activity manifest file i define the ringdroid activity i want to call:
<activity android:name="com.Ringdroid.RingdroidSelectActivity"
android:label="#string/main_activity_label">
</activity>
then in my host project i have a button that i want to click that would start this activity but i keep getting a null pointer exception in onCreate of RingdroidSelectActivity. Can one of you run it and see what im doing wrong ?? keep in mind i have not altered the manifest file of the .RingdroidSelectActivity project except for removing the launcher category.

I figured this out.... In android you can add another project as a dependency of your own. What you have to do is define the depenedent activity your calling in the host apps manifest. I also had to put the permissions there as well.
It seems in ADT 20 the manifest are merged. I am using an older eclipse and ADT version so i had to merge the manifest myself.

Related

Can an application module also be used as a library module?

I have a simple calculator app. It's a complete application all by itself.
I also have a more advanced calculator app that's based on the first app, but has more features. Its main Activity extends the first app's main Activity. The advanced app references quite a lot of resources and methods from the simpler app.
Getting the advanced app to build under Android Studio has been a nightmare. I've been googling and trying things blindly in the build.gradle files, but not making much progress. At first, the problem was dependent features configured but no package id was set (whatever that means, Google turned up no documentation.)
I got past that by tweaking the build.gradle files, and now I'm getting Manifest merger failed with multiple errors, see logs, but I can't find the relevant logs. It looks like the build failed because Android Studio tried to merge the AndroidManifest.xml files from the simple app and the advanced app, but I just wanted to use the manifest from the advanced app.
This is all very frustrating because I made it all work under Eclipse but now I have to move to Android Studio.
I guess my first question is: How can I tell Android Studio to just use the Android Manifest from the current project and not try to merge from the other project.
In general: can an application project serve as a library for another project, and if so how? Are there any examples?
Third question: where can I find good documentation on build.gradle?
I could attach my current build.gradle files and AndroidManifest.xml files if people need to see them, but I'm really hoping to learn enough that I can help myself.
Confirm the problem first:
Switch the same model in Library / application
Application ID androidmanifest conflict problem
if this is the problem, the official documents can see the channel packaging
https://developer.android.google.cn/studio/build
And I wrote you a little demo
https://github.com/yuanweiwork/lytools
I hope it can help you

How to make a phonegap project as library in android?

I have already created an phonegap android project and it is working fine, now i would like to create same kind of project againg. Might it would be more than 5 apps, so i thought making it as library.
I have make the project as library and created a new project with different package name. Change the launcher activities name to the libraries launcher activity name. But now the issue is application error is happening, cannot load the index.html file.
So i think the way worked on is not the proper one, can anyone please help me to solve this problem.
you have to assign your initial android project as a library. right click the project, pick properties, then go to android, tick the "is library" box and apply
For your new projects, you need to "add" the project before as your library as the image above

Combining several android applications together

I am working on an android group project in college and this is the first big project many of us have worked on.
We worked on implementing several pieces of the project as completely separate projects and now are having trouble putting all of them in one application with a main page.
On the main page of the application we would have a bunch of buttons that would then go to the implemented project that we've completed (example, I click on BMI calculator on the app homepage and it goes the the bmi calculator screen).
Any efficient way of going about this that can be explained in an easy to follow manner? I'm still a newbie programmer :)
Just to clarify, I don't want it so that it just launches a BMI calculator app from the main app, the entire code base is supposed to exist under one app.
Thanks
You can have a main project and several other projects declared as library projects.
In build time, library projects are pulled into the main project and only one apk will exist as the output.
The library projects are almost the same as an usual android project. You can have java packages, res folder, lib folder, etc.
Check here for the official description.
Check here for a tutorial.
Look into making the other applications as Android Library-projects, and listing all necessary components on your AndroidManifest.xml on your parent project.
Another way would just give the option for the user to install these applications as separate and have a logice (PackageManager) check if specific application exists or is installed and then enabling navigation buttons or disabling components and invoke them via Intents.

Issues when using a library project in android

I have developed a Project. it is working fine. so i want to use this project as a library for some other project. so i have created this project as a library. Later i have created new Application and added this library project to my new Application Project. then i run the app .
suddenly the previous screen in the activity stack is finishing automatically. i am not getting why this is Happening. Any one have the idea about this issue , Please suggest me
Even though it is added as a library project.
You still need to add the activities that you are calling/using(from the library project) in your new projects AndroidManifest.xml
Though I must say, you should consider showing your logcat and calling code.
Have you set reference to your project?
Rightclick on your project-properties-android-islibrary mark it and add
android:noHistory="true".
beacause of this attribute. stack history was removed. by removing this attribute it working fine

Facebook SDK not included with Android App in Eclipse?

I'm trying to add the facebook SDK to my project but it won't work at all.
I've followed the official steps; opened the fb sdk, made sure it's set to "is library", in m yown project go to properties->android->add library and it lets me select com_facebook_android and it shows up with a green tick next to it. HOWEVER, when i go back to that screen straight away it now has a red cross next to it, and if i try to launch the app in the emulator it has " com_facebook_android] Could not find com_facebook_android.apk!"
(This is just me testing without referencing the library in my app)
if i DO reference the library, then any calls to the facebook library give an error within eclipse and the tooltip suggests to add it to build path, so if i click that it launches fine, but still does the above apk error and the app force closes on any activity which references facebook.
As far as I can tell I'm following the official instructions fine but it just keeps coming back to that red cross in my app's properties
Does anyone know what this could be?
Not sure why you have the issue, i've setup a empty project with facebook library in it, if you have no luck then try downloading that, unzipping it and importing exsiting project into workspace.
link : Download here
you know what i have done one trick to use the official facebook SDK in my application, i have created com.facebook.android and add all the library classes into it. Then i can easily reach to access any class whenever i want it. This can be a way to use the classes inside your application instead of using Library.
Its running fine in my case.

Categories

Resources