More info...
I had given up on the Fire when Amazon stopped communicating with me but recently someone asked why my app isn't available on the Fire and long story short, he agreed to do some testing for me.
Just to add to the very nice tutorial from Margret, here is some more info for those who are interested.
The tutorial mentions the actual screen dimensions (activity size) when taking into account the soft menus at the bottom, but the dimensions given are for full screen apps.
Full screen (taking into account the Fire's soft menu buttons at the bottom) as mentioned in the tutorial
Portrait: 1004h X 600w
Landscape: 580h X 1024w
NOT full screen (Fire's notification bar at the top is always visible and the app does NOT have a title bar visible)
Portrait: 924h X 600w
Landscape: 500h X 1024w
In the case of my app (no title bar but the notification bar is visible because it is not full screen), initially the Fire reported its height as 984. After rotating to landscape and back, it then showed the height as 924. If your app displays a title bar, then that will make the height even smaller. Off hand I don't know how many pixels high the title bar is.
As already mentioned in the tutorial, the Fire
does report an incorrect height on first run which can cause problems especially when layouts are tweaked in code based on the activity height and width.
Using the phone library (add to your project if it is not already added), you can determine whether or not the app is running on a Kindle Fire and if so, you can hard-code the activity height and width rather than reading the Activity.Height since it will be wrong on first run. Below is a message box I added to my app for the person to test:
Sub Activity_Create(FirstTime AsBoolean)
dim p as Phone
Msgbox ("Manufacturer: " & p.Manufacturer & CRLF & "Model: " & p.Model & CRLF & "Product: " & p.Product & CRLF & CRLF & "Activity Height = " & Activity.Height & CRLF & "Activity Width = " & Activity.Width, "Kindle Fire Test")
End Sub
The results of this is:
Manufacturer:
Amazon
Model:
Kindle Fire
Product:
blaze
Note that the lower-case b in blaze is not a typo. Above in bold is what is returned by the code provided.
I plan to detect the Fire and use a hard-coded height value when tweaking my layouts. Since I won't be using Activity.Height and Activity.Width to determine the screen dimensions, I
will compare those two as well to see which is bigger (in order to determine orientation) but will use hard-coded numbers for actual layout adjustments.
I just figured I'd pass this information along with the hope that it may help others.