2016년 11월 15일 화요일

App Inventor and Punya Support


Hi there,
I would like to know if both App Inventor and Punya Fremework still have support and are updated.
Also, I know that Punya is not directly connected to App Inventor, but an MIT guy from AI once said they were implementing Punya features into App Inventor, does someone knows if they are still doing it?


Thank You!


-- 
Hi Lucas,

Yes, we are still planning to merge some of the PUNYA features into App Inventor. Is there a particular feature from PUNYA that you are looking for?

Evan

-- 
Hi,
Thank you for your answer,
I was looking for some of the sensors like battery and wifi sensor and the google maps feature and I would also like to know if punya apps have the ability of running in the background and receiving push notifications with the appp closed.

Thanks,
Lucas

--
I was looking for some of the sensors like battery and wifi sensor 

probably the following extensions can help
Battery Manager Extension to provide battery information and
WiFi Extension offers some useful blocks to use in a wireless lan

Taifun

-- 
Hi,
I had actually already checked out your extensions, which work perfectly, but my main question is whether punya apps are able to receive push notifications while closed and how I can work with GCM or something else to make it work.

Thanks,
Lucas

Calculator works


I've been for awhile now trying to figure out how I can make a an average button for my calculator emulator. Been having ideas with making a list and so on to make it as an actual averager as in a actual calculator. If anyone can help me with this I'd gladly appreciate it.

--
Initialize a global list called stack, to create empty list.

In the Clear All button, set global stack to empty list.

Have a numeric text box, and an Enter button.
In the Enter button, insert textbox.Text before position 1 of Stack.

Code a value procedure list_to_lines to take a list input, 
run it thru a list to csv block, text replace all commas with \n ,
and return the result.

Each time you change the stack, show its lines conversion in a label.
(optional).

Code a sum() value procedure that takes a list input,
uses a local variable subtotal initially 0,
and a do-result block that returns subtotal.
 In the do block, code a for each item in list
      set subtotal to subtotal + item

When the Average  button is pressed,
show sum(stack)/length of list(stack).

ABG
FAQ:

-- 
I'm having a hard time understanding the procedure to follow by your steps, I've been trying to figure this out for a while now sorry. 

-- 
See the Books and Tutorials section of the FAQ.
Look for the "How to" link in the FAQ also.

Then post a downloaded image of your blocks here.

-- 
See attached for an average procedure.

 average.png
-- 

Help with Quizapp Lists and Database


Hello everyone,
After I have created my first App (and published it) I thought it was time to start a second one.
Until now I have more or less the layout and concept of the app worked out but I am kinda stuck how to proceed next. Let me tell you what it is about and where I need help.
Basically it is a pretty standard Quiz app which gives you a question (from a huge database - later more on that) and 5 answer possibilities (only one anser is correct)
All you have to do is choose a b c d or e and the app will tell you either that you are correct or show you the correct answer. Then move on to the next question.
Now that is per se not very difficult but I have several things I have not quite worked out yet:
1.) The questions screen has several "items" which should be left untouched when chancing the question/answering the question (things like buttons to cancel and a timer as well as a counter which shows you how many questions (out of X questions) you already solved)
2.) The Question Database: It is a huge database with several thousand questions I guess tinydb is not quite capable of managing this amount of information - is csv a possibility? Also I want the Questions be grouped in topics (for example if you want to train yourself you can choose Topic 1 and the app will only ask you questions from Topic 1) Splitting this up into different databases would be no problem for me.
3.) Sometimes there is a text applicable for several questions. So i need to be able to somehow show this text in addition to the question.

I hope i got my problems across and as always - i am not a native speaker so please forgive me my bad english - if anything is unclear, please let me know and I will do everything to clearify.

Thank you all for reading and helping me.

-- 
concerning the database, do you like to update the database regularly? If yes, then you could use a server database and download the questions and answers by topic

do the Pizza Party tutorial to learn how fusiontables work
alternatively you could use a MySQL database on a web server
in case the database is static and you do not plan to update it, then you could store the database locally.
a) you can use csv files and upload them from the assets into your app, then, convert them into lists and store them in TinyDB, or
b) use a SQlite database, see also SQlite Extension to access the local SQlite database

· How to work with Lists by Saj

· How to work with Lists and Lists of lists (pdf) by appinventor.org

-- 
Thank you so much Taifun! But I have a Problem since Pizza Party is basically the opposite way how I want to interact with the database (sorry I have not much experience with AppInventor and Databases in general)
Right now I have 3 Screens:
First Screen is basically the Main Menu, gives the User a Overview of the App, a Picture, a Text and 3 Buttons: 1.) Select the Category 2.) Example Exam 3.) End
This is the respective Blocks for the first screen
Here the Blocks
I'll show the picture (to make it easier to explain)

