I want to call a method from one class to another, don\'t know if that\'s possible without extends the class that contains the method. I\'ve tried to import the package, tha
If you want to call the method without creating an instance of the class then make it static:
Class1
{
...
public static void method1() {doSomething;}
}
Class2
{
public class2()
{
Class1.method1(); //should be fine
}
}
edit: If you want to pass data between Activities that is slightly different. Generally you do something like startActivityForResult() and then retrieve the return value, or use Intents like so:
How do I pass data between Activities in Android application?