calling contact problem

Put your problem here if it does not fit any of the other categories.

calling contact problem

Postby Slava Kamzen » Wed Mar 24, 2010 1:13 pm

Hello, Im working on project for my B.Sc. degree.
Its complicated app, and i have very bizarre problem:
I have a Spinner in my main class,and i feel it with contacts.
When i trying to make a call to certain contact from this class -it works, but...
when i call the function in other class , that suppose to call (exactly the same code) - it throws me exception...
here is the code:
in the main class (where it works):

public class mainclass extends Activity
{
bla bla bla.....

public void onClick(View viewParam)
{
if (RButton==calCntctRBTN)
{
callAction = new call_action(name, number);
callingRule = new calling_rule(movement, callAction, "calling");
rullesCollection.addRule((rule)callingRule);
run_action(); //the call function (working)
callAction.run_action(); //the call function (not working for some strange reason)

}
}

public void run_action()
{
String tel = "222-222-222-222";
Uri telUri = Uri.parse("tel:"+tel);
startActivity(new Intent(Intent.ACTION_CALL, telUri));
}

}// end of class

public class call_action extends Activity implements action
{
bla bla bla...
contractors and stuff

public void run_action()
{
String tel = "222-222-222-222";
Uri telUri = Uri.parse("tel:"+tel);
startActivity(new Intent(Intent.ACTION_CALL, telUri));
}

}

Hope someone will understand the problem, and help me fix it.
thanks

p.s
both classes have the same "includes"
Slava Kamzen
Freshman
Freshman
 
Posts: 7
Joined: Wed Mar 24, 2010 12:56 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests