All Projects → centic9 → Poi On Android

centic9 / Poi On Android

Licence: apache-2.0
A sample project that shows how Apache POI can be used in an Android application

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Poi On Android

CarouselGifViewer
Efficiently display a list of GIFs in a carousel (RecyclerView).
Stars: ✭ 33 (-83.98%)
Mutual labels:  android-application, sample-app
Play Scala Websocket Example
Example Play Scala application showing WebSocket use with Akka actors
Stars: ✭ 194 (-5.83%)
Mutual labels:  sample-app
Otpview
A custom view to enter otp/pin of different sizes used usually in cases of authentication.
Stars: ✭ 172 (-16.5%)
Mutual labels:  android-application
Baldphone
A new accessible interface for your smartphone, suitable for seniors
Stars: ✭ 181 (-12.14%)
Mutual labels:  android-application
Inspeckage
Android Package Inspector - dynamic analysis with api hooks, start unexported activities and more. (Xposed Module)
Stars: ✭ 2,249 (+991.75%)
Mutual labels:  android-application
Cartoon
漫画软件——使用MVP + Retrofit + RxJava开发
Stars: ✭ 186 (-9.71%)
Mutual labels:  android-application
Munch
[Deprecated] A minimalistic Rss Reader for Android devices
Stars: ✭ 171 (-16.99%)
Mutual labels:  android-application
Designoverlay Android
Android app which displays design image with grid lines to facilitate the tedious design implementation process
Stars: ✭ 202 (-1.94%)
Mutual labels:  android-application
Jimu
一种简单有效的android组件化方案,支持组件的代码资源隔离、单独调试、集成调试、组件交互、UI跳转、生命周期等完整功能。
Stars: ✭ 2,355 (+1043.2%)
Mutual labels:  android-application
Piclice
Android application to slice and share your pictures
Stars: ✭ 180 (-12.62%)
Mutual labels:  android-application
Dpitunnel
DPITunnel is an android app made for censorship bypass
Stars: ✭ 179 (-13.11%)
Mutual labels:  android-application
Pdf Viewer
A Lightweight PDF Viewer Android library which only occupies around 125kb while most of the Pdf viewer occupies up to 16MB space.
Stars: ✭ 175 (-15.05%)
Mutual labels:  android-application
Androrat
A Simple android remote administration tool using sockets. It uses java on the client side and python on the server side
Stars: ✭ 187 (-9.22%)
Mutual labels:  android-application
Droid Feed
Aggregated Android news, articles, podcasts and conferences about Android Development
Stars: ✭ 174 (-15.53%)
Mutual labels:  android-application
Iconshowcase Dashboard
A full-of-features, easy-to-customize, free and open source, Material Design dashboard for icon packs.
Stars: ✭ 197 (-4.37%)
Mutual labels:  android-application
Yalpstore
Download apks from Google Play Store
Stars: ✭ 2,088 (+913.59%)
Mutual labels:  android-application
Android Permission Checker App
Android App to check requested permission details of all installed applications
Stars: ✭ 178 (-13.59%)
Mutual labels:  android-application
Android Spotify Mvp
Android Sample to explain Model View Presenter in android applications.
Stars: ✭ 184 (-10.68%)
Mutual labels:  android-application
Android Mvp Architecture
🏛 A basic sample android application to understand MVP in a very simple way. Just clone, build, run and understand MVP.
Stars: ✭ 203 (-1.46%)
Mutual labels:  android-application
Moviehunt
Movie Android App written in Kotlin, MVVM, RxJava, Android Architecture Components.
Stars: ✭ 199 (-3.4%)
Mutual labels:  android-application

Build Status Gradle Status

This is a sample Android application to show how Apache POI can be used on Android.

It consists of two projects:

  • poishadow: A small helper project to produce a shaded jar-file for Apache POI which includes all necessary dependencies and fixes a few things that usually hinder you deploying Apache POI on Android
  • poitest: A very small sample Android application which performs some actions on an XLSX-file using Apache POI. See DocumentListActivity for the actual code

Getting started

Necessary System-Properties

In order to work around problems with finding a suitable XML Parser, currently the following system properties need to be set manually during startup of your application (let me know if you know of a better way to do this, see issue #10)

System.setProperty("org.apache.poi.javax.xml.stream.XMLInputFactory", "com.fasterxml.aalto.stax.InputFactoryImpl");
System.setProperty("org.apache.poi.javax.xml.stream.XMLOutputFactory", "com.fasterxml.aalto.stax.OutputFactoryImpl");
System.setProperty("org.apache.poi.javax.xml.stream.XMLEventFactory", "com.fasterxml.aalto.stax.EventFactoryImpl");
Supported Android versions

The sample project uses API level 15, which maps to Android 4.0.3. Theoretically lower versions should work as well, but we do not test these to avoid this additional effort.

Dependencies

Note: The dependencies of Apache POI are not included in the shading to keep it's size at bay. If you use code areas which require commons-codec, commons-collections4 or any of the other dependencies, you will need to define them in your Android application in addition to the poishadow-all.jar file dependency.

Use a pre-built jar

If you want to get started quickly, there is a ready-made jar-file available in the release section.

You should be able to simply add this to your Android project and use the Apache POI classes from it.

Build the jar yourself

If you would like to change how the jar-file is built, e.g. if you need classes that are excluded, use a different version of POI or would like to adjust the build in some other way, you can build the shaded jar with the following steps:

Preparation:

You will need the following pieces in order to get started

Get the code:

git clone git://github.com/centic9/poi-on-android
cd poi-on-android

Configure where your Android SDK resides:

echo "sdk.dir=/opt/android-sdk-linux" > local.properties

Configure the version of the Android Build Tools that you have installed.

vi poitest/build.gradle

Then build the shadow-jar, for some reason this works better if executed separately:

./gradlew shadowJar

Finally run the build and some testing. Make sure you have a device connected, e.g. the Android emulator.

./gradlew build connectedCheck

For only the jar-files run just build

Support this project

If you find this tool useful and would like to support it, you can Sponsor the author

Run the Android emulator

List available emulators

<android-sdk>/tools/emulator -list-avds

Start an Android emulator

<android-sdk>/tools/emulator -avd <name>

Install the apk

<android-sdk>/platform-tools/adb install ./poitest/build/outputs/apk/poitest-debug.apk

Notes

  • You can use the resulting jar-file poishadow/build/libs/poishadow-all.jar in your own project, the code in directory poitest is just a small sample Android application to show that it works.
  • This was only tested in Android Studio with the Android emulator until now, should work on real Android as well, though!
  • Tested with targetSdkVersion 25 and minSdkVersion 15, although other versions should work as long as they support multiDexEnabled true

Todo

  • Add more actual functionality to the sample application, currently it just creates a new spreadsheet, adds some data then stores it in the Application storage area and reads it again from there.

Links

Licensing

Copyright 2015-2018 Dominik Stadler

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].