Subject: SendMessageDirect stopped working since yesterday in new APK builds (works in old builds)

"Evan, a very important detail: I discovered that the APK crashes on Android 10, but works fine on Android 16. If you test it only on the latest Android versions, you might not see the error. Please try to run it on an Android 10 device or emulator. You will see that the production build server is failing to provide the necessary methods for older Android versions, which worked perfectly just a few days ago."

Your uploaded aia project contains 7 extensions. (and appears to just be about bees)

Still no response regarding:

The proposed fix is now on ai2-test.appinventor.mit.edu. It requires loading the test companion from that server and/or compiling your apps there until we push it to the production servers.

"Thank you, Evan, for the quick investigation and the fix. I'm glad we could identify the issue together. I will test the new build on the test server with my Android 10 devices to confirm the resolution. This is a great result for everyone using MIT App Inventor for IoT and industrial projects. Cheers!"

"As I’ve already stated, I am not using extensions for Texting. Even in a completely blank project with only the Texting component, the same crash occurs on Android 10. The number of extensions in my main project is irrelevant to this specific bug.

The fact that Evan just released a fix on the test server confirms that the issue was indeed in the core MIT App Inventor build system, not in my project's extensions. Let’s focus on the solution now that the bug has been identified and fixed."

As for it being 'just about bees'—yes, it is a smart scale for beekeepers, a real-world IoT project.

"Yes, I stand by my statement. This is an industrial-scale agricultural IoT project. In modern smart farming, monitoring hundreds of beehives across different locations using high-precision scales, GSM communication, and cloud data logging is as 'industrial' as any factory monitoring system.

The 'bees' you see in the code are the subjects of the data collection. The infrastructure—using background services (Itoo), automated SMS reporting, and centralized data management—is built for scale. Whether it's 100+ factory sensors or 100+ smart beehive scales, the technical requirements and the bug I found are exactly the same."

Just to help you understand what I was getting at:

  • it was not clear whether your industrial app and beekeeping app were one and the same, which one had the issue, etc. Now we know that industrial app == beekeeping app.
  • Some older extensions being used have not yet been updated to handle pending intents or broadcast conflicts. At the point of my asking about extension use, in the topic, it was not obvious that sendMessageDirect was the cause (you didn't show any blocks, or a full stack trace)
  • Your app has 7 extensions, you said there were none. Confusing. Following your test with a simple aia project, and on review of your app and its extensions, it became clear that the issue did not lie with any of the extensions in use.
  • This is simple fault finding / error tracing on my part, what can we eliminate from our enquiries, etc.
  • Help us to help you...end of message!

"I understand your point, @TIMAI2. In the heat of the moment, I was focused only on the SMS part, which is why I said 'no extensions' (as I wasn't using any for SMS at that time). I'm glad we eventually isolated the issue with the blank project. Everything is clear now, and I appreciate the collective effort to find the bug. Cheers!".

1 Like