Wednesday, July 6, 2022

More Android Fun

android robot icon

In the post, Android Fun,  I described some of the issues I went through converting my first App to API30.  I am almost done converting the next two Apps.  While some of the issues were the same, a whole host of other issues and errors happened with these.  Here is a recap of my progress so far.

As I commented in Embarcadero's public JIRA, RSP-35804, I had problems converting existing Android Apps.  For those who do not have access, here is the text.

" I came here from RSP-35919 (Android 12 - Bluetooth LE discover devices - access to location). I was updating a BTLE app from API 23 to API 30 for the Aug 2022 deadline. I started with Delphi 11.1 and had the same issue. The APP would fail during initialization. I backed up to 10.3.3 and API 23 and verified it still worked. Then moved through the API levels one at a time, changing to 10.4.2 when needed, then 11.0 and finally 11.1 and API 30. Made the changes needed at each API level and compiler version. (Note: when the permission types changed in 11.0, I created conditional compiler code so I could easily go back and forth between 10.4.2 and 11.0). It now works. What I changed that allowed it to work on 11.1 and API 30, I am not sure. Tested on Android 7,8,11, and 12. Both 32 and 64bit. Again, I am only doing BTLE device discovery, not location."

I have now converted my second App which was a little more complex than the first one.  I had similar but different problems.  At one point I had an error in  FMX.Platform.Android, TPlatformAndroid.Create, on the line Activity.addListener(FActivityListener) which caused the App to hang with no Android error message,  along with the location error RSP_35804 and a few others.  I used the same basic process I describe above.  What I am beginning to think is that the issue is a combination of the Android Manifest, library update (as described here) and carefully reviewing the project deployment page.  Here is the closest process I have to a conversion checklist.

  • At every API level change, delete both the Android Manifest Template and the Android Manifest.  Start fresh.  If you manually change this, make sure you save your changes elsewhere so you can update these later.  Since I had not updated in a while, I had to start with 10.3.3, you start with where it worked last.
  • Make sure you clean the project before Building.  Then go look at the directory and see what is left.  You might want to delete whatever is left, unless it is a file that you specifically need to be included.  (See the next item and CLASSES.DEX)
  • Carefully review the Project Deployment Options Page (PROJECT->Deployment) in all configurations (32 bit, 64 bit, DEBUG and RELEASE).  This is especially true when going to version 11.x.  The CLASSES.DEX file moved from the DEBUG/RELEASE directory to a <projectname>.classes sub-directory.  Going back and forth between 11.x and 10.4.2 can orphan the CLASSES.DEX and I think this is causing issues.  (What I dont like is you cannot delete anything on this page that the IDE inserted.  So if you have been carrying this project since 10.0 or before there can be a lot of excess baggage.)
  • When you get to version 11.x, it is imperative that you update the libraries as described in the link above for every project.  This is not an IDE global update, but appears to be a project specific update.

The better approach may be to start the project fresh when moving to 11.x.  I have not done this, so I do not know what fun things this idea can bring. 

 

Tuesday, June 28, 2022

Bricks by the Bay - Recap

 

The first live Bricks by the Bay since 2019 (@bricksbythebay_official).  It was the same and then again it was different.  The venue was the same as the last few times, so that was the same.  All the MOCs were in the center of the ball room and the vendors were around the sides. 


The MOCs were arranged by theme.  Unfortunately we were busier than in times past.  So we were not able to take as many pictures. (Actually my free time was spent in the two brick piles searching for parts.  I should have been taking pictures, but the draw of the brick pile was just to strong to overcome.)  




The one I should have taken pictures of was an interesting "mixed media" presentation.  To recreate a lot of the StarWars scenes, Dagobah, Ewoks, etc, they used a form of Japanese Bonsai trees with extended above ground root structures.  These roots were then woven into the MOC for an extremely realistic effect.  This is something that could not be done in pure LEGO.

The attendance was of reasonable size given the circumstances.  Not as big as in the previous years.  Traffic was much better on Saturday than it was on Sunday, which is fairly typical of these events. We would have like to see more people, but the ones that were there were highly motivated.  There was a lot of interest in what we were working on.  The softwear side had lots more interest than in the past. While our basic controller and USB power devices always draw lots of questions, there was a lot of interest in the Lighting effects we were showing.  Besides our MOC display, we had a demo of the new light controller.  Here is a video of it running the demo script.

