finish() でActivity が終了しない

よくAndroid関連の書籍やサイトなどで
『 finish() で Activity を終了させる』
と書いてあるんですが、
ちょっと微妙な思い違いをしていたようで
めちゃめちゃハマってしまいました(=_=;)

finish() は、
『Activity を即時終了させる』
と思っていたんですが、
どうやらそうでないようです。

とあるアプリを開発していて
ある条件下で Activity を終了させたくて finish() を使っていたんです。

こんな感じ↓


前処理;
if (式) finish();
後処理;

そしたら、どうも finish() が効いていないようで
後処理の部分でエラーで落ちてしまう・・・。

試しに、

Log.d(“CHECK”, “before finish()”);
finish();
Log.d(“CHECK”, “after finish()”);

としてLogCatを見てみたら

09-19 23:29:37.263: DEBUG/CHECK(13016): before finish()
09-19 23:29:37.273: DEBUG/CHECK(13016): after finish()

としっかりスルーされてしまい
「『after finish()』じゃねーよ!!ヾ(`Д´*)ノ」
と一人ボケツッコミのようなことをしてしまいました

で、ひとりでは解決できなかったので
知恵者のみなさまにアドバイスを願ったところ
『finish() は Activity を即時終了するわけではない』
ということがわかりました。

finish() はどうやら
「終了してもいいよ」
という宣言だけであり、その場で即時終了されるわけではなく
任意のタイミングでAndroid OSに終了されるのだそうです。

つまり、人間からみたら即時終了しているように見えても
Androidからしたら、終了宣言をしたActivityをOSが
気づいたときに終了しているみたいです。

そこには人間にはわからない多少のタイムラグがあり
その間にもプログラムは進行するので、
後処理の部分にエラーなどがあると強制終了されてしまうみたいです。

finish() のあとには、余計な処理を入れないようにしたほうがいいです。

というわけで、先程のプログラムは

前処理;
if (!式) 後処理;
finish();

とすることで解決しました。

んー、いやしかし、

前処理;
if (式) finish();
後処理;

とやりたいときもあるだろうに・・・。

そんなときはどうすんだろ?

カテゴリー: Android アプリ 関連 情報 | 4件のコメント

finish () does not terminate in Activity

Well sites, and books relating to the Android
[Finish () to terminate in the Activity]
But I have written,
The misunderstanding seems to have been a little sensitive
I hooked (=_=;) wreck

finish () is
Immediately terminate] [Activity
But I thought,
This is apparently not in others.

They developed a certain application
Activity in some circumstances do not want to end the finish () I was using.

Like this ↓

---
Pretreatment;
if (expression) finish ();
Disposition;
---

Then, somehow finish () is not working like
Falls in parts of the post-processing error.

As a test,
---
Log.d ("CHECK", "before finish ()");
finish ();
Log.d ("CHECK", "after finish ()");
---
Why do not you look at a LogCat
---
09-19 23:29:37.263: DEBUG / CHECK (13016): before finish ()
09-19 23:29:37.273: DEBUG / CHECK (13016): after finish ()
---
Through the good and away
"[After finish ()] is not about you! ヾ (` Д ‘*) Bruno ”
I like to be alone with Boketsukkomi

, And so could not solve alone
I wished everyone a wise man for advice
[Finish () will not terminate immediately Activity] is not
I found that.

finish () is apparently
“Can I quit you”
Is only a declaration, not be terminated immediately on the spot
At any time of the Android OS seems to be terminated.

In other words, it appears to be an immediate exit from a human Why
Karashitara Android, an OS that had declared the end Activity
It seems when you have finished noticed.

There are a few people know there is a time lag
In the meantime, so the program progresses,
It seems there would have been killed and post-processing part of the error.

finish () is followed, it is better to put that extra processing.

So, the earlier program

Pretreatment;
if (! expression) post-treatment;
finish ();

Can be solved.

Hmm, but no,

Pretreatment;
if (expression) finish ();
Disposition;

We would want to sometimes.

When such Sundaro do?

カテゴリー: Android アプリ 関連 情報 | 13件のコメント

