Cannot open the application

I need help regarding my application that I made can’t be opened. When the test mode via connect to the companion application, the application runs normally, but when it is downloaded the application cannot be opened.

here’s my application:
coba (1).aia (1.2 MB)

Use logcat to find out more about this

Taifun

try removing these extension and try to build

image

1 Like

also reduce your blocks like this by using procedure blocks (On removing BottomMenu Extension, app works fine)

cob_2.aia (551.8 KB)

turns out the extension has a problem

1 Like

Thanks a lot

1 Like

the button can’t set to turn off :slight_smile:

It is Simple. Go to procedure and remove all the blocks but use only one if then else condition…

If the image of the clicked button is on
Then change into OFF
Else change into ON

May i know what is the use of the global variables? If they are used to change the images means then it is no need.

check this

cob_2.aia (300.2 KB)

i have totally modified your On Off procedure into too simplified manner

thanks, now the program is concise. i really appreciate that

1 Like

I want to make a web request when the button is on and off, but the web request varies from one button to another. I’m asking for concise program code suggestions :slight_smile:

Then get the index of the button clicked and the image name…

Create two more global
One variable for ON button with required web url lists likewise for OFF

Now when any button clicked get the index and get the name of the picture. If the picture contain the text ON get the web url from the ON variable using select list item list likewise get the web url for OFF button clicked

like this program that I will make.
when button 1 is pressed then set web url to light 1, when button 2 is pressed then set web url to light 2. and so on.

as i said early, put the url in a separate global variable then by using index method get the required web url… very simple work man

how do i allocate web 1 for button 1 and web 2 for button 2

only this way i can do :slight_smile:

Learn to use procedures

A very good way to learn App Inventor or Kodular is to read the free Inventor’s Manual here in the AI2 free online eBook http://www.appinventor.org/book2 … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Tutorials for MIT App Inventor to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun.

No. This won’t be good. You have not tried the way that i mentioned above. I told you to use index method so it will be over with one simple block

Tell us sample url . During On position have to call or Off position have to call

EDIT

image

Put the url in this list according to button clicked and test
image

with the help of thios global button clciked number you can do whatever after getting text from web. Simple

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