I am a beginner in android app development.. i have made an app now and there is a pop up in it which shows a persons name and details.. i have added 3 buttons there like CALL,SMS,EMAIL.. i went for call activity, but its not working. no error is there still call button is not making calls.. The same code i have tried in a new project, there it works well.. but when i do it on that popup, call is not working... please help me
public class popupinv extends AppCompatActivity {
public Button b;
public void init(){
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_popupinv);
init();
b= (Button) findViewById(R.id.call);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent callIntent=new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:123456));
startActivity(callIntent);
}
});
}
}