Problem in Using PackageManager in Android
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3661367/error-while-using-packagemanager-in-android">Error while using PackageManager in Android</a>  </p>
</blockquote>



<p>I got a problem in one Android Application which I am working in which I am getting error when I use PackageManager. <br>  <br> The Application is as follows:   </p>

<h1>Home.java <br></h1>

<p>package com.main.home <br>
public class Home extends Activity
{ <br>
   //onclicking a Button say "send"  <br>
send.onClickListener() <br>
{  <br>
   public void onClick() { Intent i =new Intent();<br>i.setClassName("com.main.home","com.main.home.home1");<br> startActivity(i); <br> } }</p>

<p><b>  Home1.java </b> <br>
package com.main.home <br>
import com.andr.resulting.Result ; <br>
public class Home1 extends Activity  { <br> EditText et=(EditText)findViewById(R.id.e1);
<br> //Clicking on forwardButton in that onClick()<br> 
public void onClick()
{ <br>
String s[]={e1.getText().toString(),""};  <br>
//Calling a method in a class Result of another package which is not activity  <br>
 Result.finalfunc(Home1.this,s); <br>
}
}<br></p>

<h1>  Result.java</h1>

<p>package com.andr.resulting   //different package
<br> import com.andr.other.otherclass
<br>
public class Result { <br>
public static void finalfunc(Activity act,String[] re) { <br>
<b>//Here I want to get the details of this particular class's package (com.andr.resulting) using PackageManager </b><br></p>

<p><b>I tried like this: </b>  <br>
otherclass.sendTo("hi","hrll",Result.this.getPackageManager().getApplicationinfo(Result.this.getPacakageName(),0));
<br>
I am getting error getPackageManager() doesnot exists in this class file.
<br> How to solve this Issue.  I will be eagerly waiting for valuable reply <br>
Thanks in Advance.</p>
