Android-单击按钮时插入mysql数据库

Android-单击按钮时插入mysql数据库,android,mysql,database,Android,Mysql,Database,问题是: 视图中有一个按钮。当用户单击该按钮时,向表中插入一列。 我已经阅读了将mysql连接到android的教程,但我仍然无法解决这个问题。我在谷歌上搜索过,但还是找不到。我希望有办法解决我的问题 主视图 Android用于管理传统意义上的“磁盘上”持久性。这是最新的,也是最新的。一旦你理解了基础知识,你就可以继续使用类似的东西来为你提取一些样板文件。请提供你迄今为止生成的相关代码。@Qben我刚刚阅读了从mysql到android的演示数据教程。而且,公式是用php而不是java添加查询

问题是: 视图中有一个按钮。当用户单击该按钮时,向表中插入一列。 我已经阅读了将mysql连接到android的教程,但我仍然无法解决这个问题。我在谷歌上搜索过,但还是找不到。我希望有办法解决我的问题

主视图


Android用于管理传统意义上的“磁盘上”持久性。这是最新的,也是最新的。一旦你理解了基础知识,你就可以继续使用类似的东西来为你提取一些样板文件。

请提供你迄今为止生成的相关代码。@Qben我刚刚阅读了从mysql到android的演示数据教程。而且,公式是用php而不是java添加查询。在时间阶段,您有什么东西吗?像
视图
按钮
一样,按下时只显示
土司
消息。我得到的印象是,你需要学习Android的总体开发,而不仅仅是数据库的连接。但可能是错的。:)好吧。对不起,让你久等了。因为我必须首先编辑当人们在开发android appNo时使用mysql时,是否有一种方式可以方便地使用mysql,我不能说我知道有人在android应用程序中使用mysql而不是提供的SQLite。如果你真的需要MySQL,我帮不了你什么忙。对不起:(
<ImageView
    android:id="@+id/MAIN_tittle"
    android:layout_width="300dp"
    android:layout_height="115dp"
    android:scaleX="1.2"
    android:scaleY="1.2"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:src="@drawable/main_tittle" />

<ImageButton
    android:id="@+id/MAIN_play"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:scaleX="0.7"
    android:scaleY="0.7"
    android:layout_below="@+id/MAIN_tittle"
    android:layout_centerHorizontal="true"
    android:background="@android:color/transparent"
    android:src="@drawable/main_play" />
public class MainMenu extends Activity {
ImageButton playButton = (ImageButton) findViewById(R.id.MAIN_play);
ImageButton optionsButton = (ImageButton) findViewById(R.id.MAIN_options);
ImageButton quitButton = (ImageButton) findViewById(R.id.MAIN_quit);
ImageButton facebookButton = (ImageButton) findViewById(R.id.MAIN_facebook);
ImageButton twitterButton = (ImageButton) findViewById(R.id.MAIN_twitter);

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_menu);
    //PROBLEM IN MANIFEST
    play(); 
    options(); 
    quit(); 
    goToFacebook(); 
    rating();   
}

private void play() {
    playButton.setOnClickListener( new View.OnClickListener() { 
        public void onClick(View v) 
        {  startActivity(new Intent("com.example.creativesnakeladder.CharactersChoice"));
            //this is area of codes which to insert a column in mysql database
        } 
    });
}