GithubHelp home page GithubHelp logo

taojin1207 / polympic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from knifer/polympic

0.0 1.0 0.0 7.42 MB

Android Brower And PDF Viewer.

License: Other

JavaScript 3.30% Java 90.23% Makefile 0.01% C 5.23% C++ 1.13% Shell 0.01% HTML 0.09%

polympic's Introduction

Here presents PolymiumPic, the currently fully opensourced part of PolymPic.

Just like chrome, it will become a fantastic web browser + a PDF viewer.

The Web Browser

  • WIP 75%
  • Multi-window interface that supports retoring of browser states ( the page positions and the back/forward stacks ).
  • WIP 55% Annotation functionality. (still testing)
  • Optional CrossWalk or TBS-X5 webview implemetation.

The PDF Viewer

  • WIP 90% Based on PDFium.
  • Basic highlight annotatin support.
  • Smooth scrolling and flinging available even for android 4.4.
  • Make use of Colordict and Google Translate for easy reading.

The PDF viewer supports content URI and will request permisison at runtime. You can still use it if you deny it's permission requests, entering read-only mode.

Download

The first Alpha version has been released. Check that and all feedbacks are welcomed.

How to Build:

This is a 'complex' project which consists of multiple gradle sub-modules. You need to download them manually from the following separate repos:

  1. https://github.com/KnIfER/AppPreference
  2. https://github.com/KnIfER/AweDesigner
  3. https://github.com/KnIfER/AwtRecyclerView
  4. https://github.com/KnIfER/AxtAppCompat
  5. https://github.com/KnIfER/GlideModule
  6. https://github.com/KnIfER/XWalkModule
  7. ( Some may be missing. )

For some reason I've modified those 3rd party libaries but don't want to include them in my repo.

If you don't want to download them, then go and grab the current archives exported directly from the Android Studio.


Some other dependencies:

Jar File Use Included in the repo
ActivityLauncher\libs\core-3.3.3.jar Zxing qrcode Yes
XWalkModule\libs\crosswalk-shared-23.53.589.4.aar CrossWalk's R.txt XWalkModule
multiline\libs\closure-compiler-v20200628.jar To compile js scripts No. It's in the archive

How to invoke PolymPic (the App) and view PDFs at a specific page in your own project:

  1. Essential
	Intent it = new Intent(Intent.ACTION_VIEW)
		.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
		.putExtra("page", yourPage)
		.setDataAndType(yourUri, "application/pdf");
	startActivity(it);
  1. Verbose
	Intent it = new Intent(Intent.ACTION_VIEW);
	it.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
	File f = new File("/sdcard/download/....");
	if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
		StrictMode.setVmPolicy(new VmPolicy.Builder().build());
	}
	int pageId=8;
	it.putExtra("page", pageId);
	it.setDataAndType(Uri.fromFile(f), "application/pdf");
	startActivity(it);

polympic's People

Contributors

knifer avatar knilight avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.