2017년 7월 14일 금요일

Sidebar – Side Menu [MIT AI2]


Using AppToMarket 4.1 and Screen2 in your project you can achieve this.
Let us begin by making Screen1 and Screen2 that we will use as sidebar or side menu.
Screen1 Designer:ShowStatusBar: Checked
TitleVisible: Checked
Sizing: I prefer responsive before fixed


Screen2 Designer:
BackgroundColor: None
BackgroundImage: None
CloseScreenAnimation: None
OpenScreenAnimation: None
ShowStatusBar: Checked
TitleVisible: Checked

Main arrangement
BackgroundColor: None
Height: Fill parent
Width: Fill parent
BackgroundImage: None

Left arrangement
For images, buttons, text etc.
Height: Fill parent
Width: 60% or doing this in blocks

Right arrangementFor the simulation of Close Outside.
BackgroundColor: None
BackgroundImage: None
Height: Fill parent
Width: Fill parent

and that’s all in MIT AI2download and save your project.apk in ..AppToMarket_v41\myApks\ folder.
AppToMarket is where the magic is created, but before we start with AppToMarket we need to create a theme and two animations, left to right and right to left, which in turn will take control over our Screen2.
this page was very helpful in understanding the animations.
Launch your AppToMarket and browse for your project.

Decompile

Features & Update ManifestSelect necessary features and update Manifest
Screen: NoTitleBar = TitleVisible: Unchecked
Slider: Set it to Any

Edit Manifest
You’ll have to add android:theme="@style/Theme.myCustomTheme" manually to our Screen2 in the manifest file.

Save Manifest.
and the last thing before you click the Create New.apk button
move your file mycustomtheme.xml to …AppToMarket_v41\temp_myDecompiles\res\values\ folder
move your files slide_from_left_to_right_enter.xml and slide_from_left_to_right_exit.xml to …AppToMarket_v41\temp_myDecompiles\res\anim\ folder

Create New.apk

Sign

Verify

Zip Align

Download


search results for Checkbox for a to do list app


So, using 4 different tags in one TinyDB would be ok. Thanks! But how do I get the choice of putting it in different lists by pressing the same buttons?
Hi guys,. I am a little bit confused on whether I could use the checkbox to create a to do list app. I am sorry I am a beginner. If anyone could give me ...
I created a procedure to do a Descending Sort on the Index value list. So now the RemoveChecked 'For Each' ... First of all, you are really pushing the limits of App Inventor with so many blocks. One of the reasons you have so many ...
Your problem is that in the "do" part of your "for each item in list" block, you are using "get globalAllTextBoxes" in four occurrences where you really want to use " get ... I am using App Inventor 2/Windows 7/Chrome/32.0.1700.107 m.
When using a Service Account, end-users do not need to login to use Fusion Tables, your service account authenticates all access. To get an API ... App Inventor will send the query to the Fusion Tables server and the GotResult block will fire when a result is returned from the server. Query results will be ...
Check boxes do not record Yes or No, they are either true (if checked) or false (if not checked). For example ... Why not try some blocks by making a simple check box app to try how this could work with a list? When you get it working, ...
Kelvin, do you know how to clear textboxes? You just need to set ... You can reset a listpicker by setting it's elements to an empty list. You can clear a ...
** I thought this code was working, but apparently it only works in block view when you use the "Do It" command. When I am just using the app, the save button doesn't work, and weirdly neither does the home button. Anyone have ...
No, you cannot do it that way. App Inventor cannot dynamically create check- boxes as you describe. You can create all the checkboxes you will ever ...
For example, to create a list of to-dos; I will need to enter de name of the task, and then a new checkbox with the text that I entered should appear, and ...
I am trying to dynamically create table with list elements and checkbox . Can I do this using App Inventor ? no. I saw one example which embeds ...
If checkbox selected it uses the night theme, if not checked, the app uses the day theme. so that if ... Then in the value to store, you store only true or false, not aList. I do not believe you want to store DayCheckbox.Checked because ...
why do you need the checkbox names? my suggestion was to have a list of the components (to be defined in the Screen1.Initialize event) and a ...
Here is a new .aia I hope you recognize your old app still! What I tried to do is to set up a data structure where you could save the information about ...
Yes, you can do this. You will need a list of items you can shop for, perhaps call it Items. You could use the check box to associate a Boolean value ...
App Inventor DOES NOT run on Java, which means, these changes do not help to run App Inventor faster. App Inventor ... After button click, store the values (true/ false) of the checkboxes 1-10 in a list, then load the text for checkbox 11-20 and display the texts using the same checkboxes. After another ...

