Share My Creation Hubble Images

alfcen

Well-Known Member
Licensed User
With Basic4android, Erel and his company have developed an invaluable environment for Android programmers eliminating need for learning Eclipse and Java. During two days of getting familiar with the concept, I realized the tremendous work.

Please allow me to share my first attempt, an app which loads a dozen Hubble images in a ListView. Upon tap on a thumbnail, a larger image will be displayed. Tap on the menu to download an ever larger image in the
web browser where you can resize and pan at will. Use WiFi to escape 3G packet fees. The app demonstrates the use of a ListView, ImageView and dual-Activity screens.

The source is included. Please feel free to comment if you have any suggestions regarding code optimization.

My Phone is a Sharp IS03 with a 640 x 960 pixels screen, obviously not to the Android standard. Hope it shows correct on your device anyway.

The next step is to swap portrait/landscape modes as the phone is turned around. Let me know if you have done it already.

Cheers
Robert
 

Attachments

Last edited:

alfcen

Well-Known Member
Licensed User
Geez, you are fast.
Sorry, I used the Export function without loading the images in the designer.
Please try again.
 

alfcen

Well-Known Member
Licensed User
Core Lib updated and font sizes doubled in the source. Looks well balanced.

B4X:
ListView1.TwoLinesAndBitmap.Label.TextSize = 20
ListView1.TwoLinesAndBitmap.SecondLabel.TextSize = 16
How does that look on your device?
 

alfcen

Well-Known Member
Licensed User
Exactly as it looks on mine. That's what I call team work:icon_clap: Thanks a lot, Erel.
 

agraham

Expert
Licensed User
It works fine on my 480 x 800 scale = 1.5 Orange San Francisco phone and on my cheap chinese 7" Eken M001 480 x 800 scale = 1 tablet.

Run it from the IDE with the device connected and look at the unfiltered LogCat output and you may see the details of an exception that will tell you where the problem is occurring.
 

alfcen

Well-Known Member
Licensed User
Thanks, Andrew, for your assistance.
The problem could be native to the tablet. If not, i'd be grateful for Log() data.

Attached, please find an update:

1. Supports landscape mode
2. Views scaled dynamically to accommodate most screen dimensions (though I can't test it)
3. Large images can be viewed, panned and sized online in Erel's superb webview
4. BGM (*.mp3 files only) can be selected and played if located in the SD root

The app is demo work leaving much room for optimization. If you wish to add more Hubble images I recommend to employ an SQLite database.

Please use or abuse at your own risk.
 

Attachments

nfordbscndrd

Well-Known Member
Licensed User
Same deal. My A70 reboots while the app is being installed on it (doing a compile-run to it) then after another minute or so, I get a message that it has timed out.

Nothing shows up in the LogCat tab (Filter unchecked). Would the LogCat have anything if the app never got installed?
 

agraham

Expert
Licensed User
If it hasn't installed before, or been manually uninstalled, you should see this in LogCat.
D/PackageParser( 1179* 1225): Scanning package: /data/app/vmdl38062.tmp
I/PackageManager( 1179* 1225): /data/app/vmdl38062.tmp changed; unpacking
I/wpa_supplicant( 1260* 1260): H->W DRIVER RSSI-APPROX
I/wpa_supplicant( 1260* 1260): H->W DRIVER LINKSPEED
D/PackageManager( 1179* 1225): New package installed in /data/app/requio.com_nz_177_jp.apk
 

nfordbscndrd

Well-Known Member
Licensed User
Well, I don't know what I'm doing wrong, but I double-click the Main.b4a file to open it in B4A, then I press F5 to compile it to the A70.

It gets to "Installing file to device." and after 30 seconds or so, the A70 reboots. Before it finished rebooting, B4A says "Process is running longer than expected. Do you want to cancel it?"

I say No and it keeps trying to install it, but finally says:
"Process timed out.
Restarting ADB Server may solve this problem.
Tools - Restart ADB server. Device serial: A70-579C0001-9FF8000-015DB7D4
-???????"

I click "Close", click on LogCat tab, uncheck Filter, and there is nothing showing in the LogCat.

All the stuff you listed starting with "Scanning package" would not appear if the package never got installed to the A70, right?
 

agraham

Expert
Licensed User
I click "Close", click on LogCat tab, uncheck Filter, and there is nothing showing in the LogCat.?
You need to have unchecked Filter and Connected LogCat before you compile. Press Clear as you start to compile and possibly yank out the USB connection as soon as it reboots to keep the LogCat you have captured.
 

nfordbscndrd

Well-Known Member
Licensed User
I clicked Clear and immediately hit F5 to compile. When it rebooted, I pulled the plug. I got what looks like a couple of hundred lines of Logs. From what I can tell, this is a relevant part:

 

alfcen

Well-Known Member
Licensed User
Not sure how to decypher the log, but the package name is

requio.com_nz_177_jp.hubble

not

requio.com_nz_177_jp.hubble-1

Further, "unmount attempt failed"... is the tablet attempting to install to SD?
 

agraham

Expert
Licensed User
Top