AdMakerの管理画面がパワーアップ!

AdMakerの担当者さんからメールがきて
「なんだろ?」
と思って開いてみたら、
管理画面がパワーアップしたとの連絡。

さっそく開いてみたら・・・
管理画面がリニューアルとのこと!

「見積収益の確認」
「アプリの追加登録」
「自社広告の設定」

ができるようになっていました。

【サマリー画面】

AdMaker 収益

広告全体の情報が確認できます。

今月の見積広告収益、
メディア別(アプリ別)の見積収益、
ネットワークごとの平均クリック単価など。

【レポート画面】

AdMaker 収入

月ごとのメディア別(アプリ別)の
インプレッション数、クリック数、クリック率、平均クリック単価、eCPM、見積収益額が確認できます。

【配信設定】

AdMaker クリック単価

広告表示用URLの管理と新規発行ができます。

自社広告の設定もできます。

おお、しかも収益が先月の2倍くらいに上がってる!!Σ( ̄□ ̄;)!!

クリック単価も上がってます!

確定額ではないようですが。

確定収益は翌月の10営業日以内に
レポート(EXCELとPDF)で報告してくれるようです。

正直、AdMakerはAdMobにくらべて

・広告表示率が100%なので機会損失がない
・単価が高い

ので魅力はあったんですが、

・管理画面で収益が確認できない
・新規広告の発行が人力なので遅い

というのが正直不満でした。

ですが今回のリニューアルで、
管理画面で収益が確認できるようになったので
かなり使い勝手がよくなりました。

新規広告の発行は管理画面からできますが
どちらにしろ人の審査が入るようです。

少しは早くなったのかな?

広告システムもだんだんと整ってきて
Androidアプリでも稼ぐ基盤ができてきましたね。

AdSenseはまだベータテスト版で一般の人は参加できないし
AdMakerは表示率と単価が低いので、
個人的にはいまのところAdMakerがオススメです。

カテゴリー: Android アプリ ビジネス情報 | 13件のコメント

AdMaker power management screen!

AdMaker’s got an email from a representative
“Is not it?”
Why do I open it,
Contact with the power management screen.

Why do not immediately open
Renewal and an administration that!

“Reviewing revenue estimates”
“Add all apps”
“Setting the house ads”
I would be able to.

[Summary] screen

AdMaker 収益

You can see information about the entire ad.

The estimated ad revenue this month
Different media (by application) revenues estimated,
And the average CPC for each network.

[Report] screen

AdMaker 収入

Monthly by the media (by application) of
Impressions, clicks, CTR, average CPC, eCPM, earnings estimates can be confirmed.

- Delivery settings;

AdMaker クリック単価

The URL for the ad management and new issues.

You can also set their own advertising.

Oh, I’m going up to about two times earnings last month, too! ! Σ (¯ □ ¯;)! !

I also raised CPC!

It seems that not a fixed amount.

Masu Osamu confirm in the next month is 10 working days
Report (EXCEL and PDF) that will report on it.

Tadashi Akira, AdMaker is compared with AdMob

Ads – 100% rate, so there is no opportunity loss
• High cost

Since there is not just a charm,

Revenue can not be verified – admin
Input – so slow to issue new ad

To be honest it was a complaint.

But this redesign,
I can now see the screen in revenue management
Much better now easy to use.

Can be issued from the new ad management screen
Review of people seem to get that anyway.

I started a little early?

Systems also come equipped with more and more ads
I have been able to make the Android platform but app.

AdSense is the public beta version is still not able to participate
AdMaker rate is low and cost per display
Personally, I recommend at the moment AdMaker.

カテゴリー: Android アプリ ビジネス情報 | 22件のコメント

Galaxy Tab のプロモーション映像

世界中で注目されているAndroid搭載型タブレット
Samsung Galaxy Tabのプロモーション映像です。

こういうプロモ見てると、欲しくなっちゃうよな~。

図書館で本を山積みで勉強している学生が
となりでGalasy Tabでスマートに勉強している女の子に見とれるシーンがあるんですが、
たしかに『かっこいいな~』って思っちゃいますw