BLE services and characteristics


There are blocks in the BLE extension to access ALL services and ALL characteristics - each one comes across as a huge string

There are also blocks to access service or characteristic by Index.

How can you access only the characteristics for a particular service?

--
You cannot. Because the BLE extension has no intelligence about this. You have to know yourself which characteristic you would need. The blocks help you only to find out whether they are available.

--
There is a way to show all supported Services and Characteristics. These should return a list with the Services and characteristics. But to be honest...I´m not able to create a List which show me the Services. How do I do this ?

-- 
Use the call BluetoothLE.SupportedServices block.
There is also a call BluetoothLE.SupportedCharacteristics block, but it does not help you to find the supported characteristics for s specific service.


-- 
I've noted this as future work for the BLE extension.

-- 
Nice!

-- 
Excellent news. 

-- 

FormatDateTime Argument


Help, please, about clock methods. 
Taifun already tried to give me a bit of information about, on another post where I asked whether it is possible to point the exact block affected by Runtime Error. 
Either at the first launch, when the TinyDB store is empty of the date of a last computation, or at the initialization of the App's Screen1 when I have previously stored & got a date, I am warned of the following Runtime Error.
Not good complete Gregorian Calendar format, not good [MM/dd/yy hh:mm a] format.
So, the big question is: what is the argument for the family to which owes the FormatDateTime method?

--
Please post screenshot of your relevant blocks and explain what result you are expecting.
You may also want to take a look at extension below which has features that you see in the attachment.

--
As required by Taifun and Hossein, please take ref. to the following screenshots (it is an app to report the accumulated working time in different slots of time):
--
you can't store an instant in TinyDB, convert it into milliseconds using the GetMillis method and later after reading from TinyDB convert it back into an instant

--
Thanks, that's an answer?

--
I made mistake, It had to bè a ! not a ?. Problems when I write on cell without glasses 

--
I am so sorry to bother yet, but:
Same runtime also with [0] at the "ValueTagNotThere" slot
Second Runtime Error:
What's wrong?

--
Second point (apparently) solved by feeding Duration with "instants":
--
...and saturday night I found the mistake: I used the right arguments for the wrong method (correcrt MakeInstantFromMillis, instead of GetMillis).
In fact, it works.
--

error 701 : unable to load .mp3


I have made an app with several sounds on several screens... Sounds work normaly on Screen1, but on other screens it does "error 701 unable to load" then "error 703 unable to read"...
In all screens i dit "when button<number> call sound<source>"
Why does it work only for screen 1 ?!
Please help me I am 0 in programmation...

--
see this answer from Ewan: sound files from sound bible

Please prepare an example as small as possible, which demonstrates this issue and add the project (aia file) into this thread together with exact instructions for how to elicit the error, so someone can take a look

--

sound files from sound bible


I am having problems with this app inventor.  In the past I have used the website sound bible to get different sound effects to use in my app.  Now when I upload the files, it shows that it uploaded, but when I play the app, an error message comes up.  Error 701 and 703. Unable to play sound?  What am I missing or doing wrong?  

--
see this thread Sound files error 703 and 701

--
Can you provide an AIA that shows this issue? Do you have this happen in the emulator, on a phone, or both?

--

buttons and screens


Hi I would like if you can, explain or make a video of how to make a button that I send you to the last screen that you opened, so that you get the idea a book in an apk sales outlet, you close, go back and enter but to the main menu There is a button called continue, that button to oppress it sends you to the last sreen in which you were from the book, as you would, thanks

--
store the last screen name in TinyDB
TinyDB tutorial by Stephen

