i'm using a listview. i made it customized. i thing i couldn't figure it out was intent.call action. i try to make a kind of phone book so users can call from listview.
ImageButton call = (ImageButton) customView.findViewById(R.id.call);
call.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + "Your Phone_number"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
});
So i made some research to solve it. there was an sentece says custom adapter doesn't act like activity or something. I will appreciate any help.
error: cannot find symbol method startActivity(Intent)
Update:
i couldn't make call. instead of it i start a new activity such as call.java and send phone data while intent new activity then i made the call on create.