Android Question What is the best AI for generating B4X apps?

rtek1000

Active Member
Licensed User
Longtime User
I heard that Mocha AI (getmocha.com) can create apps, and it would be very useful to be able to generate complete projects using the B4X platform, with the help of a dedicated AI.
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
I understand what you mean, but you could think of using AI as a bit like using templates
Yes, @LucaMs, you are completely correct, and I realise that only this week I answered a forum question and used ChatGPT to speed things up by doing a bit of the drudge-work. But, to use an bit of "English dialect", I am worried that this is the thin end of the wedge.
 
Upvote 0

Martin Fdez

Member
Licensed User
Longtime User
For the past couple of years I have been into web dev and now have an opportunity again to create b4a apps.

I am currently using ChatGPT Codex, Gemini 3.1 Pro, sometimes Kimi and sometimes the LLMArena to create this project below. So Im using Visual Code, Antrigravity, OpenCode, NotebookLLM as part of my tooling now.


Productivity wise from using AI (100%) and some of the web components for SithasoDaisy5 were created using AI, so why not.

Well, I only started two months ago or so to consider AI in my tools, so far not regretting it.

All the best.
For the past couple of years I have been into web dev and now have an opportunity again to create b4a apps.

I am currently using ChatGPT Codex, Gemini 3.1 Pro, sometimes Kimi and sometimes the LLMArena to create this project below. So Im using Visual Code, Antrigravity, OpenCode, NotebookLLM as part of my tooling now.


Productivity wise from using AI (100%) and some of the web components for SithasoDaisy5 were created using AI, so why not.

Well, I only started two months ago or so to consider AI in my tools, so far not regretting it.

All the best.

For the past couple of years I have been into web dev and now have an opportunity again to create b4a apps.

I am currently using ChatGPT Codex, Gemini 3.1 Pro, sometimes Kimi and sometimes the LLMArena to create this project below. So Im using Visual Code, Antrigravity, OpenCode, NotebookLLM as part of my tooling now.


Productivity wise from using AI (100%) and some of the web components for SithasoDaisy5 were created using AI, so why not.

Well, I only started two months ago or so to consider AI in my tools, so far not regretting it.

All the best.
My best results with IA and B4A, Antigravity with Gemini
 
Upvote 0

Tim Chapman

