目前分類:Android (33)

瀏覽方式: 標題列表 簡短摘要

就這樣醬....try....try

http://mrslowblog.blogspot.tw/2013/01/eclipse-android-project.html

Chi Learning 發表在 痞客邦 留言(0) 人氣()

不錯的入門 step by step

https://developers.google.com/mobile-ads-sdk/docs/#play

Chi Learning 發表在 痞客邦 留言(0) 人氣()

When am trying to import an existing android project to Eclipse it is showing the error “Invalid Project Description”. The solution for this “Invalid Project Description” error is

1. Instead of using Android => Existing Android code to workspace you need to choose General => Existing projects into workspace

Chi Learning 發表在 痞客邦 留言(0) 人氣()

還不錯勒!!

http://www.vogella.com/android.html

Chi Learning 發表在 痞客邦 留言(0) 人氣()

For example, given the following XML located in a file in the res/values directory

<?xml version="1.0" encoding="utf-8"?>
<resources>
 <item name="host" type="setting">10.0.2.2</item>
 <item name="port" type="setting">3000</item>
</resources>

I can now use the following Java syntax within an Android Activity:

Chi Learning 發表在 痞客邦 留言(0) 人氣()

The Master/Detail Flow

A master/detail flow is a interface design concept whereby a list of items (referred to as the master list) is displayed to the user. On selecting an item from the list, additional information relating to that item is then presented to the user within a details panel. An email application might, for example, consist of a master list of received messages consisting of the address of the sender and the subject of the message. Upon selection of a message from the master list, the body of the email message would appear within the detail panel.

Chi Learning 發表在 痞客邦 留言(0) 人氣()

Android 提供了“佈景主題”的機制,讓各個應用程式間可以維持一致的風格。佈景主題對於顏色,高度,距離間隔,和字型大小都設定了規範。

在Android 4.0 (ICS) 中提供了三種佈景主題給軟體開發者使用,分別是:

Chi Learning 發表在 痞客邦 留言(0) 人氣()

▼執行adbWireless必須要有Root的手機,當第一次執行時會出現Root的招牌顯示「授權請求」畫面(左圖),按下「允許」出現右圖畫面,按下綠色按鈕。

 

Chi Learning 發表在 痞客邦 留言(0) 人氣()

程式執行當中常常需要記錄各種資訊,如果需要處理的資訊較為單純,可以直接使用文字檔來紀錄,假若資料較繁雜就需要用SQLite,在此先以簡單文字檔做切入,先以Java I/O介紹寫檔、讀檔常用的方法及常用的Method

 

Chi Learning 發表在 痞客邦 留言(0) 人氣()

首先是從BroadcastReceiver派生出一個新類,用來監聽系統啟動後發出的廣播消息android.intent.action.BOOT_COMPLETED  

  • BootReceiver.java:
  • import android.content.BroadcastReceiver;
  • import android.content.Context;
  • import android.content.Intent;
  • import android.util.Log;
  • publicclass BootReceiver extends BroadcastReceiver {
  • publicvoid onReceive(Context context, Intent intent) {
  • if (intent.getAction().equals("android.intent.action.BOOT_COMPLETED"))
  • {
  • Log.d("BootReceiver", "system boot completed");
  • Intent newIntent = new Intent(context, FirstRun.class);
  • newIntent.setAction("android.intent.action.MAIN"); //MyActivity action defined in AndroidManifest.xml
  • newIntent.addCategory("android.intent.category.LAUNCHER");//MyActivity category defined in AndroidManifest.xml
  • newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //If activity is not launched in Activity environment, this flag is mandatory to set
  • context.startActivity(newIntent);
  • //if you want to start a service, follow below method:
  • /*******************************************************
  • Intent service = new Intent(yourService.ACTION_START);
  • service.setClass(context, yourService.class);
  • context.startService(service);
  • ******************************************************/
  • }
  • }
  • }

接下来这个类就是监听到系统启动完毕后,我们要运行的activity.

Chi Learning 發表在 痞客邦 留言(0) 人氣()

I had reported earlier how I had gotten a C Hello World statically-linked program running on my Android phone using CodeSourcery's toolchain (on linux). Today I got a dynamically-linked Hello World program running on the phone, compiled using Android's prebuilt toolchain from the source.

Chi Learning 發表在 痞客邦 留言(0) 人氣()

入門 Android,安裝了一堆有的沒的之後  

新增一個Project執行,卻出現

Chi Learning 發表在 痞客邦 留言(0) 人氣()

Hello World in C on Android

If you've been following the Android world, you'd know that Android's SDK requires you to write apps in Java. Ever since I got my phone I've been dying to run a Hello World C program, but I've been unable to get the right cross compiler for it.

Chi Learning 發表在 痞客邦 留言(0) 人氣()

«12