2011年11月10日 星期四

[AndroidDev] WebView

[WebView]
  • The basis upon which you can do followings within your Activity:
    • Roll your own web browser.
    • Simply display some online content.
    • Uses the same rendering and JavaScript engine(WebKit) as the browser, but it runs under the control of your application.
  • By default:
    • A WebView provides no browser-like widgets.
    • No zoom in and out.
    • Does not enable JavaScript.
    • No navigation controls.
      • Need to handle the BACK button on the device
      • Overrides URL loading, it automatically accumulates a history of visited web pages.
    • Web page errors are ignored.
    • Perform text searches. (?)
    • No address bar.
    • As you click a link, by default WebView will ask Activity Manager to choose the proper handler for the url.
      • Instead of adding an intent filter to view web pages, you can override the WebViewClient class and enable this Activity to handle its own URL requests.

Load content
  • Can download content from the web.
  • Can come from local files stored in your assets directory.
  • Can even be dynamically generated by your application code.
  • ex:
webview.loadUrl("http://www.google.com.tw/");  

// or

String summary = "You scored 192 points.";
webview.loadData(summary, "text/html", null);


Note:

A WebView has several customization points where you can add your own behavior. These are:
  • Creating and setting a WebChromeClient subclass. 
    • This class is called when something that might impact a browser UI happens, ex:
      • Progress update.
      • JavaScript alerts are sent here.
  • Creating and setting a WebViewClient subclass.
    • It will be called when things happen that impact the rendering of the content, ex:
      • Errors or form submissions.
    • Will load any URL selected from this WebView into the same WebView.
    • Can intercept URL loading here (via shouldOverrideUrlLoading()).
      • 預設點擊頁面上的 link 會由系統處理,開啟相對應的 app。
        • ex: 若是 URL 則開啟系統 Browser。
      • 但若 override shouldOverrideUrlLoading()
        • 則能依照自己意思判斷 URL 決定要在 WebView 開啟或是在 Browser 中開啟。ex:
        • return true
          • The method has handled the URL and the event should not propagate.
            • ex: an Intent would be created that's handled by the Browser application
          • 表示會自己處理 url。
          • 因此若沒有任何處理動作,點擊後不會有反應。
        • return false
          • The current WebView handles the url
          • 仍由系統處理,但會開啟在當前的 WebView。
          • 因此若有設定自己的執行動作又 return false,則兩種執行動作都會被觸發。
      • 所以如果想要畫面都在 WebView 中開啟,則表示一定要 override shouldOverrideUrlLoading()。
  • Related JavaScript
    • Enabling JavaScript with setJavaScriptEnabled() (Modifying the WebSettings)
    • addJavascriptInterface(Object, String)
      • Adding JavaScript-to-Java interfaces.
      • Has security issue.
      • Bind Java objects into the WebView so they can be controlled from the web pages JavaScript.
        • ex: Your JavaScript code can call a method in your Android code to display a Dialog, instead of using JavaScript's alert() function.
Data
  • For obvious security reasons, your application has its own cache, cookie store etc.—it does not share the Browser application's data
  • Cookies are managed on a separate thread, so operations like index building don't block the UI thread. 
  • CookieSyncManager
    • Is used to synchronize the browser cookie store between RAM and permanent storage.
      • To get the best performance, browser cookies are saved in RAM. A separate thread saves the cookies between, driven by a timer.
    • Note that even sync() happens asynchronously, so don't do it just as your activity is shutting down.

Note
  • Must claim this permission in AndroidManifest.xml or you won't open page and do not get any exception.
    • <uses-permission android:name="android.permission.INTERNET">


Related
[AndroidLayout] WebView Performance


* Reference
- WebView | Android Developers
WebViewClient | Android Developers
- WebChromeClient
WebSettings | Android Developers
CookieSyncManager | Android Developers
Android Developers Blog: Using WebViews
Building Web Apps in WebView | Android Developers
- WebView 1 - 4 ***
- SOP - Same Origin Policy (Browser Security Policy)

