Skip to content

Conversation

@barreeeiroo
Copy link
Member

General items:

If your code changes how something works on the device (i.e., it affects the companion):

  • I branched from ucr
  • My pull request has ucr as the base

Further, if you've changed the blocks language or another user-facing designer/blocks API (added a SimpleProperty, etc.):

  • I have updated the corresponding version number in appinventor/components/src/.../common/YaVersion.java
  • I have updated the corresponding upgrader in appinventor/appengine/src/.../client/youngandroid/YoungAndroidFormUpgrader.java (components only)
  • I have updated the corresponding entries in appinventor/blocklyeditor/src/versioning.js

For all other changes:

  • I branched from master
  • My pull request has master as the base

What does this PR accomplish?

Description

Updated the texting request code to fit within Android's 16-bit limit, changing it from 'TEXT' to 'TX'.

Fixes https://community.kodular.io/t/while-using-texting-component-runtime-error-can-only-use-lower-16-bits-for-request-code/145085?u=diego

Resolves # .

Updated the texting request code to fit within Android's 16-bit limit, changing it from 'TEXT' to 'TX'.
@barreeeiroo
Copy link
Member Author

I think this bug may have been introduced back in 2017, when Form changed from Activity (not enforcing this limit) to AppCompatActivity: 6e23c47#diff-52eaaa99b3c97da14d0b9da6a80d9e8a3cca42153e5bc9976dbc731460c8ca41R106

Refs:

@barreeeiroo barreeeiroo marked this pull request as ready for review November 24, 2025 21:32
@barreeeiroo
Copy link
Member Author

Note that there's probably another bug with how we generate requestCode's as a whole: https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components/src/com/google/appinventor/components/runtime/Form.java#L734

We just increment this, so if we run out of ints in the 16 bit space, we will start throwing exceptions... It's unlikely this to happen, but possible.

Copy link
Member

@ewpatton ewpatton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants