Button does not work Intent Uri.parse?

Vkletsgo Intent = new
 Intent(Intent.ACTION_VIEW, Uri.parse("http://vk.com"));
 startActivity(vkletsgo);

not any mistakes there, but when clicking on the button does not respond
June 14th 19 at 18:08
1 answer
June 14th 19 at 18:10
https?
on one line you couldn't see where you have a mistake. - Art_Christians commented on June 14th 19 at 18:22
that's not it I even tried to write other sites - flo.Wisoky15 commented on June 14th 19 at 18:13
then throw more code. - Art_Christians commented on June 14th 19 at 18:16
sense ? - flo.Wisoky15 commented on June 14th 19 at 18:19
in the code no error
package org.dendibaev.com.xodjelitaxi;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class ShareActivity extends AppCompatActivity {

 private Button startvk;

@Override
 protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R. layout.activity_share);
}

 public void addListenerOnButton () {
 startvk = (Button)findViewById(R. id.startvk);
startvk.setOnClickListener(
 new View.OnClickListener() {
@Override
 public void onClick (View v) {
 Browsergo Intent = new Intent(Intent.ACTION_VIEW);
browsergo.setData(Uri.parse("http://googl.com"));
startActivity(browsergo);
}
}
);


}
}


just the button does not respond - flo.Wisoky15 commented on June 14th 19 at 18:25
certainly not react, the method addListenerOnButton Pushkin will cause? - Art_Christians commented on June 14th 19 at 18:28
And is that yours?
public void addListenerOnButton () {
 startvk = (Button)findViewById(R. id.startvk);
- flo.Wisoky15 commented on June 14th 19 at 18:31
, OO all forgot to write addListenerOnButton(); - flo.Wisoky15 commented on June 14th 19 at 18:34
should be the same. But in the code itself, no errors, always blame the system, SDK, compiler. There are even hardware bugs in the processor. - Art_Christians commented on June 14th 19 at 18:37
well I'm stupid I forgot to add in oncreate add method )) - flo.Wisoky15 commented on June 14th 19 at 18:40

Find more questions by tags Android