One Back button (To previous screen) Shown as "Zurück"
One Help Button (does't do anything yet - not sure if i even keep it) shown as "Hilfe) - Now that i think about it I will Change it to Next (to load the next question)
next to it is a counter (you will see how i made it in the blocks)
Text for Label3 is actually Named LCategory and if for example Herzkreislauf is picked it should show up as Herz (or Herzkreislauf)
The Textbox below should load a random Question from the Category Herz (if Herz is selected on the previous screen)
Antowort= Answer
The 5 Checkboxes are the 5 Answers and the Text for Checkboxes should be replaced by the Answers for the selected question)
The little Green box is an Empty Lablebox which should compare the selected Checkbox to the correct answer and then appear either Correct or incorrect.

However I run into a couple of problems:
1.) I can not get the Questions or anything to load from my Database (I have created a very simple sample database with 2 Questions and Answers (can be found here: https://www.google.com/fusiontables/DataSource?docid=1xqiqT1IzlqJPJuuVU611hEArinnaIG-KXKTv3yKM )
2.) How can I load a random question but make sure that question will not show up again
3.) I would like to include a counter which counts the Correct answers out of the total answered questions and which will show up at the end to give an overview.

I am very sorry that I am a frustrating new user please bear with me. I am a bit overwhelmed by all of this but i have to get through this :) (bare in mind i am a simple medical student not a it guy)
Thank you all so much.

-- 
in Screen2 instead of using 50 checkboxes, you could have used a listicker, listview or spinner...

see the following tips and in your case especially #3 and #4


2. follow these recommendations Using Images with App Inventor

3. avoid redundancy
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 https://en.wikipedia.org/wiki/Don%27t_repeat_yourself



6. Backup your project frequently, see also http://twodogapps.com/?page_id=686#BackupWork
the fusiontable component works asynchronously, which means, you will receive the result in the fusiontable control got result event!


just download all questions (of a specific topic) and the corresponding answers and store them locally in lists
you might want to take a look again at the already provided example

don't hesitate to adjust it to your needs

you might want to do some more tutorials first to understand the basics...

Taifun
PS: next time please ask shorter questions... it there someone who likes to read such loooooong questions?
also it might help to start a new thread for new questions...


--

