Android integrating apk with an application

I am new to android. I am making an application for reading the pdf files. For this i want to integrate some existing open source apk with my application. Please suggest and give me example, how i can bind the apk with my application and how to call the apk from within the application activity. I think there should be something used by intent but not sure. Also if there can be any code to develop our own pdf reader, please share. Thanks.

Answers


As i know, integrating an apk directly from another application is not possible. This can not be achieved unless you know the source code of the apk. If this is the case. Now its like this if you want to invoke Application2 from Application1 then you have to add one more intent filter in the Application2, you have to define an action in Application2 Manifest like

<action android:name="com.app2.intent.action.INVOKE_APP2"/>   

and then define intent in your Application1 as

Intent i=new Intent("com.app2.intent.action.INVOKE_APP2");  
startActivity(i);

It only possible if you know exactly what kind of intent (Action, data, type) the activities in that apk would be able to react.

You can use either startActivity(intent) or startActivityForResult(intent) once you know what the intent should be like.


Need Your Help

2 identical Controls in the same Grid ? (WPF/xaml)

wpf xaml

Here is a simple code that exposes my problem :

What is the Java equivalent of PHP var_dump?

java php

PHP has a var_dump() function which outputs the internal contents of an object, showing an object's type and content.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.