p12からAndroid用KeyStoreに変換

Air for Android等で使用する証明書をAndroid用に変換する

keytool -importkeystore -srckeystore target_name.p12 -destkeystore target_name.keystore -srcstoretype pkcs12

*下記のメッセージが出る場合はパーミションの問題があるためでユーザー権限のあるディレクトリに移動してコマンドを実行する
 java.io.IOException: toDerInputStream rejects tag type 0

AndEngineメモ

かなり手こずったのでメモ
ストレージのファイルを利用してAndEngineのテクスチャとする方法
[code]
Sprite base = getBaseActivity().getResourceUtil()
.getSpriteFromFile(getBaseActivity().getFilesDir() + "/background.png");
attachChild(base);
public Sprite getSpriteFromFile(String fileName) {
File imageFile = new File(fileName);
FileInputStream imageFis = null;
try {
imageFis = new FileInputStream(imageFile);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
Bitmap bm = BitmapFactory.decodeStream(imageFis);
BitmapTextureAtlas bta = new BitmapTextureAtlas(
gameActivity.getTextureManager(),
getTwoPowerSize(bm.getWidth()),
getTwoPowerSize(bm.getHeight()),
TextureOptions.BILINEAR_PREMULTIPLYALPHA);
gameActivity.getEngine().getTextureManager().loadTexture(bta);

FileBitmapTextureAtlasSource fileTextureSource = FileBitmapTextureAtlasSource.create(imageFile);
TiledTextureRegion btr = BitmapTextureAtlasTextureRegionFactory.createTiledFromSource(bta, fileTextureSource, 0, 0, 1, 1);

Sprite s = new Sprite(0, 0, btr,
gameActivity.getVertexBufferObjectManager());
s.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);

return s;
}
[/code]

Google AppsでのTwitter API 1.1

Google AppsでのTwitter API 1.1で自分で修正したところのメモ

つぶやくところ
<修正前> http://api.twitter.com/1/statuses/update.json?status=
<修正後> https://api.twitter.com/1.1/statuses/update.json?status=

フォロワーを取得するところ
<修正前> http://api.twitter.com/1/statuses/followers.json?screen_name=
<修正後> https://api.twitter.com/1.1/followers/list.json?screen_name=

取得したJSONのデータの取り方

<修正前>
[code]
var o = Utilities.jsonParse(result.getContentText());
var followlist = new Array();
for(i=0;i<o.length; i++){
 follow = o[i].following;
if(follow !=1){
 followlist.push(o[i].screen_name);
 }
}
[/code]

<修正後>
[code]
var o = Utilities.jsonParse(result.getContentText());
var p = o.users;
var followlist = new Array();
for(i=0;i<p.length; i++){
 follow = p[i].following;
if(!follow){
followlist.push(p[i].name);
}
}
[/code]

まったりと

まったりとタヌキさんの構想をしているところ。
大部分を作り直すからね。
従来のキャラはもちろん健在。そのうち進化させるつもり。旧来のキャラの台詞も増やすつもり。というかもともとその予定。
9月か10月ぐらいリリースできればいいな〜と。
気長にお待ちください(笑)
そうそう15キャラなんですよね。いま登場が決まっているのは。
いや〜先が見えないなぁ(^^;
たぬきさん