Knowledge Base - AndroidStudio first app

How to Build your own APP with AndroidStudio

First click “New Project” on AndroidStudio Menu:

 

Type some fields:

Select platform:

 

Select APP style:

 

 

Then, import Module, click on Menu:

 

Select ViewLib Module in Demo project, here Demo Project placed in “E:\PDFReader\PDFSample”

Module Path is “E:\PDFReader\PDFSample\ViewLib

 

After imported, project struct shall like this:

2 modules:

-- app

-- ViewLib

 

 

This time, you shall set ViewLib as dependency to app. Right click app module, and and open setting:

 

Click right side like this:

 

 

And choice dependency Module:

  

 

 

Now, you can use PDF library. But library not actived, so we need activate Library first.

Open AndroidMainfest.xml, add this permission:

 

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

You shall see package name:

 

The package name used to apply license.

If you has a license, create a new Activity like this (com.radaee.reader.PDFViewAct): 

 

<activity android:name="com.radaee.reader.PDFViewAct"/>

 

Note: If you want to support form fields editing, you need to add PopupEditAct to the manifest:

<activity
android:name="com.radaee.util.PopupEditAct"
android:theme="@android:style/Theme.Translucent"
android:configChanges="orientation|keyboardHidden|screenSize">
</activity>

And then goto Module ViewLib, open com.radaee.pdf.Global class, and modify active codes:

 

After active codes finished, you can place test.pdf to /sdcard, and test it using codes in MainActivity:

 

Global.Init(this);
Intent intent =
new Intent();
intent.setClass(
this, PDFViewAct.class);
intent.putExtra(
"PDFPath", "/sdcard/test.pdf");
startActivity(intent);

 

Now we can run APP, but something still to be done, if your APP not run on mips and x86 CPU,

You can delete native libraries that some CPU never running, do like: 

Applies To

RadaeePDF SDK for Android

Details

Created : 2015-11-10 10:22:06, Last Modified : 2018-01-25 08:34:29

Order history

Login to handle your order history.