[Android] Other app types

android 除了主要的四元件(activity, broadcastReceiver, service, content provider)

從這四元件所延伸的應用,有些可被歸類的項目

2011年11月8日 星期二

[Android] requestFeature() must be called before adding content

Error Message

Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content

Occurred when using requestWindowFeature


Solution

必須在 setContentView 前呼叫 requestWindowFeature



[Android] Action Bar - (1)

[Android 3.0]
  • A replacement for the traditional title bar at the top of the activity window. Includes:
    • The application logo in the left corner.
    • Provides a new interface for items in the Options Menu.
  • Can provide:
    • Action items
      • Equal to option menu items.
      • Using android:showAsAction menu item xml attribute with a value of "ifRoom"
      • When there's enough room
        • The menu item appears directly in the Action Bar.
      • Otherwise
        • The item is placed in the overflow menu, revealed by the menu icon on the right side of the Action Bar.
      • By default all items from the Options Menu are placed in the overflow menu.
        • The user can open by touching the menu icon on the right side of the Action Bar.
        • However, you can place select menu items directly in the Action Bar as "action items," for instant access
    • Action view
      • Replace an action item with a widget, ex: search box.
      • Using android:actionViewLayout(android:actionLayout?) attribute with a layout resource or the android:actionViewClass attribute with the class name of a widget.
      • You must also declare the android:showAsAction attribute so that the item appears in the Action Bar.
      • If there's not enough room in the Action Bar does not show the widget.
    • Add an action to the application logo and replace it with a custom logo
      • The application logo is automatically assigned the android.R.id.home ID, which the system delivers to your activity's onOptionsItemSelected() callback when touched.
      • Simply respond to this ID in your callback method to perform an action such as go to your application's "home" activity.
      • To replace the icon with a logo.
        • Specify your application logo in the manifest file with the android:logo attribute, then call setDisplayUseLogoEnabled(true) in your activity.
    • Add breadcrumbs to navigate backward through the back stack of fragments.
    • Add tabs or a drop-down list to navigate through fragments.
    • Customize the Action Bar with themes and backgrounds.


Summary
  • action items = options menu = overflow action items (ifRoom)
  • context menu: showing after long press
    • Displayed when the user performs a "right-click" on a PC.
    • 需覆寫 onCreateContextMenu()onContextItemSelected()
  • action view: widget(search box)


By the way

2011年11月7日 星期一

[Android] Contact APIs

[ContactsContract]
  • 是最根本的資料所在(?),而其下延伸出的資料儲存方式(db),有待再瞭解...。
  • The contract between the contacts provider and applications.
  • Contains definitions for the supported URIs and columns.
  • These APIs supersede ContactsContract.Contacts. (?)
  • Overview ContactsContract defines an extensible database of contact-related information. Contact information is stored in a three-tier data model:
    • A row in the ContactsContract.Data table
      • Data is a generic table that can hold any kind of contact data.
      • 連絡人的所有資料,每筆資料可能存有不同 type。
      • Can store any kind of personal data, such as a phone number or email addresses.
      • Contains data points tied to a raw contact
      • Each row of the data table is typically used to store a single piece of contact information (such as a phone number) and its associated metadata (such as whether it is a work or home number).
      • The set of data kinds that can be stored in this table is open-ended.
      • There is a predefined set of common kinds, but any application can add its own data kinds. ex:
        • ContactsContract.CommonDataKinds.Phone
        • ContactsContract.CommonDataKinds.Email...etc.
    • A row in the ContactsContract.RawContacts table
      • Represents a set of data describing a person and associated with a single account.
      • Contains one row of contact information for each person in each synced account.
      • Sync adapters and contact management apps are the primary consumers of this API.
      • 在一個帳號中的一位聯絡人的一筆資料。
      • ex: one of the user's Gmail accounts.
    • A row in the ContactsContract.Contacts table
      • Represents an aggregate of one or more RawContacts presumably describing the same person.
      • RawContact 的整合。
      • When data in or associated with the RawContacts table is changed, the affected aggregate contacts are updated as necessary.