Active Member
Licensed User
Longtime User
In order to discuss which AI writes the best code, we have to distinguish between a subscription (like Gemini Pro for $20 per month-https://gemini.google.com/app) or pay by the token (like using OpenAI GPT5.2 via their Chat GUI-https://platform.openai.com/chat/edit?models=gpt-5.2-pro).

In my experience with Gemini as a monthly subscriber, it is lazy. It will make code if you have 3 files, such as your main module and two .bas files, or less quite competently.

Even if you use code bundle (https://www.b4x.com/android/forum/t...ects-as-a-single-json-for-ai-analysis.169835/) and make one file, Gemini will focus on the changes you want made and then forget to include parts of the rest of your code.

Codebundle is a huge help for making coding using AI much simpler. You give the code to the AI using codebundle and get back the modified parts of your code that you paste into the GUI. It works with Gemini, OpenAI, etc. You have to always be very aware of your code size as a minimum check to see if the AI broke your code. I always require the AI to give me the complete code of any Sub it modifies. Then I highlight the Sub I am going to replace. I check the last line number in the sub. I then paste the new code over it and see what the new last line of the Sub is. If I lost lines of code at all, I ask the AI if it lefts something out which is almost always acknowledges and then might give me accurate, correct code. When the AI replaces an entire module, I do likewise to make sure 100 lines of code did not disappear (which often happens). It is obvious to me that Google is making the AI focus on those that are paying by the token and not by the subscription. You pay for what you get.

So, I got tired of Gemini breaking my code and moved to OpenAI GPT5.2 Pro and have a key and pay by the token. It is extremely competent and has only made one small error in my experience. Sadly, OpenAI has a poorer interface which requires you to put the json file from codebundle into the code interpreter tool or the file search tool which requires a couple extra steps. It also doesn't give you output in a box with an icon you can copy to put the whole response on the clipboard like Gemini has. You have to select the code then copy it. But, I have found that Gemini's icon to copy the code is only half useful because Gemini will put more than one sub in the same code block. You then highlight the top Sub in your code and paste the Gemini code over it. You then have 3 Subs where you expected one with the resulting duplicate sub errors. So, you generally have to copy the sub and paste it into your code anyway.

I have a project with 10 files and about 6000 lines of code. When I put that into a json file using codebuilder and upload it to OpenAI, the AI handles it very well and codes competently. Gemini on the subscription plan just pukes. The coding is trash. I have not tried Gemini CLI where you pay by the token.

I always ask Gemini if it left anything out of my code. It almost always finds something it broke. It usually take 3 to 10 interactions to get it sorted out with Gemini which eats into your 100 Pro queries per day rapidly. This is very obviously Google throttling back the effort Gemini gives to monthly subscribers and allowing your to burn up you 100 pro queries per day so you will upgrade to the $129 per month level to get more pro queries. Gemini won't code well in B4X languages using anything less than the pro model.

As an aside, note also that Google is soon going to have their full web search via API behind a pay wall because they can't inject ads into API respones and they obviously feel entitled to the lost revenue even though they are using the information they got for free from everyone's websites to have search data in the first place. Serper.com allows full search via API without the pay wall if you are interested.

Note also that Perplexity went the same way. When they first came out, Perplexity did good B4X coding. Now, you get 11 (if I remember correctly) pro queries per day and that won't be good at coding either. They switched to being a research model, not coding.

So, the bottom line regarding AI coding is that you pay for what you get. Pay by the token and get good code. Pay a subscription and get frustrated with poor quality code.

Regarding making apps from scratch, the quality of the code you get depends on the quality of the software spec you give the AI. If you give the AI a complex project, it will handle it in stages and give you part of the project complete to test then you prompt it to give you the next part, etc.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Look, you can make a computer skim through many pages of text very quickly. Few of us start in B4J, program in B4XPages and B4X, and then later make it flawless in B4A and B4I to publish in the forum. A limited supply means little reference material. Then you see that AI (in Dutch, Afnemende Intelligentie / Decreasing Intelligence) has become a thing and sometimes completely misses the mark. AI is useful if you want to know the routine(s) to find a specific component, but you shouldn't expect AI to transform all these puzzle pieces into a flawlessly functioning program.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
I have been reading a lot about Claude Code and it's high performance writing code, but I have not played with it myself yet.

I wonder how well it will work with B4X:

 
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
I'm using Codex ( ChatGpt) and Claude ( CLI) both using VSCode and both work very well.
I have two software approved this month at Google Play and Apple Store, with help of AI.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
View attachment 170120

Created using GROK (a few seconds): can I call myself a painter/graphic designer?

[The wood of that table in reality would not have the reflection of the laptop!]

i dont agree with your point.
a painter is something that is related to talent. it not something you can ask someone to explain to you. of course you can get better if you take a course and study it but without talent you wont get far. coding is something that almost everyone can learn. if you ask in the forum does it make you a more or less developer? asking today AI is same as asking a question in the forum only that you dont need to wait until someone answer you. so i dont see any reason why you should not make your work much faster and easier by using technology. besides that most companies or even all of them use AI for coding today.
AI was created for coding and this is the area that AI is the best in. you even have today courses that teaches you to code by using AI.

i think any dev that doesnot use AI today is wasting his time. Ai can get you to the result much much fast its like dont using waze because like this people dont know how to read maps. but who cares as long as it gets me to the target and also do it much faster and easier i will use waze (ai)

i am against telling ai to do all the job but help you with function make them more efficient and maybe use ai as a tool to auto generate code that would take you a lot of time to do is something that we should adopt and not reject!

i love copilot. its free and has no question limits.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
i love copilot. its free and has no question limits.
All AI have limits. Not much can be done with free account. I reached Copilot limit for GitHub desktop and waited for many days until the quota is reset. I only use it to generate git comments. Maybe I commit too much code on GitHub.
Copilot is the last AI I will use if I don't have other options. I prefer other AIs.
 
Last edited:
Upvote 0

ilan

Expert
Licensed User
Longtime User
All AI have limits. Not much can be done with free account. I reached Copilot limit for GitHub desktop and waited for many days until the quota is reset. I only use it to generate git comments. Maybe I push too much code on GitHub.
Copilot is the last AI I will use if I don't have other options. I prefer other AIs.
i am using copilot daily for many things and the only time i meet limits was when i generated images. if you make like 5-10 images / day it is ok more then that you may start getting delays and also sometimes warnings but for questions i never had issues with limits and i use the free version.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
All AI have limits. Not much can be done with free account. I reached Copilot limit for GitHub desktop and waited for many days until the quota is reset.
So far, Copilot doesn't block me (free version), ChatGPT does that.

AIs get a little "dumber" when:

1. the chat gets very long. In this case, open a new one and continue there.
2. you change session; you have to tell it to reread the entire chat.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
So far, Copilot doesn't block me (free version), ChatGPT does that.

AIs get a little "dumber" when:

1. the chat gets very long. In this case, open a new one and continue there.
2. you change session; you have to tell it to reread the entire chat.
Before switching/starting a new chat, ask the AI to generate a detailed summary of the current chat that you can then copy and paste into the new chat so the AI will be caught up on the previous chat's details.
You can use a prompt like this "This chat is getting too big and slowing responses, so please generate a detailed summary of this chat so that I can paste it into a new chat so we can continue this conversation in the new chat with all of the details we have already discussed in this chat"
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
asking today AI is same as asking a question in the forum only that you dont need to wait until someone answer you. so i dont see any reason why you should not make your work much faster and easier by using technology. besides that most companies or even all of them use AI for coding today.
AI was created for coding and this is the area that AI is the best in. you even have today courses that teaches you to code by using AI.
And then you got to the point!
i am against telling ai to do all the job

The main question/issue, is the growth of "what is the better AI to create a full b4x app from prompt" threads.
Even UI creation is being "thrown" at AI.

but I cannot agree with agree with the "is the same as asking in the forum" because, doing it in the forum creates shared info, while with AI the "forum" has only 2 members.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I am now convinced that Gemini 3.1 Pro is crap. My advice, don't use it, something is very wrong with it.

Thanks to my backups. The multiple regressions it did on my code are eye boggling. :mad::mad::mad:
I can understand if you are using the free version but if you are paying the subscription then this is unacceptable. Perhaps it is trying to burn more of your tokens usage since you are willing to pay.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
I can understand if you are using the free version but if you are paying the subscription then this is unacceptable. Perhaps it is trying to burn more of your tokens usage since you are willing to pay.
Worse of all its very opiniated, does not even follow my cursor rules when it wants. I ask it why it's doing what it's doing it apologizes and says it won't do it again and it does it still.

Talk about being tested to the core.

Gemini Flash has been very stable but it takes longer for me. I have stuff that none of the models could solve for me except Claude via the llm arena.

So far my favourates are Codex, Claude and Copilot. NotebookLLM... Best thing ever. OpenCode free models are still clueless about b4x. Non existent methods and making assumptions.

Ive done a few things with Perplexity, and one can secure a whole 12 months free pro subscription with that if they have a paypal account. Have not been able to link that to an IDE though.

I will see how the Ai Skills functionality works. I will share what was created by Gemini as a skills for b4x-development based on what it took from Klauses' PDF learning material here.

Time will tell.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
So far my favorite is DeepSeek.

20196.jpg
 
Upvote 0
Top