Monday, 6 August 2012

Embedding Multiple Images for App

 




Ok, so these are my photos this time. I took them a long time ago when we actually used film in cameras. Being uploads rather than links, I wonder how the app will treat them. Also since they are all before any of the text, I wonder if it will use just the first image as the "title thumbnail" or whether it will have problems with that too!

(Update: The result of this post's test shows only the first image displays in the app. You would have to click on the "See original story" at the bottom of the post in the app to get all of the image content visible when it loads up the full article in the browser. If that is the case, I wonder whether there is a way to control also how much of the text gets displayed).

(Another Update:  So I thought maybe the solution is to embed links to the images and see what happens. At least if it doesn't show it "inline" then the link is available to click and view? Try them above and see).

Ok one more check... make image tag less complicated and see what happens:


Multiple Image Test

This post attempts to answer the question, will the app version of this blog reader (like the "Doctor Braun" app made by Blackberry App Generator) be able to display more than just the "title image" in each blog post? Well I've attached a title image already which shows some thumbnails. I will include several more images and see if they show up in the app. Obviously the web version has no issues, as you can see multiple images.

By the way, these are not my own images. They were found using a Google image search. They appear here below, all centered:

 
 

Above should appear 3 images, centered. Now to review the app-displayed version of this page and see whether these additional embedded images show up!


(Follow-up note:   Aha! The app version doesn't display these additional images... Now to debug and find out why that is. Could it be that they have to be all at the beginning of the text, or does the app ignore all future embedded image links?)



Blog Automatically Launches AppWorld


So I've added my app address to my blog in the last post, and now each time I view the blog directly in my phone's browser it launches into AppWorld! Not sure if this is just because it is finding the address near the top of the page, or anywhere on the page. The Blackberry browser seems to scan the page and if it finds an address formatted for Blackberry AppWorld, it seems to direct it.

Fortunately, while the AppWorld app loads, the actual page still loads fully in the browser. However it is truly an annoyance since if I ever put an appworld address anywhere on my blog and want to open the site on my phone, I do not want this to happen. This post is therefore also a test to see if the problem goes away. If not, I will have to remove or obscure the link address somehow so it doesn't do it! Let's see what happens!

Sunday, 5 August 2012

Doctor Braun App Now Available!

It was just a matter of 3 days from starting the app creation to submitting it, having it approved, and now available in App World! That is, thanks to the new Blackberry App Generator which makes creating an app extremely easy and requires no programming experience. If you are viewing this page through a browser and haven't yet downloaded the app directly to your blackberry, the link is here:

Download Doctor Braun App for Blackberry

I am getting some strange results, as far as the link above goes. Initially it was not showing up as a link. However, after testing it again it is working on both the phone app and the playbook. However, the image at the bottom of this blog entry is not showing up in the app. Only the first image is showing up. I need to be careful then how many images to put in.

The timeline for creating the app? Well, on Thursday, August 2nd I received an email from Blackberry App Generator saying I have access to the private beta program. I went on the website, created my app by uploading a couple of images (icon and banner logo) and selecting up to 4 resources (feeds, youtube links, twitter, etc) to populate the app with content. By Friday, August 3rd my app already appeared in my Blackberry Vendor Portal account, allowing me to edit some things if needed. Saturday passed, then Sunday night I received notification my app was approved! Awesome!

Next app coming down the pipeline... Raspberry Pi on Blackberry app. I have made all necessary emails to the people involved with the content feeds to grant me permission to use them in the app. They have been extremely supportive and I am happy to make the app available freely. Stay tuned for that one!

Finally, to test out the app and how it handles images, I have decided to link another image to this post and see what happens. I am under the impression that the app will pick out the first image embedded in the post, usually which I include right at the very top as the first entry (which I right-justify). We will find out! Here is a link and image to more about the Blackberry App Generator.




Friday, 3 August 2012

Blackberry Blogging

Today I am learning how to blog from my phone directly. Yes, no computer at all! After a bit of experimenting, I learned that it is best to use HTML mode and upload or attach your image first. I usually set it to right justification.

This post is being written entirely using the phone only. If this works ok and is relatively easy, in the future it will be a lot easier to do! Yay! I can already post twitter messages from the phone, but I have yet to see a dedicated Blogger app for the Blackberry. Such an app wouldn't be needed if I am able to successfully use Blogger's mobile web interface directly!

Ok so there are some glitches. I have to rely on the autosave and then go back to drafts and publish once it is a saved draft!

Thursday, 2 August 2012

Blackberry App Generator

I have been invited to use the beta-version of the Blackberry App Generator, and I must say it is really neat! The wizard guides you through the process easily. It is a relatively straight-forward RSS newsfeed reader but has other options including reading other types of blogging sites, linking of YouTube channels, Facebook and photo channels!

Support currently is only for 4 different links. That may not be sufficient for everyone, but for some basic businesses which have a Facebook page, Blog, Twitter or Photo page, it is enough to put all resources under one app!

I have made an app for myself "Doctor Braun" and plan on making another for the Raspberry Pi... making it a truly "Raspberry on a Blackberry" experience (hence the photo tagged to this blog entry).  Stay tuned for some more apps, now that they are so much easier to create!

Tuesday, 10 July 2012

RasPi GPIO outputs

Today I decided to give my RasPi GPIO a try. I picked up a breadboard kit ($12.99) and 3 packages of 5 LEDs to (red, green, yellow) each $1.00 and 2 packs of 10 resistors (120 ohm) also each $1.00. The LEDs are 2.1-2.8 voltage drop, leaving about 1.2 volt remaining when being supplied from the 3.3v source of the RasPi (3.3-2.1v assuming minimum voltage drop). Doing the math, in order to keep my current around 10 mA we do V=IR, so 1.2v/0.010A = 120 ohm.

First thing was to install the Python compiler. I didn't do this at first and when trying to compile the RasPi GPIO library I got an error (said it couldn't find Python.h)! Looking to the forums I found the following command to install Python:

sudo apt-get install python-dev

Then according to our trusty friends at TheMagPi issue #2 (page 13), I downloaded the RPi GPIO file using the Midori browser from http://pypi.python.org/pypi/RPi.GPIO (to my home/pi directory) and then used these commands to unzip, untar and then compile it (use sudo if needed):


gunzip RPi.GPIO-0.3.0a.tar.gz
tar -xvf RPi.GPIO-0.3.0a.tar
cd RPi.GPIO-0.3.0a
sudo python setup.py install

Then after a few minutes we have it all installed. Then using nano editor "nano mytest.py", I created my first python program to turn on the GPIO 11 as follows:


#!/usr/bin/python
import time
import RPi.GPIO as GPIO
# to use Raspberry Pi board pin numbers
GPIO.setmode(GPIO.BOARD)

# set up the GPIO channels - one output
GPIO.setup(11, GPIO.OUT)
count = 0
while (count < 10):
print "count", count
GPIO.output(11, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(11, GPIO.LOW)
time.sleep(0.5)
count = count + 1

Running the program was basically just running "sudo python mytest.py". I hooked up the GPIO 11 pin 11 from my RasPi to the + rail on my breadboard, and had a resistor and LED in series, then ground to pin 6. When the GPIO is set to high it output 3.3v which was enough to turn on the LED. Success!