[New APIs in Level 14]

[SampleSyncAdapter - Sample Sync Adapter | Android Developers]
  • The sample uses two related parts of the Android framework:
    • The account manager
    • The synchronization manager (through a sync adapter).
  • It also demonstrates how to provide users the ability to create and edit synchronized contacts using a custom editor.
  • Account Manager
    • The account manager allows sharing of credentials across multiple applications and services.
    • Users enter the credentials for each account only once
    • Applications with the USE_CREDENTIALS permission can then query the account manager to obtain an auth token for the account.
    • An authenticator (a pluggable component of account manager)
      • Requests credentials from the user
      • Validates them with an authentication server running in the cloud
      • Stores them to the account manager.
    • This sample demonstrates how to write an authenticator for your service by extending the new AbstractAccountAuthenticator abstract class.
  • SyncAdapter
    • The sync adapter (essential to the synchronization service) declares the account type and ContentProvider authority to the sync manager.
    • This sample demosntrates how to write your own sync adapters
      • By extending the AbstractThreadedSyncAdapter abstract class.
      • Implementing the onPerformSync() method, which gets called whenever the sync manager issues a sync operation for that sync adapter.


* Reference
- ContactsContract | Android Developers
- ContactsContract.Contacts | Android Developers
- Android联系人数据库 | Android开发网

[Web] session ID with browser

若要分開 session ID
  • 最快的處理方式
    • 啟動兩個不同的瀏覽器。
  • 如果要同個瀏覽器,則
    • IE 可以建立捷徑 "C:\Program Files\Internet Explorer\iexplore.exe" -nomerge
    • FF 可以 "C:\Program Files\Mozilla Firefox\firefox.exe" -p -no-remote


下面把幾個常用瀏覽器的 session 管理方式列一下:
  • IE
    • IE6
      • session 不共享。
    • IE7
      • 不同 window,session 不共享。
      • 同一個 window 不同 tab ,session 共享。
    • IE8
      • 不同 window,session 共享。
      • 同一個 window 不同 tab,session 共享。
  • Firefox
    • session 共享。
  • Chrome
    • session共享。

2011年11月6日 星期日

[SQL] COALESCE and NVL

[COALESCE]
  • A part of ANSI-92 standard.
  • 回傳第一個不為 null 的值。

COALESCE(expression1,...n) 等於下列 CASE 運算式:
CASE
    WHEN (expression1 IS NOT NULL) THEN expression1
    WHEN (expression2 IS NOT NULL) THEN expression2
    ...
    ELSE expressionN
END


[NVL]
  • NVL(expression1,expression2)
    • expression1 ? expression1 : expression2
    • 若 expression1 不為 null 則回傳 expression1,若為 null 則回傳 expression。
  • Is Oracle specific, it was introduced in 80's before there were any standards.

In case of two values, they are synonyms. However, they are implemented differently.



* Reference
- Oracle Differences between NVL and Coalesce
- COALESCE (Transact-SQL)
- Coalesce Function
SQL 設計小技巧--用 ISNULL 或 NVL 達到選擇性條件的下法
- PL/SQL NVL(轉換null),如何取代Null?

[UML] Relationship

[一般化關係] (Generalization)
  • 透過類別定義屬性和操作,所以日後針對同類別的一群物件,就可以使用相同的方式對待它們。
  • 不過有時候,這些物件並不是全然相同,可能大部分的屬性和操作相同,但是少部分的屬性和操作卻不同。在這種情況下,類別之間的一般化關係就派上用場了。
  • 在一般化的過程中,我們將特殊類別裡頭通用的屬性和操作記錄到一般類別裡,因此透過一般化關係,特殊類別可以繼承(Inheritance)一般類別裡的通用屬性與操作。
    • 由於特殊類別透過繼承,可以直接重用(Reuse)一般類別裡的屬性、操作和方法,節省開發成本。
    • 變動發生需要改版時,也只需要改版一般類別,節省維護成本。

