jblough / Android-Pdf-Viewer-Library

DEPRECATED - Pdf Viewer library for Android
657 stars 329 forks source link

Instantiation Error #7

Open hardik-trivedi opened 12 years ago

hardik-trivedi commented 12 years ago

Hi,

The works look good. and its ray of hope for me. I tried to integrate your stuff in my project. But I got Activity Instantiation Error.

Steps I followed :

Add jar files to my build path. Copy Drawables and layout. Copy your pdfviewer activity. Add lines in manifest. Pass Intent.

I dont know where I am doing mistake.

Can you please guide me. I am stuck up at one of my project.

BarisCirika commented 12 years ago

Only add jar in libs file (if it is not here create file with name "libs"). It will automatically adds build path,so remove buildpath addition. create class like that

public class PdfActivity extends PdfViewerActivity {

  //add override methods. which gets images id etc.
}

create another class (Runner class).

public class MainActivity extends Activity{

@Override
public void onCreate(Bundle savedInstanceState) {
//you can call another activity everywhere.
    Intent intent = new Intent(this,PdfActivity.class);
    intent.putExtra(PdfViewerActivity.EXTRA_PDFFILENAME, "pdfPath");
    startActivity(intent);
 }
}
foolhorse commented 11 years ago

pdfviewer activity is an abstract class , this Instantiation Error caused by start an abstract class