Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PDF Viewer - From library to App

PDF Viewer - From library to App

An overview of the tools and techniques used at PSPDFKit for the development of PDF Viewer for Android.

Android Heads Vienna @ PSPDFKit HQ Vienna
https://www.meetup.com/de-DE/AndroidHeads/events/238013077/

Related blog posts:

Writing Concise Code with Kotlin and RxJava:
https://pspdfkit.com/blog/2017/writing-concise-code-with-kotlin-and-rxjava/

A clean status bar with Android System UI and QuickDemo:
https://pspdfkit.com/blog/2016/clean-statusbar-with-systemui-and-quickdemo/

David Schreiber-Ranner

May 04, 2017
Tweet

More Decks by David Schreiber-Ranner

Other Decks in Programming

Transcript

  1. PSPDFKit framework • PDF model layer
 Fully Android/Java conform •

    UI toolkit
 Viewing, editing, building • Cross platform
 Android, iOS, Web (+ Desktop, Server)
  2. Google Play EAP Public Beta September 2016 Great but crappy

    PDF Viewer 1.0 First public release February 2017 Prime time PDF Viewer 1.1 SD card access April 2017 This rocks! PDF Viewer 1.2 Forms April 2017 Bäm! History
  3. Java private static void printTopContributor(GitHubApi gitHubApi, final String repoName) {

    gitHubApi.getRepository(repoName) .flatMap(new Function<Repository, SingleSource<? extends List<Contributor>>>() { @Override public SingleSource<? extends List<Contributor>> apply(Repository repository) throws Exception { return repository.getContributors(); } }) .flatMapObservable(new Function<List<Contributor>, ObservableSource<? extends Contributor>>() { @Override public ObservableSource<? extends Contributor> apply(List<Contributor> contributors) throws Exception { return Observable.fromIterable(contributors); } }) .sorted(new Comparator<Contributor>() { @Override public int compare(Contributor o1, Contributor o2) { return o2.getNumberOfCommits() - o1.getNumberOfCommits(); } }) .firstOrError() .subscribe(new Consumer<Contributor>() { @Override public void accept(Contributor contributor) throws Exception { print(contributor.getLoginName()); } }, new Consumer<Throwable>() { @Override public void accept(Throwable throwable) throws Exception { logError(throwable, "Error while trying to find top contributor."); } }); }
  4. Kotlin private fun printTopContributor(gitHubApi: GitHubApi, repoName: String) { gitHubApi.getRepository(repoName) .getContributors()

    .sortByNumberOfCommits() .firstOrError() .subscribe( { contributor -> print(contributor.loginName) }, { throwable -> logError(throwable, "Error while trying to find top contributor.") } ) } https://pspdfkit.com/blog/2017/writing-concise-code-with-kotlin-and-rxjava/ Blog post:
  5. Using Kotlin • Reduce errors
 Type-safe and strict • Speed

    up development
 Expressiveness ^ 2 • Have fun!
 Learning and using a modern language is great!
  6. Libraries • Support Libraries
 Android like it was intended •

    RxJava 2
 Async with style • Kodein
 Painless Dependency Injection • PSPDFKit
 We can’t get enough of our framework
  7. Server + CI / workers Localhost Terminal $> git push

    -u origin release/1.0.2-beta-1 Check release let’s go!
  8. • PSPDFKit aar
 The latest public version • Proguard mapping


    For retracing Java crashes • Native symbols
 Symbolicate native/C++ crashes PSPDFKit
  9. How we do it • Instrumentation tests / Espresso
 Reuse

    our existing automatization • Android Demo mode
 Clean system UI for everyone • Emulator
 One device for everyone (phone, 7”, 10”) • Dependency Injection
 Create the perfect showcase blog.pspdfkit.com
  10. Users will love you • Reviews
 Respond to Every. Single.

    One. • Google Play Beta Feedback
 These are the real heroes • Intercom
 Chat with your users in real-time • Email
 They just keep creeping in