Following Setting up a Device for Developement
I have a T-Mobile, which I couldn't find on the list of "USB Vendor IDs", so I used the lsusb to see that I have a "Bus 002 Device 003: ID 0bb4:0c02 High Tech Computer Corp. Dream / ADP1 / G1 Phone (Debug)". So for T-Mobile, it's the same as HTC: SYSFS{idVendor}=="0bb4". (I didn't know T-Mobile is related to HTC)
android-sdk-linux_x86/platform-tools$ ./adb devices
List of devices attached
HT93LLZ01057 device
HT93LLZ01057 device
Then I clicked on "Run" and saw in the counsole:
[2011-05-01 16:30:05 - Apg] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=org.thialfihar.android.apg/.MainActivity }
[2011-05-01 16:30:20 - 6857_proj] Success!
[2011-05-01 16:30:20 - 6857_proj] Starting activity org.thialfihar.android.apg.MainActivity on device HT93LLZ01057
[2011-05-01 16:30:23 - 6857_proj] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=org.thialfihar.android.apg/.MainActivity }
Yay! I saw APG on my Phone! :D
========
get ZXing to work:
Pretty easy actually. Just press "Run" and everything is figured out automatically. Even though my project is for Android 2.3.1 and my phone is 1.6, things worked out! I didn't change anything to the project code! Did NOT add '<application android:debuggable="true" ' in AndroidManifest.xml.
Console message:
[2011-05-02 01:13:07 - Zxing2] ------------------------------ [2011-05-02 01:13:07 - Zxing2] Android Launch! [2011-05-02 01:13:07 - Zxing2] adb is running normally. [2011-05-02 01:13:07 - Zxing2] Performing com.google.zxing.client.android.CaptureActivity activity launch [2011-05-02 01:13:07 - Zxing2] Automatic Target Mode: using device 'HT93LLZ01057' [2011-05-02 01:13:07 - Zxing2] Uploading Zxing2.apk onto device 'HT93LLZ01057' [2011-05-02 01:13:08 - Zxing2] Installing Zxing2.apk... [2011-05-02 01:13:14 - Zxing2] Success! [2011-05-02 01:13:15 - Zxing2] Starting activity com.google.zxing.client.android.CaptureActivity on device HT93LLZ01057 [2011-05-02 01:13:18 - Zxing2] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.google.zxing.client.android/.CaptureActivity }I did NOT even do the "Run on Android" part of http://code.google.com/p/zxing/wiki/GettingStarted.
Failed attempts at ZXing, I was being too cautious and hit some deadends
I think I should start a new ZXing that is compatible with my 1.6 phone.
If I choose version 1.6, I'll have 2 problems:
1. "R cannot be resolved" because gen > > R.java is not created from Project > clean
2. AndroidManifest.xml gives a "error: No resource identifier found for attribute 'installLocation' in package 'android'" of this line: <manifest xmlns:android="http://schemas.android.com/apk/res/android"
Both of these problems can be resolved if I upgrade the version to 2.3.1 by right clicking on the project name "Properties" and choose 2.3.1.
Might be helpful:
http://stackoverflow.com/questions/4782543/solved-integration-zxing-library-directly-into-my-android-application
"Run on Android" of http://code.google.com/p/zxing/wiki/GettingStarted ... I never had to do it.
If I choose version 1.6, I'll have 2 problems:
1. "R cannot be resolved" because gen > > R.java is not created from Project > clean
2. AndroidManifest.xml gives a "error: No resource identifier found for attribute 'installLocation' in package 'android'" of this line: <manifest xmlns:android="http://schemas.android.com/apk/res/android"
Both of these problems can be resolved if I upgrade the version to 2.3.1 by right clicking on the project name "Properties" and choose 2.3.1.
Might be helpful:
http://stackoverflow.com/questions/4782543/solved-integration-zxing-library-directly-into-my-android-application
"Run on Android" of http://code.google.com/p/zxing/wiki/GettingStarted ... I never had to do it.
No comments:
Post a Comment