Besides what Taifun told you, there are some more things you should know about Fusion Tables
(see my FAQ's Fusion Tables section for links): Fusion Tables fq

Each row has a unique extra column named ROWID that you can request in your query, to keep track of that row.
It is handy for adding to global lists you might find useful:
ALL_Unused_ROWIDs_IN_Category and
Already_Presented_ROWIDs.

There are three different queries relevant to your application, that you should handle
using different Fusion Tables Controls:
SELECT DISTINCT CATEGORY FROM .....     (fix the column name to match yours)
SELECT ROWID FROM ... WHERE CATEGORY = '(fill in this part)'
SELECT Question, Answer1, Answer2,...Answer5, ...  from ... WHERE ROWID = (pick this from your ALL_Unused_ROWIDs_IN_Category list)

The first query saves you from having to hardwire categories in your blocks.
The second query gets you a list of ROWIDs for a selected category
The third query is what you should have used for your single question/answer load.

As you use up a ROWID, remove it from ALL_Unused_ROWIDs_IN_Category.


Also, you are not using the Query attribute properly.
See the samples in the Fusion Tables section of the FAQ

-- 
Thank you guys for your kind help I know how frustrating it can be to help someone who is new to something! Thank you both!


--

Punya Support


Hello,
Does someone knows where I can get Punya support?

Thank You

-- 
Thanks for your answer,
Do you know if there's already a punya forum or if I can raise questions about it in this forum? What I really wanted to know was whether you can make an app in punya which is able to receive push notifications it's closed

Thank You,
Lucas

-- 
@Lucas,

No you can't.
There are some components, but it using old google libraries that aren't supported anymore.

   

-- 
Thank you for your answer,
Do you happen to know a free way of creating an app with push notifications?

Thanks again,
Lucas

-- 

I had a bunch of blocks disappear


Is there anyway someone from AppInventor can restore my blocks for an app I was working on? Perhaps from last week? I opened it up today and almost all of it is gone. Entire Procedures and variables just disappeared randomly. I failed to back it up.

Thanks,
Jonathan

Can anyone help me? I love using App-Inventor but this would really be a downer if I cannot recover any of these blocks :(

Thanks,
Jonathan

-- 
it seems to be, you learned the hard way how important it is to backup frequently!


see the following tips and in your case especially #6

1. switch screens correctly 

2. follow these recommendations Using Images with App Inventor

3. avoid redundancy 
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 https://en.wikipedia.org/wiki/Don%27t_repeat_yourself



6. Backup your project frequently, see also http://twodogapps.com/?page_id=686#BackupWork
Taifun

-- 
Hi Jonathan,

Did you receive an error when you loaded the project and nothing is appearing? Or are some blocks there and some blocks not?

If you send me an email with the email address you use for your Google account and the exact name of the project I can try to pull the project to see if there are any problems with the file, but there's not much we can do beyond that.

Evan


-- 
Hello Evan,
There was/is no error, except that the blocks that reference the missing blocks show things like" Select a Valid Item in the drop down". Some blocks have disappeared and some have not. It looks like it would if I had went through and just deleted the blocks (which I have not). I thought I had replied to you on Friday but now I cannot see my response, so maybe I didn't hit post or something. But anyways, I have sent you the information you requested.
Thanks again,

Jonathan

-- 
Thanks again,
Jonathan
Just checking to see if you have been able to take a look yet Evan, 

Text to speech language


Hello
I have a doubt regarding text to speech
Can we change the language as it reading every fast ?? Or it is the default voice ??
Many of them are not able to understand the speed and voice
So is there any possibility of changing the way of speaking / voice or can reduce the speed
-- 
Yes. You can set .Pitch and .SpeechRate for this component.

-- 
Really wow
Please tell help me how can we set them please

--
Hey thanq I found them where to change the country language speed and rate
And small help can u tell the abbreviation of those languages
de
en
es
fr
It


--

-- 

How to send phone number, sms text and sender number to a free sms service page?


Hello,

i like to use a free sms service page to send sms from a app.

I have to send to the page the receivers phone number,
the sms text of corse and the senders phone number.
than i have to push a "agree check box"

how is the way to send this to the page ?

please advise me

thanks joerg

most probably you can use the web component for that
without knowing further details of that API its hard to say...


Taifun


-- 

Thanks Taifun,

i have taken a look to the page / post in your answer and the topic is lightly different.

I like to send and do not need feedback from the page ...

here is a link just for a exsample :

it is to fill up and to push the "agree" check box and the "Send" button

Can App Inventor do this ???


-- 

you have to search for their API documentation
probably you can find something here https://developer.inmarsat.com/gx
Taifun

-- 

Thanks Taifun,

here is the content of the page ... attachments

they are in this way ... the java files have to be simulated in aia ...



-- 

I guess, this is not what they understand by "Acceptable Use", see also here http://www.inmarsat.com/acceptable-use/?language=EN&textonly=False

Taifun

-- 
Hello Taifun,

there is no problem with automated fill up of the free sms page.
in the play store are some apps already they do the same,
see EZSat or SatMS ...

Joerg

-- 

Is App Inventor robust enough for really complex programs?


Is App Inventor really robust enough for very complex apps?  The MIT web site makes it look like it's something for elementary school students.  But I'm an experienced programmer and I am working on a really complicated app that would use a lot of statistical analysis, complex file structures (SQL), animation, sound,  bluetooth, NFC ... everything an android device is capable of.

I recently abandoned Android SDK as just being too incomprehensible even after 3 months of hard work. Is there any other language I should consider?

--
I am glad if you would see, for example, my paper below presented at MIT App Inventor Summit 2014, Cambridge.


I think App Inventor has great power to make very practical applications, real world applications!

-- 
Is App Inventor really robust enough for very complex apps?

complex apps: yes, very complex apps: probably not, it depends
concerning professional apps, see als
o https://groups.google.com/d/msg/mitappinventortest/9gUdPZsNZjg/3_aQ5azFpaEJ

The MIT web site makes it look like it's something for elementary school students

yes, the primary target audience for App Inventor are people with little or no programming experience.


--

 that would use a lot of statistical analysis, 

App Inventor is slow in calculations, but you could outsource that part as extension, see also the App Inventor Extensions document and some examples https://puravidaapps.com/extensions.php

complex file structures (SQL)
do you like to access a MySQL database or a local database (SQlite) or?
SQlite Extension to access the local SQlite database

, animation
well, probably that's a showstopper for you, it depends

, sound
yes, see the sound and player component and the Enhanced Audio Player Extension

,  bluetooth, NFC ... 
yes, see the bluetooth and nfc component, the Bluetooth Low Energy Extension by MIT and my Classic Bluetooth Extension

--

everything an android device is capable of.

everything: no
you have to live with the limitations, for example App Inventor apps can't run in the background, for other limitations you might find workarounds

-- 
Statistical Analysis does not sound like something you really want to do in App Inventor.
But in App Inventor you can make the outline for your app, and see how far you get. And your 3-month effort learning the Android SDK may still come in handy when you program missing functionality as an extension.
 http://ai2.appinventor.mit.edu/reference/other/extensions.html

-- 
See the Google Fusion Tables samples for its SQL capabilities.

--