Update android documentation
This commit is contained in:
parent
73382d85ca
commit
4fb588d7a6
7
pom.xml
7
pom.xml
|
@ -1646,7 +1646,6 @@
|
|||
<artifactId>maven-scm-api</artifactId>
|
||||
<version>1.9.5</version>
|
||||
</dependency>
|
||||
<!-- <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-core</artifactId> <version>1.7</version> </dependency> -->
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.doxia</groupId>
|
||||
<artifactId>doxia-module-markdown</artifactId>
|
||||
|
@ -1686,17 +1685,11 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- <plugin> <groupId>com.github.github</groupId> <artifactId>site-maven-plugin</artifactId> <version>0.12</version> <configuration> <message>Building site for ${project.version}</message> <server>github</server>
|
||||
</configuration> <executions> <execution> <goals> <goal>site</goal> </goals> <phase>site-deploy</phase> </execution> </executions> </plugin> -->
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <reportSets> <reportSet> <reports><report>checkstyle-aggregate</report></reports> </reportSet>
|
||||
</reportSets> <configuration> <configLocation>config/sun_checks.xml</configLocation> <includes> hapi-fhir-base/src/main/java/**/*.java </includes> </configuration> </plugin> -->
|
||||
<!-- <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.7.7.201606060606</version> <reportSets> <reportSet> <reports> <report>report</report> </reports> <configuration>
|
||||
<dataFileIncludes>${baseDir}/hapi-fhir-base/target/jacoco.exec</dataFileIncludes> </configuration> </reportSet> </reportSets> </plugin> -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-changes-plugin</artifactId>
|
||||
|
|
|
@ -7,6 +7,17 @@
|
|||
</properties>
|
||||
<body>
|
||||
<release version="3.1.0" date="TBD">
|
||||
<action type="fix">
|
||||
The Android client module has been restored to working order, and no longer
|
||||
requires a special classifier or an XML parser to be present in order to
|
||||
work. This means that the hapi-fhir-android library is much less likely
|
||||
to cause conflicts with other libraries imported into an Android application
|
||||
via Gradle.
|
||||
<![CDATA[<br/><br/>]]>
|
||||
See the
|
||||
<![CDATA[<a href="http://hapifhir.io/doc_android.html">HAPI FHIR Android Documentation</a>]]>
|
||||
for more information.
|
||||
</action>
|
||||
<action type="add">
|
||||
A performance to the JPA server has been made which reduces the number
|
||||
of writes to index tables when updating a resource with contents that
|
||||
|
@ -102,7 +113,7 @@
|
|||
classes (which are Java Enums for the various FHIR codesystems).
|
||||
These were accidentally removed in HAPI FHIR 3.0.0. Thanks to
|
||||
GitHub user @CarthageKing for reporting!
|
||||
</action>
|
||||
</action>
|
||||
</release>
|
||||
<release version="3.0.0" date="2017-09-27">
|
||||
<action type="add">
|
||||
|
|
|
@ -1,93 +1,117 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
|
||||
|
||||
<properties>
|
||||
<title>Android Support</title>
|
||||
<author email="jamesagnew@users.sourceforge.net">James Agnew</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Android Client Development">
|
||||
|
||||
<p>
|
||||
HAPI now has a specially built binary (JAR) which can be used on Android. Android developers
|
||||
may use this JAR to take advantage of the FHIR model classes, and the FHIR client (running a FHIR server
|
||||
on Android is not yet supported. Help wanted!)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Android JAR ships as a "shade JAR", meaning it is a single JAR containing all of the
|
||||
dependencies required in order to use HAPI FHIR. You should not need to include any other
|
||||
libraries.
|
||||
</p>
|
||||
<p>
|
||||
Note that the Android JAR is still new and hasn't received as much testing as other
|
||||
parts of the library. We would greatly appreciate feedback, testing, etc. Also note that
|
||||
because mobile apps run on less powerful hardware compared to desktop and server applications,
|
||||
it is all the more important to keep a single instance of the <code>FhirContext</code>
|
||||
around for good performance, since this object is expensive to create. We are hoping to
|
||||
improve performance of the creation of this object in a future release. If you are an
|
||||
Android developer and would like to help with this, please get in touch!
|
||||
</p>
|
||||
|
||||
<subsection name="Get the Android JAR">
|
||||
|
||||
<p>
|
||||
To add the HAPI library via Gradle, use the following
|
||||
dependency. Note the following things:
|
||||
</p>
|
||||
<ul>
|
||||
<li>The classifier should be set to the version of FHIR you want to support.</li>
|
||||
<li>
|
||||
You need to excluded a few things in order to get this to work. This is
|
||||
a quirk because the way HAPI is built and will hopefully be resolved in a future
|
||||
release.
|
||||
</li>
|
||||
</ul>
|
||||
<source><![CDATA[dependencies {
|
||||
compile "ca.uhn.hapi.fhir:hapi-fhir-android:2.2:dstu2@jar"
|
||||
}]]></source>
|
||||
|
||||
<p>
|
||||
You may also download a copy from the GitHub
|
||||
<a href="https://github.com/jamesagnew/hapi-fhir/releases">Releases</a> page.
|
||||
</p>
|
||||
</subsection>
|
||||
</section>
|
||||
|
||||
<section name="Performance">
|
||||
<p>
|
||||
On mobile devices, performance problems are particularly noticeable. This
|
||||
is made worse by the fact that some Android devices have much slower performance
|
||||
than modern desktop computers. See the
|
||||
<a href="./doc_rest_client_http_config.html#performance">Client Configuration Performance</a>
|
||||
page for some tips on how to improve client performance.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section name="Examples">
|
||||
|
||||
<p>
|
||||
The following is intended to be a selection of publicly available open source
|
||||
Android applications which use HAPI FHIR and might be useful as a reference.
|
||||
</p>
|
||||
<p>
|
||||
If you know of others, please let us know!
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://github.com/hapifhir/hapi-fhir-android-integration-test">https://github.com/hapifhir/hapi-fhir-android-integration-test</a>
|
||||
- hapi-fhir-android Integration Test and Reference Application is our test platform for validating new releases. Created by Thomas Andersen.
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/SynappzMA/FHIR-Android">https://github.com/SynappzMA/FHIR-Android</a>
|
||||
- Nice FHIR DSTU2 search app
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
|
||||
</document>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
|
||||
|
||||
<properties>
|
||||
<title>Android Support</title>
|
||||
<author email="jamesagnew@users.sourceforge.net">James Agnew</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Android Client Development">
|
||||
|
||||
<p>
|
||||
HAPI now has a specially built module for use on Android. Android developers
|
||||
may use this JAR to take advantage of the FHIR model classes, and the FHIR client (running a FHIR server
|
||||
on Android is not yet supported. Get in touch if this is something you are interested in working on!)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
As of HAPI FHIR 3.1.0, the <code>hapi-fhir-android</code> module has been streamlined in order
|
||||
to reduce its footprint. Previous versions of the library included both an XML and a JSON parser
|
||||
but this has been streamlined to only include JSON support in order to reduce the number of
|
||||
libraries required in an Android build.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When using the HAPI FHIR Android client, the client will request only JSON responses
|
||||
(via the HTTP <code>Accept</code> header) and will not be able to communicate
|
||||
with FHIR servers that support only XML encoding (few, if any, servers actually exist
|
||||
with this limitation that we are aware of).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Android client also uses the <code>hapi-fhir-client-okhttp</code> module,
|
||||
which is an HTTP client based on the OkHttp library. This library has proven to be
|
||||
more powerful and less likely to cause issues on Android than the Apache HttpClient
|
||||
implementation which is bundled by default.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Note that the Android JAR is still new and hasn't received as much testing as other
|
||||
parts of the library. We would greatly appreciate feedback, testing, etc. Also note that
|
||||
because mobile apps run on less powerful hardware compared to desktop and server applications,
|
||||
it is all the more important to keep a single instance of the <code>FhirContext</code>
|
||||
around for good performance, since this object is expensive to create. We are hoping to
|
||||
improve performance of the creation of this object in a future release. If you are an
|
||||
Android developer and would like to help with this, please get in touch!
|
||||
</p>
|
||||
|
||||
<subsection name="Get the Android JAR">
|
||||
|
||||
<p>
|
||||
To add the HAPI library via Gradle, you should add the
|
||||
<a href="http://search.maven.org/#search%7Cga%7C1%7Chapi-fhir-android">hapi-fhir-android</a>
|
||||
library to your Gradle file, as well as a structures library for the appropriate
|
||||
version of FHIR that you want to support, e.g.
|
||||
<a href="http://search.maven.org/#search%7Cga%7C1%7Chapi-fhir-structures">hapi-fhir-structures-dstu3</a>.
|
||||
</p>
|
||||
<source><![CDATA[dependencies {
|
||||
compile "ca.uhn.hapi.fhir:hapi-fhir-android:3.1.0-SNAPSHOT"
|
||||
compile "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:3.1.0-SNAPSHOT"
|
||||
}]]></source>
|
||||
|
||||
<p>
|
||||
Uou will also need to manually exclude the Woodstox StAX library from
|
||||
inclusion, as this library uses namespaces which are prohibited on Android. You should also
|
||||
exclude
|
||||
</p>
|
||||
<source><![CDATA[configurations {
|
||||
all*.exclude group: 'org.codehaus.woodstox'
|
||||
all*.exclude group: 'org.apache.httpcomponents'
|
||||
}</source>
|
||||
|
||||
<p>
|
||||
To see a sample Gradle file for a working Android project
|
||||
using HAPI FHIR, see the
|
||||
<a href="https://github.com/hapifhir/hapi-fhir-android-integration-test">Android Integration Test</a>
|
||||
project.
|
||||
</p>
|
||||
</subsection>
|
||||
</section>
|
||||
|
||||
<section name="Performance">
|
||||
<p>
|
||||
On mobile devices, performance problems are particularly noticeable. This
|
||||
is made worse by the fact that some economy Android devices have much slower performance
|
||||
than modern desktop computers. See the
|
||||
<a href="./doc_rest_client_http_config.html#performance">Client Configuration Performance</a>
|
||||
page for some tips on how to improve client performance.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section name="Examples">
|
||||
|
||||
<p>
|
||||
The following is intended to be a selection of publicly available open source
|
||||
Android applications which use HAPI FHIR and might be useful as a reference.
|
||||
</p>
|
||||
<p>
|
||||
If you know of others, please let us know!
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://github.com/hapifhir/hapi-fhir-android-integration-test">https://github.com/hapifhir/hapi-fhir-android-integration-test</a>
|
||||
- hapi-fhir-android Integration Test and Reference Application is our test platform for validating new releases. Created by Thomas Andersen.
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/SynappzMA/FHIR-Android">https://github.com/SynappzMA/FHIR-Android</a>
|
||||
- Nice FHIR DSTU2 search app
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
|
||||
</document>
|
||||
|
|
Loading…
Reference in New Issue