2011年6月26日星期日

Are You Ready? Go Google Market & Admob

I has finally decided to create my account, and begin a few small mobile software. Ready to launch Admob and Google Ads advertising, Good Luck!

2009年12月14日星期一

blogger go on...

Some time ago has been a screen. Can not log onto. . VPN is finally used up, and the future continue to be updated. .

2009年5月13日星期三

Android-SDK-1.5模拟器启动设置


2009.4.14,Google再次放出Android的SDK--1.5,这个版本要结合ADT0.9使用。

下面是下载连接:

Windows 版本[url]http://dl.google.com/android/android-sdk-windows-1.5_pre.zip

[/url]

Linux 版本[url]http://dl.google.com/android/android-sdk-linux_x86-1.5_pre.zip

[/url]

ADT Plugin for Eclipse 0.9:[url]http://dl-ssl.google.com/android/ADT-0.9_pre.zip

[/url]

首先建立一个项目,然后运行!呵呵,模拟器是不是没启动啊?现在不要慌关闭eclipse,貌似是在升级。然后配置环境变量path,我的是D:\android-sdk-1.5\tools。现在用快捷键super+R,然后出入cmd,进入SDK的根目录!!输入一下命令

android create avd --name sdk1.5 --target 2

emulator -avd sdk1.5
最后再运行一次,模拟器出来啦!!!呵呵!!
Login.java


package com.heji.login;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Login extends Activity {
/** Called when the activity is first created. */

private static Button loginButton;
private static Button cancelButton;
private static Button registerButton;
private static Button exitButton;
private ButtonListener bl = new ButtonListener();

private EditText et1;
private EditText et2;
private Intent intent;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.login);

//添加登陆按钮监听
loginButton = (Button)findViewById(R.id.login_ok);
loginButton.setOnClickListener(bl);

//添加取消按钮监听
cancelButton = (Button)findViewById(R.id.login_reset);
cancelButton.setOnClickListener(bl);

//添加注册按钮监听
registerButton = (Button)findViewById(R.id.register);
registerButton.setOnClickListener(bl);

//添加退出按钮监听
exitButton = (Button)findViewById(R.id.exit);
exitButton.setOnClickListener(bl);
}
private class ButtonListener implements View.OnClickListener {
public void onClick(View view) {
// TODO Auto-generated method stub
if(view == loginButton) {
et1 = (EditText)findViewById(R.id.username_info);
et2 = (EditText)findViewById(R.id.password_info);

if((et1.getText().toString()).equals("heji") && (et2.getText().toString()).equals("heji")) {
intent = new Intent();

//用Bundle来传递当前Activity的内容
Bundle bundle = new Bundle();
bundle.putString("USERNAME", et1.getText().toString());
intent.putExtras(bundle);

intent.setClass(Login.this, Information.class);

//启动Activity
startActivity(intent);
}else {
intent = new Intent();

intent.setClass(Login.this, ErrorPage.class);
//启动Activity
startActivity(intent);
}
}else if(view == cancelButton) {
intent = new Intent();
//通过Login这个类来启动Login
intent.setClass(Login.this, Login.class);
//启动Activity
startActivity(intent);
}else if(view == registerButton) {

}else if(view == exitButton) {
finish();
}
}
}
}




Information.java(名字取得很不好,见谅)


package com.heji.login;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class Information extends Activity {

protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//显示布局
this.setContentView(R.layout.information);

TextView tv = (TextView)findViewById(R.id.first_page_info);

//获得从上个页面传过来的数据
Bundle bundle = this.getIntent().getExtras();
String str = bundle.getString("USERNAME");
tv.setText(str);

Button button_back = (Button)findViewById(R.id.back);
button_back.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
// TODO Auto-generated method stub
Intent intent = new Intent();

//通过Information这个类来启动Login
intent.setClass(Information.this, Login.class);
//启动Activity
startActivity(intent);
}
});
}
}




ErrorPage.java


package com.heji.login;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;



public class ErrorPage extends Activity {

protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//显示布局
this.setContentView(R.layout.errorpage);

Button button_back = (Button)findViewById(R.id.errorback);
button_back.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
// TODO Auto-generated method stub
Intent intent = new Intent();

//通过ErrorPage这个类来启动Login
intent.setClass(ErrorPage.this, Login.class);
//启动Activity
startActivity(intent);
}
});
}
}


下面是布局文件:

login.xml


<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/welcome_hello"
/>

<TableRow android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/username"
/>

<EditText android:id="@+id/username_info"
android:maxLength="8"
android:maxLines="1"
android:layout_weight="1.0"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=""
/>
</TableRow>

<TableRow android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/password"
/>

<EditText android:id="@+id/password_info"
android:password="true"
android:maxLength="10"
android:maxLines="1"
android:layout_weight="1.0"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=""
/>
</TableRow>

<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<Button android:id="@+id/login_ok"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:text="@string/login"
/>

<Button android:id="@+id/login_reset"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:text="@string/reset"
/>
</LinearLayout>

<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<Button android:id="@+id/register"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:text="@string/register"
/>
<Button android:id="@+id/exit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:text="@string/exit"
/>
</LinearLayout>

</TableLayout>




