is possible to upload a file on apache server using commons-fileuploader jar file in android .. if yes then please give any reference site if no then please guide me.
It is possible, yes.
If you're using Eclipse and the ADT plugin, you just have to do the following things:
copy the commons-fileupload-1.2.1.jar file to the root of your project.
Right click on your project icon to access its properties.
go to "Java Build Path"
click on the "Libraries" and then on "Add JARs"
choose the commons-fileupload file, and click OK.
You're then ready to go. ADT will automatically convert the classes in the jar file into the dex file format for use in dalvik, and embed them into your APK file.
If you need documentation on how to use the library just follow the user manual: http://commons.apache.org/fileupload/using.html
Related
We have an android application and are using some third party licenses. What is the best place to include these licenses in the app? In iOS we include it in the setting bundle, but I am not sure the best place to do so in android.
Thanks for you help
For my apps I generally place the license .txt file in the assets directory. Read the Github (I generally use library from github) page thoroughly about licencing. Notify the original creator about the use of his library. Then, if the product is of a client I will ask if to include the creator with link in the about section(if there is one). In my own apps I will include the link and author in the about section somewhere in my app.
Here is the step-by-step:
Download the library to your host development system.
Create a new folder, libs, in your Eclipse/Android project.
Right-click libs and choose Import -> General -> File System, then
Next, Browse in the filesystem to find the library's parent directory
(i.e.: where you downloaded it to).
Click OK, then click the directory name (not the checkbox) in the
left pane, then check the relevant JAR in the right pane. This puts
the library into your project (physically).
Right-click on your project, choose Build Path -> Configure Build
Path, then click the Libraries tab, then Add JARs..., navigate to
your new JAR in the libs directory and add it. (This, incidentally,
is the moment at which your new JAR is converted for use on Android.)
NOTE
Step 5 may not be needed, if the lib is already included in your build path. Just ensure that its existence first before adding it.
This is also explained at adding-a-library-jar-to-an-eclipse-android-project.
I need Simple xml parser for my project. I read throu it's site but i couldnt find how should i add it to my project to use it properly.
I programming in android using eclipse.
This is the site of Simple.
You have to do the following:
Download jar or zip of the Simple parser here
Copy it into the directory where the libraries of your project is located.
Let Eclipse knowing it by adding the library into the classpath
In order for the jar to be available at runtime, you need to:
Put the jar under your assets folder
Include this copy of the jar in your build path
Go to the export tab on the same popup window
Check the box against the newly added jar
last part is from here
I am trying to compile a java project which makes uses of android libraries. The project I am using is checked out from a svn repository.
In order to take a use of that project I am required to define some jar files and libraries for that project.
Here are the files that I need to make sure they are defined:
•"lib/apache-mime4j-0.4.jar" : Jar
•"lib/httpmime-4.0-beta1.jar" : Jar
•"lib/slf4j-android-1.5.8.jar" : Jar
•"JUnit 4.libraryclasspath" : Library
•"ANDROID_SDK_PLATFORM/android.jar" : var
•"Java JRE System Library" : Library
Does anyone have any idea about what should I do to define these files? I am a noob here.I do not know which selection should I choose When I clicked "project -> properties -> java build path -> libraries"
For example if I want to define the first jar file, there are a "add external jar" and a "add libraries" selections.
However you can see a "lib" here in front of the "apache-mime4j0.4.jar file" in this list above..
So I don't understand if it is asking me to add a jar file or the librabry.. I am getting very confused about this.
And also How can I do anything with "JUnit 4.libraryclasspath" file? I think it is a classpath file so I cannot either choose "add jar files" or "add libraries" to define it..
Hope someone has any knowledge about this and I will be very appreciated!
I think You are unable to include the files due to SVN path but will discuss it later.At first we look how to add jar files
Right click on your project in which you want to add the jars
1.select build path and then "configure build path"
2.click on "Libraries" tab
3.Now click on Add external jars (as your all jars files would be placed in some directory outside the project folder or anywhere else)
4.Select these jars and now do OK ... Now these jars are in your class path and you can use these files.
Now another thing, As You told that you are using svn , It means many of other developers are also using the same project then it is compulsory that all of you have same path of jars in your systems for instance in Dev1 PC the jar if the jar file is placed in d:/lib/jars folder then all other DEV2 , DEV3 ... DEVn must have d:/lib/jars folder and their jars must be placed there and you have to add these jars from d:/libs/jars
Last thing , If you are still unable to understand the solution and remove the bugs then simply do this.
Copy all jar files manually (ctrl+c) and copy to lib folder in your project as i have seen that in your project the person who commits the code place them there.
after then , right click on your project and click refresh(as it is bad practice to put jar files in project by creating folder like lib etc unless it is a web project)
Let me know if anything is unclear about this
I finished an app like a month ago which uses the JSoup jar in it. commonsWares pointed out to me that I need to remove the jar file from the build path and create a libs folder for proper usage.
I removed it from the build path and created a folder called libs and placed the jar file in there. Is this correct?
The android project is returning error because it can't see the JSoup library. So how do I do this to ensure its all visible and working well?
A screenshot of what I have done is below:
It sounds like you may not be on the latest ADT.
The latest ADT should just pick up any jar in your library.
Every time you move a jar file's location you need to update the build path. In Eclipse, you should right click on the project, select Build Path then Configure Build Path. Then just select the Libraries tab, and then Add Jar. Find your jar file and select it and you should be good to go.
I am trying to send the files from an Android project so that a friend of mine can open a new Android project in eclipse and mess around with code/run the project from their home machine. However, I have run into some problems dealing with missing manifest files, and non-matching signatures.
What is the simplest procedure for bundling up an Android project (not an .apk) to send to someone for their use in eclipse?
The easiest way would be to create a Archive File export. It bundles the projects in your workspace into an exported .zip file. This .zip file can then be import by the other person into eclipse through the Existing Project importer.
To export:
File > Export > Archive File
To import:
File > Import > Existing Projects
into Workspace
Select the exported .zip file as
the Selected archive file
Put it on a source control server, like SVN. If you don't have one, you can use something like Google Code ( http://code.google.com ). Eclipse has built-in source control features to update and commit things to source control.