i have made a call button in android it shows fatal exception main error can any one explain this or give me another code? -
** This is the code that I use to develop my program and this fatal exception shows the main error < / P>
Import android.app.activity; Import android.content.Intent; Import android.net.Uri; Importroid.os.Bundle; Import android.view.View; Import android.view.View.OnClickListener; Import android.widget.ImageButton ;; Public classroom enhances main activity activity {@ Override Protected Zero (Bundled Saved Instance) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_main); ImageButton call = (ImageButton) findViewById (R.id.call); Call.setOnClickListener (New OnClickListener) {@Override Click Public Zero (see V) {intent call = new intent (Intent.ACTION_DIAL, Uri.parse ("Tell: 0774459581")); Primacy (call);}});
....... .... ....
intent to call = new intent (int. Action_dial, uri.from (" tell: 0774459581 "));
You've mistakenly written , tell:
. Remember to add Tele:
Use of Android-permission: name = "android.permission.CALL_PHONE" /> should be there ;
In your manifest file
Comments
Post a Comment