[結合關係] (Association)
  • 類別之間最常見的關係。
  • 可以透過檢核下列兩項要件,判斷是否採用結合關係:
    • 在企業領域的專業概念裡,兩種物件之間有一種固定不變且需要保存的靜態關係。
    • 在資訊化時,系統會用到這些靜態關係,而且必須將它們存到資料庫

[聚合關係] (Aggregation)
  • 是一種特殊的結合關係。
  • 繼承了結合關係的特質,而且還獨有「整體-部分」(Whole-Part) 的特質。
  • 可以透過檢核下列三項要件,判斷是否採用聚合關係:
    • 在企業領域的專業概念裡,兩種物件之間有一種固定不變且需要保存的靜態關係。(繼承自結合關係的要件)
    • 在資訊化時,系統會用到這些靜態關係,而且必須將它們存到資料庫。(繼承自結合關係的要件)
    • 在企業領域的專業概念裡,兩種物件之間有Whole-Part的靜態關係。(聚合關係獨有的要件)

[組合關係] (Composition)
  • 是一種特殊的聚合關係。
  • 繼承了結合關係,以及聚合關係的「整體-部分」(Whole-Part) 的特質,還獨有全然擁有Part物件的特質。(Existence-Part)
  • 可以透過檢核下列四項要件,判斷是否採用組合關係:
    • 在企業領域的專業概念裡,兩種物件之間有一種固定不變且需要保存的靜態關係。(繼承自結合關係的要件)
    • 在資訊化時,系統會用到這些靜態關係,而且必須將它們存到資料庫。(繼承自結合關係的要件)
    • 在企業領域的專業概念裡,兩種物件之間有Whole-Part的靜態關係。(繼承自聚合關係的要件)
    • Part物件只能連結一個Whole物件,且Whole物件被註銷(Destroy)時,Part物件必須一塊被註銷。(組合關係獨有的要件)

Summary
Association -> Aggregation -> Composition


* Reference
- UML Blog: 1.4.6-一般化關係
- UML Blog: 1.4.7-結合關係
- UML Blog: 1.4.8-聚合關係
- UML Blog: 1.4.9-組合關係

[Security] OAuth and OpenId

[OAuth]
  • 可在保護密碼的條件下,讓使用者自己控制另一個網站向本站查詢其個人資料。
  • Consumer 可以透過 OAuth 從 Provider 取得 User 的使用偏好。 User 將被導引回 Provider 的頁面,確認他是否要讓 Consumer 取得他的使用偏好。 這個確認動作,可能做一次後就會被記住而不會再問,也可能每次都問。這由 Provider 的設計決定,讓 User 選擇。
  • ex: Android AccountManager。

[OpenId]
  • 可以用同一個帳號,就可以登入另一個網站(若其支援的話)。
  • User 在登入 Consumer 網站時,使用者輸入的 OpenID 不一定長成什麼樣子(往往是 URL 形式)。 於是 Consumer 網站就會導引 User 回到 Provider 的登入頁面,完成輸入密碼的動作之後,再回到 Consumer 的使用頁面。
  • Requester 使用 OpenID provider 並不需要特定簽約。
  • 只要網站可以接受 Provider 的 OpenID,就可以使用 OpenID 登入,不需要簽約。

Summary
  • 都不需要有 User 的帳號密碼。
  • OAuth 是能向 Provider 取得 User 使用偏好; OpenId 是能透過 Provider 登入。


SSO
  • 旗下的所有網路服務只需要一組帳號密碼就能通行無阻。
  • 這樣的整合往往只能在同一家網路公司或是像企業內部的資訊系統才有機會作到。
  • ex: Facebook。


* Reference
- 認識 OpenID
- 用案例解釋 OpenID 與 OAuth 的使用情境

[Android] Unexpected error while launching logcat

Error Message


Unexpected error while launching logcat. Try reselecting the device.]EOF
Failed to install test.apk on device 'emulator-5554': EOF


log is too large to explode logcat buffer?


[Android] INVITE_CONTACT: No activity

Error Message

