如何在Java/Android Studio上编写代码,使用Volley和XAMPP发送和接收好友请求?

如何在Java/Android Studio上编写代码,使用Volley和XAMPP发送和接收好友请求?,java,php,android,xampp,Java,Php,Android,Xampp,这是我的用户界面或个人资料页面: 公共类用户接口扩展了AppCompatActivity{ EditText ETstatus; Button Bprofile , Bfriends , Bfav , Bmsgs , Bfeed , Badd , Bsettings , Bnew, Blogout; TextView TVphoto , TVvideo , textView; private String logout; @Override protected void onCreate(

这是我的用户界面或个人资料页面:

公共类用户接口扩展了AppCompatActivity{

EditText ETstatus;
Button Bprofile , Bfriends , Bfav , Bmsgs , Bfeed , Badd , Bsettings , Bnew, Blogout;
TextView TVphoto , TVvideo , textView;
private String logout;



@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_user_interface);
    //Person's username go here
    textView = (TextView) findViewById(R.id.TVusername);
    Intent intent = getIntent();
    textView.setText(intent.getStringExtra(MainPage.KEY_USERNAME));

    initTypeface();

    //Button's go here
    Bprofile = (Button)findViewById(R.id.button9);
    Bprofile.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/SinkinSans-300Light.otf"));

    Bfriends = (Button)findViewById(R.id.button11);
    Bfriends.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/SinkinSans-300Light.otf"));

    Blogout = (Button)findViewById(R.id.Blogout);
    Blogout.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/SinkinSans-300Light.otf"));


    //EditText's go here
    ETstatus = (EditText)findViewById(R.id.ETstatus);
    ETstatus.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/SinkinSans-300Light.otf"));

}

private void initTypeface() {
    Typeface myTypeface = Typeface.createFromAsset(getAssets(), "fonts/SinkinSans-300Light.otf");
    TextView tittleText=(TextView) findViewById(R.id.textView14);
    tittleText.setTypeface(myTypeface);

    myTypeface = Typeface.createFromAsset(getAssets(), "fonts/SinkinSans-300Light.otf");
    tittleText = (TextView) findViewById(R.id.TVusername);
    tittleText.setTypeface(myTypeface);

    myTypeface = Typeface.createFromAsset(getAssets(), "fonts/SinkinSans-300Light.otf");
    tittleText = (TextView) findViewById(R.id.TVvideo);
    tittleText.setTypeface(myTypeface);

    myTypeface = Typeface.createFromAsset(getAssets(), "fonts/SinkinSans-300Light.otf");
    tittleText = (TextView) findViewById(R.id.TVphoto);
    tittleText.setTypeface(myTypeface);

    myTypeface = Typeface.createFromAsset(getAssets(), "fonts/SinkinSans-300Light.otf");
    tittleText = (TextView) findViewById(R.id.textView15);
    tittleText.setTypeface(myTypeface);
}

public void onLogOutClick (View view)
{
    Intent intent = new Intent(this, MainPage.class);
    Toast pass = Toast.makeText(UserInterface.this, "Come back soon!", Toast.LENGTH_SHORT);
    pass.show();
    startActivity(intent);
    finish();
}
}

我想让它在用户按下按钮时发送好友请求/聊天请求。还想检测用户名是否在数据库中。

这里有一个很棒的教程——这是否向您展示了如何发送和接收好友请求@Tascos@IsaacMedinaPillado基于你的帖子,以及它们几乎是增量的性质,我认为你至少应该在尝试聊天应用程序等项目之前,先尝试一门Android教程。搜索由谷歌共同开发的“udacity Android”课程。一旦你有所改进,并有了具体的编程问题,那么这个网站可能会更有成效。我已经知道75%的Java,我只是对volley非常陌生。我只需要一个关于如何使用的教程谢谢。不,它向你展示了如何发送和接收数据。所以它可以是一头牛、一头驴、一个朋友的名字或一些文本代码。