A very good way to learn App Inventor 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:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

see also the following general tips and in your case especially #1
1. Use different screens wisely
2. Before starting to create another screen, first you should think about is it really necessary? See also Building apps with many screens and SteveJG's post about advantages/disadvantagesbecause in only one screen you also can use vertical arrangements to simulate different screens, just set the arrangements to visible = true/false as needed... See also Martyn_HK's example about how to use Tabs in AppInventor and another example from Cyd
4, App Inventor works best if you use images whose size matches the size you want them to appear on your screen. If you import larger images into your app, your app may run out of system memory. Using Images with App Inventor
5. Avoid redundancy
6. Probably it helps to read chapter 19 - 21 in Dave's book http://www.appinventor.org/book2 to get an idea how to do DRY programming with App Inventor - Don't repeat yourself 

--

Help for calculator


how can i solve my calculator, to calculate something like 19 + 12 +16 = .... i just want to take more numbers in the calculation 
and i want to show the calculation ill put a screen from my blocks hope someone can help


Gunther!

--
see Scott's example here Basic Desk Calculator

--

Open apk-installer with Activity Starter?


Hello is it possible to open the apk installer with the activity starter?
thanks for any reply!

--
Yes!
Sample!
1. Button Click
2. Set Action: android.intent.action.VIEW
4. Start Activity
5. Clock Timer: enable
This starting download apk file from internet to phone, in clock set TimeInterval to seconds that go do downloadin the file (depending apk size and internet speed)
Then:
1. Clock Timer
2. Activity Action: android.intent.action.MAIN
3. Activity Class: com.android.packageinstaller.PackageInstallerActivity
4. Activity Package: com.android.packageinstaller
5. DataUri: /mnt/sdcard/Download/Programm.apk
6. Start activity
7. Timer Disable
Ofcourse you can put apk to program, but then you apk file is bigger.
Then DataUri is something: file:///mnt/sdcard/AppInventor/assets/Programm.apk

--
thank you for these steps!
However, this:

Ofcourse you can put apk to program, but then you apk file is bigger.
Then DataUri is something: file:///mnt/sdcard/AppInventor/assets/Programm.apk
will not work, because that directory exists only on your development device
Someone who installs your main app will not have that directory. The only way therefore is 1. download the app (alternatively using this method http://puravidaapps.com/filebyfile.php)  and 2. install it then

--
Sorry, my mistake! But if file location is: file:///android_asset/Programm.apk then it must work i think?

PS! Can you please answer this also? https://groups.google.com/forum/#!topic/ai4a/_T5xcFQwwPs

--
no, because you can't access assets of an app from outside of that app

--
meanwhile I prepared an example how to do it here http://puravidaapps.com/install.php

Thank you Peep!

--
Hello! Many help from your extentions and tutorials. But I had some trouble. My app provides auto update and it works on my SGS3(SHV-E210L) which android version is 4.4.4 KitKat. And now, I got a new smart phone S8+(SM-G955N)(android 7.0) and auto update doesn't work. It downloads file from internet and successed to save, but can't install with activity starter.

How can I fix this??

--
- show quoted text -
Same for me with android 7. In the Q and A is a soloution but if i change this it also doesnt work. Any Ideas?

--
Same for me with android 7. In the Q and A is a soloution but if i change this it also doesnt work. Any Ideas?
I found solution!!
Under android 5.0 supports "com.android.packageinstaler" but android 6.0+ doesn't. (I had little survey with my PackageInstallTestapk and found that android 6.0+ has same problem)
There was little change with Package name. "com.android.packageinstaller" => "com.google.android.packageinstaller"

SOLUTION: set activity starter like this on android 6.0+
Action: android.intent.action.MAIN
Activity Class: com.android.packageinstaller.PackageInstallerActivity
Activity Package: com.google.android.packageinstaller
Data Uri: file:///mnt/sdcard/*(directory and file name)


But this solution also has a problem. app which was made with appinventor can't get Android SDK version. (unless you don't use any extentions) So you have to select target android version to use (can't set on appinventor) or use extentions to get android SDK version.

--