One of the most visited vendors are those with bulk LEGO or brick piles.  Placed on a table or on the floor, people of all ages will rake through the Bricks looking for that one piece they need, select colors to fill out their inventory or just pick out every part they can find.  While the competition for select parts can be fierce, it is always a congenial competition.  I think the Bricks just brings out the best in people.  It does not even come close to Big Box stores on Black Friday.

 

Here is a quick video of the display we used to attract people to the table.I only brought three sections, the new Main Section that I first showed in Omaha in April, the Vertical Generator, the Space Port and the areas behind the cliffs.  These areas behind the cliffs are yet to be finished and are only the beginnings of a larger space that will exist behind the cliffs.


As I indicated earlier, I did spend a lot of time searching for parts in the brick piles.  Here is my collection prior to some washing and sanitizing.


 That is it for now, looking forward to next year.




 

 

 

 

Monday, June 20, 2022

Countdown to Bricks By The Bay 2022

 

 

Date:  June 23 through June 26

Location: Santa Clara Convention Center

Website: Bricks By The Bay

Social Media: @bricksbythebay, @bricksbythebay_official #bricksbythebay 

Our Location:  Across from the Great Ball Contraptions & near the Lego Masters

Bricks by the Bay is this weekend.  Here is what we will showing at the convention.

  • Brick Power.  We have a limited number of our USB based power converters for Lego Motors (Power Functions)
  • Brick Controller.  We have a limited number of the our USB/Bluetooth controllers with 4 motor channels and 4 LED channels.
  • LED Lighting.  New LED lights that fit on a 1x1 or 1x2 plate/tile.
  • LED Power Distribution.  Simple device that takes USB power and provides punch down type connections.
  • LED Lighting Controller.  Expands the number of LED channels to 15 for those MOCs that need multiple LED controls.
  • Brick Shirts and Softwear.  New brick shirt designs for young and old.  Plus other softwear that we are famous for.
  • Minifigs.  Assorted Minifigs that were acquired over the years.

Brick Power and Brick Controller


 


My biggest problem has been the current chip shortage.  Finding electronic parts has become an all day task.  Most are available in Asia at the "brokers", but it is not uncommon to see anywhere from 10 to 100 times cost increase over normal MSRP.  As an example, an item that sells for $60 cannot afford to pay $55 for a part that was $1.24.   I still have inventory of these two items and they will be aggressively priced for the convention.

LED Lighting

I have always wanted a simple and consistent way to mount LEDs both in my MOCs and for my HO train layout.  These two products get me closer to the goal.  One is the size of a 1x2 plate/tile and the other is the size of a 1x1 plate/tile.  You can glue these onto a plate for mounting on a ceiling or a tile when you want up lighting.  Right now the product only comes with white LEDs, either a simple single Dome type LED or a larger flood light type.  Custom colors will be available, with a small charge.  I have not priced these yet, but they will be well under $5 each, depending on the size and LED.  The website will have a list of vendors where you can buy wire.  Each board provides a rather large pad to solder the wires onto.  We will not be providing wire on the standard product.  We don't know what you need.  The Website list a few places where you can get wire and what the difficulty level is with each.  Look here for more information.

LED Power Distribution

When you don't need the fancy lighting effects and all you need is for the lights to be on, this is the best answer.  This device takes in USB power and then distributes to either punch down connectors or small connectors that are popular with other 3rd party LED vendors.  What I do is solder a piece of solid 24-26 gauge wire to the ends of the small wires from the LEDs and then place these stiff wires in the punch down connector.  Depending on the USB power source, you can power over 25 LEDs easily with this.

LED Lighting Controller

 

At a minimum, I hope to demonstrate this at the convention.  There is still a lot of work to do on this, so it is iffy right now.  This is 48 x 64mm or the size of a 6x8 plate.

Brick Shirts and Softwear

We will have a new selection of of shirts and other softwear items. These include

Snack Mats


Bowl Cozy


Brick Themed Shirts for Adults and Children





Minifigs

We have been downsizing everything.  Long story, so the younger ones have decided to divest some of there childhood collections.  These Minifigs are the ones they are willing to part with.  There will be some good deals.