information.xml


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/success_info"
/>

<TextView android:id="@+id/first_page_info"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=""
/>

<Button android:id="@+id/back"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/back"
/>

</LinearLayout>




errorpage.xml


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/errorpage"
/>
<Button android:id="@+id/errorback"
android:layout_width="60dip"
android:layout_height="wrap_content"
android:text="@string/error_back"
/>
</LinearLayout>




strings.xml


<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="welcome_hello">Hello,Welcome To Login</string>
<string name="app_name">Login</string>
<string name="username">username</string>
<string name="password">password</string>
<string name="login">login</string>
<string name="reset">reset</string>
<string name="register">register</string>
<string name="information">congratulation!</string>
<string name="success_info">Hello Android Developer,You ID Is</string>
<string name="errorpage">Sorry,You Don't Register,Please By The "BACK" Button To Return The FirstPage,Thank You!!!</string>
<string name="error_back">BACK</string>
<string name="back">BACK</string>
<string name="exit">Exit</string>
</resources>

2009年5月6日星期三

3G Android myTouch将被T-Mobile定制

中关村在线:北京时间2009年5月3日,国外媒体爆出myTouch 3G在美国将被T-Mobile定制,但是发售时间与价格目前官方并没有确认。这款手机在欧洲被称作HTC Magic,被沃达丰定制,目前已经在几个国家开始发售。T-Mobile定制版的myTouch 3G将采用新的虚拟键盘。   myTouch 3G是一款采用Android系统的手机,白色轻薄的机身,面板上配备了一块3.0吋的触摸屏幕,分辨率达到480×320像素,屏幕的下方是功能键与轨迹球。该机支持Wi-Fi、蓝牙数据传输,另外手机内置320万像素的摄像头,支持自动对焦。这款myTouch 3G手机支持四频GSM/GPRS/EDGE 850/900/1800/1900MHz网络,同时还可以向上兼容HSDPA/WCDMA 1700/2100MHz等3G、3.5G数据网络。

Android开发环境配置

我觉得,视频讲解例子是入门最好的老师.
搜索发现现在关于Android开发环境的视频还比较少.这儿推荐一个入门级的.

Android开发环境搭建
http://www.boobooke.com/v/bbk2635

Android上第一个HelloWorld程序
http://www.boobooke.com/v/bbk2636


通过这个可以进行环境搭建的操作.

2009年5月4日星期一

G1 Complaints Grow, Then Shrink

No phone is perfect and after a couple days, a somewhat universal list of complaints for the T-Mobile G1 has sparked up on the web. I agree with AndroidGuys and IntoMobile on their list and echo it below:
No standard 3.5mm headphone jack
Video player other than YouTube
Lack of MS Exchange support
No tethering or desktop sync
No VoIP capabilities
T-Mobile capping bandwidth at 1GB
Amazon downloads have to come via WiFi
The most obvious problem was the 1GB data cap. Once you surpassed 1GB of data usage in a month, your internet speed would be throttled back below 3G and EDGE to whatever painfully slow amount T-Mobile decided was enough to jail you to.
Apparently T-Mobile heard those complaints loud and clear… they’re no longer capping data at 1GB but instead, changing their “Terms of Service” vocabulary to make decisions on a case by case basis. If you abuse the unlimited data system, you’ll get slapped, banned, pwned or whatever else - bottom line.
With that out of the way, lets move onto lack of MS Exchange support, no tethering/desktop sync and no video player besides YouTube. Do these not ALL sound like problems that could be solved by 3rd party developers? Andy Rubin said himself that MS Exchange would be perfect for an outside company to tackle.
Desktop syncing… Funambol is working on an application for that. YouTube player? There shouldn’t be any reason that a 3rd party can’t develop a video player… if YouTube is able to play videos, Android’s SDK should have the tools to allow for this. These might not be EASY but they ILLUSTRATE what Android is… you have every building block you need, if you want it, build it and download it!
I’m kind of disappointed about the 3.5mm headphone jack as well… I would have liked to carry this thing around as a music player. The VoIP and Amazon over WiFi things are a little less important than the others, I would think.
All in all thats a pretty short list of complaints. No phone is ever going to be “perfect” and I imagine thats why the “Dream” moniker wasn’t used. Its setting the bar too high. Its ASKING to be railroaded with snarky headlines like, “T-Mobile Dream is a Nightmare”. Why put yourself in that position?
All in all, if these are the only complaints - several which have already been addressed - than the T-Mobile G1 does a pretty darn good job at addressing the needs of consumers. And remember, this is only the FIRST Android phone by ONE manufacturer and on ONE carrier… we’ve got plenty more to come and plenty of applications on the way that will fill some of the “capability” gaps that been discussed so far.
Kudos for T-Mobile addressing the 1GB limit pretty swiftly. Even if the current resolution leaves somewhat of a question mark, they noticed the issue and addressed it and you have to give them credit for that.
And while the steady stream of Apple Fanboys persistently proclaim their superb power, the story that is unfolding illustrates that just the opposite is true. The iPhone App Store rejection letters to developers are now cjavascript:void(0)oming with a Non-Disclosure Agreement. What a joke.
Excuse me while I bask in the glory of openness.