ios 9.3.1在开发环境中没有在safari上显示智能横幅

时间:2016-04-08 07:29:58

标签: ios smartbanner ios9.3

我试图在ios 9.3.1上测试智能横幅时遇到问题。我已经在开发环境中使用ios 9.3.1在真实设备上尝试过它,智能横幅没有显示但在9.2.1上显示。 相同的元标记正在制作中,智能横幅显示在ios 9.3.1上。 我能看到的唯一区别是在制作中我有apple-app-site-association json文件而且我没有在dev上。 但它在ios 9.2上工作正常......

这是我使用的元标记

package com.example.point.sqlite;

import android.app.Activity;
import android.app.AlertDialog;
import android.database.Cursor;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import.android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;


public class Teacher extends Activity {

DatabaseHelperClass myDb;
EditText ed1,ed2,ed3;
Button b;//for inserting teacher records
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_teacher);
    myDb=new DatabaseHelperClass(this);


    ed1=(EditText)findViewById(R.id.editText7);//name
    ed2=(EditText)findViewById(R.id.editText8);//surname
    ed3=(EditText)findViewById(R.id.editText9);//age
    b=(Button)findViewById(R.id.button6);
/*here is the issue its not getting inserted when i m trying to insert into     teacher database table using insertData2 and trying to see it using     showDatabase2 */
    b.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            boolean isInserted = myDb.insertData2(ed1.getText().toString(), ed2.getText().toString(), ed3.getText().toString());
            if (isInserted == true) {
                Toast.makeText(getApplicationContext(), "data inserted", Toast.LENGTH_LONG).show();

                Cursor res = myDb.showDatabase2();
                if (res.getCount() == 0) {
                    showMessage("Error!", "no data found");
                    return;
                }
                StringBuffer bf = new StringBuffer();
                while (res.moveToNext()) {

                    bf.append("ID: " + res.getString(0) + "\n");//0 for first column that is col1 id
                    bf.append("NAME: " + res.getString(1) + "\n");
                    bf.append("SURNAME: " + res.getString(2) + "\n");
                    bf.append("AGE: " + res.getString(3) + "\n\n");
                }
                showMessage("Data", bf.toString());
            } else
                Toast.makeText(getApplicationContext(), "data not inserted", Toast.LENGTH_LONG).show();
        }
    });
}
public void showMessage(String title,String message)
{
    AlertDialog.Builder build=new AlertDialog.Builder(this);

    build.setCancelable(true);
    build.setTitle(title);
    build.setMessage(message);
    build.show();
}


@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_teacher, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    //noinspection SimplifiableIfStatement
    if (id == R.id.action_settings) {
        return true;
    }

    return super.onOptionsItemSelected(item);
}
}

由于

0 个答案:

没有答案