Galaxy Tabは
『iPadに対する最高の競合製品』とまで言われ
業界にひと風起こしそうです。

Galaxy Tabはまもなくリリース予定。

どこまでiPadに食らいつくか、楽しみです。

カテゴリー: Android 関連情報 | 40件のコメント

Galaxy Tab promotional video

Android has attracted attention around the world mounted tablet
Samsung Galaxy Tab is a promotional video.

Promo and watching these, I also – I want those.

Students are studying in a pile of books in the library
Nearby Galasy Tab in the scene I have to admire the smart girls are studying,
[A cool-Cha has certainly looked good w 』

Tab Galaxy is
[IPad charge. He said competing against the best up and
People are prone to wind industry.

Tab Galaxy will be released soon.

How far iPad bite, and I look forward to.

カテゴリー: Android 関連情報 | 1件のコメント

App Inventorがバージョンアップ

プログラミング不要でAndroidアプリが作れる
App Inventorがバージョンアップされました。

自分の使っているApp Inventorが最新のものになっているかは
ブラウザの右下にあるバージョンを確認して
“Build: Tue Sep 14 18:05:48 2010 (1284512748) — 17278198″
になっていれば、最新の状態になってます。

もし最新になっていなければ、
ブラウザをリロードして最新バージョンにアップデートしてください。

今回のバージョンアップで解消されたバグ・新機能は以下のとおり。
- Add a new ‘Scrollable’ property to Screens to control whether it is
scrollable.
- Improve the buggy behavior of Fill Parent
- Enable multiple FIll Parent components and have them share the
available space.
- Table arrangement on phone does not match arrangement in designer
- Tables don’t expand automatically
- Blank cells not respected in table layout.
- Italic text doesn’t work on the phone
- In Chrome, changing Alignment or FontTypeface doesn’t work
- Uploading an asset with the same name makes it incorrectly show a
duplicate entry in the Media section
- Codeblocks can’t load project if I type “$JSON” in the Screen’s title
- Can’t reload a project that has a \n in a label’s text property
- Certain combination of colons and spaces in label text cause unexpected
line wraps and previewer selection errors
- Uploading a badly formated project zip file causes a crash report on
the server and the client doesn’t get back a sensible error message
- My Projects from home page cause an exception
- Phone call dials only 10 digits
- Designer UI is too tall to height of some components to be changed

機能追加というよりは、バグ修正が主な内容のようですね。

でもこうやってどんどんバージョンUPしてくれるのは嬉しい限り。

どんどん機能が増えて、App Inventorで作れるアプリの種類が増えたらいいですね。

カテゴリー: Android アプリ 関連 情報 | 15件のコメント

App Inventor is upgraded.

The application can be made without programming Android
App Inventor has been updated.

Do you use your App Inventor has become the latest thing
Check the bottom right of the browser version
“Build: Tue Sep 14 18:05:48 2010 (1284512748) – 17278198″
If it is, and I’m getting up to date.

If the latest is, if
Please update your browser and reload the latest version.

– Add a new ‘Scrollable’ property to Screens to control whether it is
scrollable.
– Improve the buggy behavior of Fill Parent
– Enable multiple FIll Parent components and have them share the
available space.
– Table arrangement on phone does not match arrangement in designer
– Tables don’t expand automatically
– Blank cells not respected in table layout.
– Italic text doesn’t work on the phone
– In Chrome, changing Alignment or FontTypeface doesn’t work
– Uploading an asset with the same name makes it incorrectly show a
duplicate entry in the Media section
– Codeblocks can’t load project if I type “$JSON” in the Screen’s title
– Can’t reload a project that has a \n in a label’s text property
– Certain combination of colons and spaces in label text cause unexpected
line wraps and previewer selection errors
– Uploading a badly formated project zip file causes a crash report on
the server and the client doesn’t get back a sensible error message
– My Projects from home page cause an exception
– Phone call dials only 10 digits
– Designer UI is too tall to height of some components to be changed

Rather than adding features, I like the main content of bug fixes.

Fast version of it in this way is I’m glad they have to UP.

Rapidly increasing capabilities, App Inventor I hope more people make the kind of application.

カテゴリー: Android アプリ 関連 情報 | 2件のコメント

AdMaker で 収入 がUP

AdMaker の8月の 収益 レポートが来たので
7月の 収益 レポートと 比較 してみました。
相変わらずエクセルシートでの人力レポートなんですが(^_^;)
7月のときよりも詳しく分析されていて
少し見やすくなっていました。
結論から先に言うと、
7月にくらべてだいぶ売上が上がっていました。
数字の上では、約10倍になりました。
まぁ、7月は後半10日しか掲載していないんですが、
1ヶ月換算(3倍)して比較しても
3倍強の収入になります。
以下、数字で比較してみましょう。

 

【 AdMaker 07/20~07/31】

  PV クリック CTR 収益 単価
アプリA 271 12 4.4% 72円 6円
アプリB 403 16 4.0% 96円 6円
アプリC 638 18 2.8% 108円 6円
合計 1312 46 3.5% 276円 6円
1ヶ月換算 3936 138 3.5% 828円 6円

 

【 AdMaker 08/01~08/31】

  Impr. クリック CTR 収益 単価
アプリA 9187 563 6.14% 1858円 3.3円
アプリB 1426 142 9.68% 625円 4.4円
アプリC 970 58 6.38% 139円 2.4円
合計 11583 763 7.4% 2622円 3.37円
比較してみると、
単価はアプリ毎にバラバラになって低くなっているにも関わらず
収益がほぼ3倍になっています。
表示回数とクリック率が伸びてますね。
とくに表示回数がかなり伸びてます。
アプリAの伸び率がハンパない・・・。
なぜ表示回数とクリック率がここまで伸びたのかは
正直理由がよくわかりませんが、
これだけの数字を出すようになってくると
収益源として十分可能性を感じます。
AdMobと違い、広告は100%表示されるというのが
機会損失がなくていいですね。
・多くの人にダウンロードされ、頻繁に使われるアプリを作る
・そういうアプリを量産する
この2つをクリアすれば、
十分魅力のある収益源となりそうです。
カテゴリー: Android アプリ ビジネス情報 | 4件のコメント

AdMaker income in UP

AdMaker の8月の 収益 レポートが来たので
7月の 収益 レポートと 比較 してみました。
相変わらずエクセルシートでの人力レポートなんですが(^_^;)
7月のときよりも詳しく分析されていて
少し見やすくなっていました。
結論から先に言うと、
7月にくらべてだいぶ売上が上がっていました。
数字の上では、約10倍になりました。
まぁ、7月は後半10日しか掲載していないんですが、
1ヶ月換算(3倍)して比較しても
3倍強の収入になります。
以下、数字で比較してみましょう。

【 AdMaker 07/20~07/31】

PV クリック CTR 収益 単価
アプリA 271 12 4.4% 72円 6円
アプリB 403 16 4.0% 96円 6円
アプリC 638 18 2.8% 108円 6円
合計 1312 46 3.5% 276円 6円
1ヶ月換算 3936 138 3.5% 828円 6円

【 AdMaker 08/01~08/31】

Impr. クリック CTR 収益 単価
アプリA 9187 563 6.14% 1858円 3.3円
アプリB 1426 142 9.68% 625円 4.4円
アプリC 970 58 6.38% 139円 2.4円
合計 11583 763 7.4% 2622円 3.37円
比較してみると、
単価はアプリ毎にバラバラになって低くなっているにも関わらず
収益がほぼ3倍になっています。
表示回数とクリック率が伸びてますね。
とくに表示回数がかなり伸びてます。
アプリAの伸び率がハンパない・・・。
なぜ表示回数とクリック率がここまで伸びたのかは
正直理由がよくわかりませんが、
これだけの数字を出すようになってくると
収益源として十分可能性を感じます。
AdMobと違い、広告は100%表示されるというのが
機会損失がなくていいですね。
・多くの人にダウンロードされ、頻繁に使われるアプリを作る
・そういうアプリを量産する
この2つをクリアすれば、
十分魅力のある収益源となりそうです。
カテゴリー: Android アプリ ビジネス情報 | 15件のコメント