Broadcast hub (solved)

The texting component is working perfectly.Although I do not have many phones to test it’s capability due to the current happenings in the world.I will like to add some additional features such as only people from a particular country can join.Any ideas on how to do that??

Congratulations . Would you like to share your aia with the forum? Others certainly are interested in what finally worked.

How to restrict usage depends partly on your existing code.
Restrict phone numbers to those with a particular country code or area code possibly. Only allow those to 'register' if their phone number's first several digits matches particular criteria perhaps. The Texting.MessageReceived event handler can identify the number of the phone registering. Use a conditional statement ... if number contains xxxx then it is ok, if not then cannot register.

Sorry butthe coding is confusing.Explain howdy will write such

Sorry for all the typographic errors.I was asking how it should be written.for the number to be compared

Sorry Herin. I don’t know what your code looks like at the present time after all the modifications you made.

Here is how you would code what you want using the original Broadcast Hub example only234
assuming your are in Nigeria ( where the country code is +234) and that code is a required part of the phone number. Will it work? I have no idea.

You also could provide similar code elsewhere (perhaps in your registration section) that checks whether a number does not contain +234 and if it does contain 234, the person cannot register. Without seeing your code, this stuff is only a guess.

Can u send the full piece of the code

I don’t understand. You have the complete code. Use an If Block.

If contains text get number piece +234 That If block should exclude execution of all the following blocks that are within the then part. i.e. if is in list? thing get number… unless +234 (the country code) is part of the texting number. If 234 is part of the phone number, the If code allows the code in the then part to execute.

If you need more advice, please post your aia here.

I have been able to solve the problem.If I want the app to be programmed for National use.Any advice??
I was also thinking if u want the messages sent to be filtered by keywords and stored in groups based on a particular topic.What do u think can be done ??

And am I allowed to use the app for public use??

You solved the problem filtering allowed phone numbers based on the national country code that is part of the phone number :slight_smile: .

I don't know. The messages user sent go to all users who sign up. What you do to restrict use depends on how you store the messages and what you expect to do with them. At present, the app does not store the actual messages, it only stores the phone numbers ... How to work with Lists by Sajal may give you ideas. The original tutorial assumes that after the messages are sent, the messages on the app just are thrown away. All that is retained is a List of those numbers texting messages.

This is what MIT says about apps created using App Inventor Privacy Policy and Terms of Use . You must determine if your local telecommunication laws allow re-broadcast of text messages. What the app does is if the text message is sent from a number already in the broadcast list, the message is broadcast to all numbers in the list.

Re-read the original tutorial. The tutorial explains what the app does and offers suggestions for modification.

Your original question was answered Herin (the Hub is working for you). Please start a new forum topic for your additional programming questions. Thank you.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.