Google Earth プラグイン は いまどき使えないのか

もうネットの上で調べてもいろんな時期の情報があって混乱して困りますが.

何回インストールしてもこのざま.

Google_Earth

「NPAPIを有効化すればいける」というのは今ではもう古い話なのか.

64-bit Chrome drops support for Google Earth Plugin - Google Earth Blog

結局, 大筋はこういう予定らしく, 消える運命なNPAPI.

April 2015

In April 2015 (Chrome 42) NPAPI support will be disabled by default in Chrome and we will unpublish extensions requiring NPAPI plugins from the Chrome Web Store. All NPAPI plugins will appear as if they are not installed, as they will not appear in the navigator.plugins list nor will they be instantiated (even as a placeholder). Although plugin vendors are working hard to move to alternate technologies, a small number of users still rely on plugins that haven’t completed the transition yet. We will provide an override for advanced users (via chrome://flags/#enable-npapi) and enterprises (via Enterprise Policy) to temporarily re-enable NPAPI (via the page action UI) while they wait for mission-critical plugins to make the transition. In addition, setting any of the plugin Enterprise policies (e.g. EnabledPlugins, PluginsAllowedForUrls) will temporarily re-enable NPAPI.

September 2015

In September 2015 (Chrome 45) we will remove the override and NPAPI support will be permanently removed from Chrome. Installed extensions that require NPAPI plugins will no longer be able to load those plugins.

NPAPI deprecation: developer guide - The Chromium Projects

まだ, 猶予期間なので使うとすれば以下が必要要件と.

For the duration of the deprecation period, the set of supported browsers is as follows. Because of the recent Chrome and Firefox announcements, support on those browsers extends only to the latest browser version that supports NPAPI.

Microsoft Windows (XP, Vista, 7, and 8)
Google Chrome 5.0-39.0 (32-bit)
Internet Explorer 7-9, and 10-11 with Compatibility View (32-bit) (Note that the Windows 8 browsing mode with Internet Explorer does not support plugins.)
Firefox 11.0-34.0

Apple Mac OS X 10.6 or later (any Intel Mac)
Google Chrome 5.0-39.0 (32-bit)
Safari 3.1+
Firefox 11.0-34

Google Geo Developers Blog: Announcing deprecation of the Google Earth API

これって, もう 動かないってことで良いのですよね, フツーのユーザーからしたら.


PHP で リクエストされた何かを知る

FTPだけのサーバで, WEBのログがリアルタイムにみれないのでファイルに吐く.

<?php
$input = file_get_contents('php://input');

ob_start();
var_dump($_SERVER);
var_dump($_GET);
var_dump($_POST);
$log = ob_get_contents();
ob_end_clean();

$log .= $input;
file_put_contents('log.txt', $log, LOCK_EX);

raw_data の取得と出力バッファからの文字列取得.

組み合わせを変えればアレコレとれる.

あと, APPEND していくとか.


関連ワード:  開発


Intent を投げる前にするとよいメモ

Lollipop 純正デフォルトでは, Chrome が標準でブラウザはこれひとつ.

Chromeをアンインストールすると暗黙的インテントで行き場所がなく落ちていた.

...
Uri uri = Uri.parse("http://www.yahoo.com/");
Intent i = new Intent(Intent.ACTION_VIEW,uri);
startActivity(i);
...

Intent.ACTION_VIEW てそんなに拾われないのか, などと思ったが.

あらかじめ, 投げる前にチェックしておくといいのか.

...
public static boolean isIntentAvailable(Context ctx, Intent intent) {
  final PackageManager mgr = ctx.getPackageManager();
  List<ResolveInfo> list =
    mgr.queryIntentActivities(intent, 
      PackageManager.MATCH_DEFAULT_ONLY);
  return list.size() > 0;
} 
...

あと, startActivityForResult() から呼ばれるActivityの終了.

...
@Override
public void finish() {
  Intent data = new Intent();
  data.putExtra("return1", "XXX");
  data.putExtra("return2", "YYY");
  setResult(RESULT_OK, data);
  super.finish();
} 
...

finish()を上書きしておくとスッキリする.


関連ワード:  Android開発