PHP Fatal error: Call to a member function cd() on a non-object
app/config/core.phpのdate_default_timezone_setを設定すると解決します。
date_default_timezone_set('Asia/Tokyo');
PHP Fatal error: Call to a member function cd() on a non-object
date_default_timezone_set('Asia/Tokyo');
@Override public boolean dispatchKeyEvent(KeyEvent event) { switch(event.getKeyCode()) { case KeyEvent.KEYCODE_VOLUME_UP: if(event.getAction() == KeyEvent.ACTION_UP) { return true; } break; case KeyEvent.KEYCODE_VOLUME_DOWN: if(event.getAction() == KeyEvent.ACTION_UP) { return true; } break; } super.dispatchKeyEvent(event); return false; }
@Override public void onCreate() { // 初期化の処理 super.onCreate(); }
File file = ("ファイルのパス"); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse("file://"+file.getPath()), "application/pdf"); startActivity(intent);
String url = "pdfファイルのurl"; Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse("http://docs.google.com/viewer?url=" + url), "text/html"); startActivity(intent);