Loaded meta-data for 2 account types, 1 accounts in 111ms(wall) 46ms(cpu)
START {act=com.android.contacts.action.INVITE_CONTACT dat=content://com.android.contacts/contacts/lookup/0r1-1C1C1C1E/1 cmp=com.example.android.samplesync/.activities.InviteContactActivity} from pid 324
No activity found for intent: Intent { act=com.android.contacts.action.INVITE_CONTACT dat=content://com.android.contacts/contacts/lookup/0r1-1C1C1C1E/1 cmp=com.example.android.samplesync/.activities.InviteContactActivity }


press "Connection" -> "SampleSyncAdapter" on Android4.0 emulator contact app

[Android] Android Developer Tool (ADT) - Resources compilation

[Definition]
  • A plugin for Eclipse that provides a suite of tools that are integrated with the Eclipse IDE.
  • It can integrated Android project creation, building, packaging, installation, and debugging.
    • Add components based on the Android Framework API.
      • Java programming language and XML editors
      • Create an application UI.
    • SDK Tools integration
      • Debug your applications using the Android SDK tools.
    • Export signed (or unsigned) .apk files in order to distribute your application.

[ADT 14.0.0 (October 2011)]
  • Added webcam support to Android 4.0 or later platforms to emulate rear-facing cameras
  • Resource compilation
    • Changed how library projects are built in Eclipse.
      • You need SDK Tools r14 or newer to use the new library project feature that generates each library project into its own JAR file.
    • Improved incremental builds so that resource compilation runs less frequently.
    • Builds no longer run when you edit strings or layouts (unless you add a new id)
    • No longer run once for each library project.
    • No longer happens for normal save operations. It only happens when running or debugging (the build option that lets you disable the packaging step, which was introduced in ADT 12, is now on by default.)
  • Added the "Go to Matching" (Ctrl-Shift-P) feature, which lets you jump between opening and closing tags in XML files.

[Library project]
  • Source code in the library project can access its own resources through its R class.
  • Can reference other library projects and can import an external library (JAR) in the normal way.
  • Differs from an standard Android application project:
    • Cannot compile it directly to its own .apk and run it on an Android device.
    • Can not include raw assets.
    • Cannot export the library project to a self-contained JAR file, as you would do for a true library. (Changed in r14?)
      • Instead, you must compile the library indirectly, by referencing the library in the dependent application and building that application.
Usage
  • When you build an application that depends on a library project, the SDK tools compile the library into a temporary JAR file and uses it in the main project, then uses the result to generate the .apk. 
    • ADT creates virtual source folders linking to the library source folders.
    • Because library dependencies are controlled by the content of project.properties (formerly default.properties), ADT must dynamically add and remove these virtual source folders whenever a project is opened and closed.
    • Source-based library prevents distribution of re-usable components(?) unless one is willing to include the source code.
  • In cases...
    • A resource ID is defined in both the application and the library
      • The tools ensure that the resource declared in the application gets priority and that the resource in the library project is not compiled into the application .apk. (or the library with highest priority, and discard the other resource?)
      • This gives your application the flexibility to either use or redefine any resource behaviors or values that are defined in any library.
      • Be aware that common resource IDs are likely to be defined in more than one project and will be merged, with the resource from the application or highest-priority library taking precedence.
    • When two libraries referenced from an application define the same resource ID
      • The tools select the resource from the library with higher priority and discard the other.
  • At build time, the libraries are merged with the application one at a time, starting from the lowest priority to the highest.

Previously (< r14)
Library projects were handled as extra resource and source code folders to be used when compiling the resources and the application’s source respectively. While this worked fine for most cases, there were two issues.
  1. Developers asked us for the ability to distribute a library as a single jar file that included both compiled code and resources. The nature of Android resources, with their compiled IDs prevented this.
  2. The implementation of the library projects was extremely fragile in Eclipse. Adding extra source folders outside of the project folders is non-trivial when it needs to be handled automatically, in a way that doesn’t expose a user’s local installation path (which is required for people working in teams through a source control system such as SVN or git).
To fix all of these issues, we have decided to move to library projects generating a jar file that is directly used by other projects.

The first impact of this change
  • Had to change the way resource IDs are generated.
  • The main projects and all required libraries
    • The resource IDs will still be generated as final static int in the final R class generated in the main project with the resources.
  • The new library project
    • The resource IDs generated by libraries to be non final.
  • Note
    • In a regular projects
      • Resource IDs are generated as final static int. 
      • These constants then get inlined into the classes that use them. 
      • This means the compiled classes do not access the values stored in, say, R.layout.myui, but instead directly embed the value 0x000042.
    • To make the compiled classes not embed this value and instead access it from the R classes, library project will generate the resources IDs as static int only.
    • This prevents the Java compiler from inlining the values in the library code
  • Therefore prevents usage of the switch statement in the library code.
    • Eclipse provides a refactoring action to convert from switch statements to if/else.

Summary
Library projects containing the jar file directly instead of the source code.(Support in r15)

Related
[Android] export android project 為 jar 檔


By the way
  • /res/xml
    • 存儲xml格式的文件。
    • 會被編譯成二進制格式放到最終的apk裡。
    • 可以通過R類來訪問這裡的文件,並且解析裡面的內容。
  • /res/raw
    • 這裡的文件會原封不動的存儲到設備上。
    • 不會被編譯為二進制形式,訪問的方式也是通過R類。
  • /assets
    • 不會被編譯成二進制形式之外。
    • 訪問方式是通過文件名,而不是資源ID。
    • 可以在這裡任意的建立子目錄,而/res目錄中的資源文件是不能自行建立子目錄的。

Pending Study Issues
  • The detail about eclipse export java/android jar.


* Reference
- Android Application, Android Libraries and Jar Libraries **** Although it describes the structure before r14 but it is still very worth to read.
- ADT Plugin for Eclipse | Android Developers
- Android Developer Tools
- Build changes in revision 14 - Android Tools Project Site ***
- SDK Tools
- Library Projects
Android Developers Blog: Changes to Library Projects in Android SDK Tools, r14 ***
Managing Projects | Android Developers **
- Building and Running *
- Developing In Eclipse, with ADT
- I am Happy Android,3C: android /res/xml /res/raw /assets

2011年11月3日 星期四

[Android] SecurityException: Neither user 10043 nor current process has android.permission.READ_PROFILE.

Error Message

FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{.ContactProfileTestActivity}: java.lang.SecurityException: Neither user 10043 nor current process has android.permission.READ_PROFILE.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
at android.app.ActivityThread.access$600(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4340)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.SecurityException: Neither user 10043 nor current process has android.permission.READ_PROFILE.
at android.os.Parcel.readException(Parcel.java:1327)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:181)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:358)
at android.content.ContentResolver.query(ContentResolver.java:304)
at com.yellow.contact.ContactProfileTestActivity.getProfile(ContactProfileTestActivity.java:30)
at com.yellow.contact.ContactProfileTestActivity.onCreate(ContactProfileTestActivity.java:24)
at android.app.Activity.performCreate(Activity.java:4465)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
... 11 more


Occurred when query ME profile...

2011年11月1日 星期二

[Java] Abstract Class Purpose

abstract 就是不允許被 new 出來直接用的東西。


[Android] Start Activity in Service or Content Provider

* 可以在 Service 或 Content Provider 中開啟 Activity,但 Intent 中必須加入 Intent.FLAG_ACTIVITY_NEW_TASK Flag 才行,否則會出現以下錯誤。


* In Service
   ......
java.lang.RuntimeException: Unable to start service com.yellow.android.service.EmptyService@444bde30 with Intent { cmp=TestService}: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
   ......
Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ApplicationContext.startActivity(ApplicationContext.java:560)
   ......


* In Content Provider
   ......
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ApplicationContext.startActivity(ApplicationContext.java:560)
   ......


* Pending Issues
  • Why must sartActivity with new task?
  • Different tasks in an application will have any effects?


Related