2016년 12월 22일 목요일

Q&A for Arduino and Bluetooth


HELP ME...!!! receiving real time data from arduino board via bluetooth in 10ms


i am beginner in MIT APP INVENTOR . I am facing problem while receiving Bluetooth 4 byte data from arduino board in 10ms .receiving slice of data e.g my data is 1234 but it will not receive data same like 1234.It will show 123,23,1234,etc.i also use delimiter  like , / '\n' but it won't work.data show in flickering display.please help to resolve this problem.

can i used receive unsigned 4 byte module? if yes then how it works?give any example also.  

--
10 ms is rather fast.
I'm not sure AI2 can keep up with that.

Post your sending sketch and an image of your blocks here.
Also tell us how you specified the delimiter in the AI2 BlueTooth Client attribute; Did you specify 10 for LF?
What is your AI2 Clock rate?

See sample apps in the Arduino and Bluetooth section of this FAQ.

-- 
thank you for your valuable reply
 please check attach image file and give necessary correction,
I used 10ms clock rate Bluetooth timer.no i am not using LF here.
imageforclock.png 표시 중

-- 
Please post your transmitting code here too,
and your exported .aia file.
There is not enough information here to diagnose your problem.


-- 

obfuscate


Re: !! Obfuscated Text Broken?

Taifun. Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
2월 21일 작성자: Taifun - 작성자 2명의 게시물 3개 46회 조회

Re: Obsfucated Text Block ?

Tim, What you're saying is exactly the case. Obfuscated text works just like the Text block. The difference is that people can't see what the text ...
2월 6일 작성자: Hal Abelson - 작성자 2명의 게시물 3개 153회 조회

Re: Twitter Component: Consumer Key / Secret Encript?

Use the Obfuscated block from the text drawer... That scrambles the keys/secrets to anyone trying to find them in your APK...
15. 3. 28. 작성자: Enis - 작성자 2명의 게시물 3개 24회 조회

Re: test/verify security.

Read about what others say about Obfuscated in the forum https://groups.google. com/forum/#!searchin/mitappinventortest/obfuscate%7Csort:relevance ...
오전 6:14(6시간 전) 작성자: SteveJG - 작성자 2명의 게시물 5개 14회 조회

Re: Google Fusion Tables - Error 2601 Invalid Grant.

Found a couple of errors in my use of blocks. Now just getting error: "Error 2601 fusion Table returned error. The query was: SELECT User_Pwd FROM ...
15. 4. 26. 작성자: Jeremy Morris - 작성자 3명의 게시물 7개 1277회 조회

Re: Is there a way to put permissions on TinyWebDB.

I agree with Stephen here... Although it's difficult to get access to a TinyDB's data, I suppose it can be done. The ONLY way you really have any ...
14. 8. 6. 작성자: Enis - 작성자 4명의 게시물 4개 27회 조회

Re: How To encrypt and dencrypt this program?

What do you want to encrypt? You can't obfuscate AI code, although it's possible that they do some of that during the compile.
14. 7. 15. 작성자: Enis - 작성자 4명의 게시물 7개 50회 조회

Re: PHP_BarcodeScaner_MYSQL_database_password Check Problem.

AI has an obfuscate text block which would make it slightly better and if you are serious, Taifun has an encryption extension here: ...
8월 16일 작성자: Ghica - 작성자 3명의 게시물 12개 32회 조회

Re: TinyWebDB is public or private?

With the help received (just waiting to better understand the issue "... REMOVES the basic interface ...", if it is possible), I thought that I ...
15. 2. 23. 작성자: Nicolino - 작성자 3명의 게시물 7개 131회 조회


test/verify security


Any thoughts on how you can test the software for security compliance? Does it have an security vulnerabilities?

-- 
No software is completely secure.   AI2 apps can be hacked.  AI2 provides a text block called Obfuscated text  .  This provides very low level security that makes hacking a compiled apk more difficult.  So, AI2 apps are not secure from an experienced hacker.

The Obfuscated text block is not documented in the Text blocks description.  From a tool tip:

Produces text like a text block.  the difference is that the text is not easily discover-able by examining the app's APK.  Use when creating apps to distribute that include confidential information, for example, API keys.  This provides only low  level security against expert adversaries.

This comment indicates that what is 'secure' and only at a low level is text information you use within the app from a simple compilation of your APK.  If what needs to be secure cannot be placed in a text box, then it is potentially insecure. This might make, perhaps a Firebase database more secure by allowing the developer to 'hide' the FireBase Token.


Read about what others say about Obfuscated.  You have to test your app for security compliance based on the wording of 508.     Based on 


determining security compliance  is something for experts.  Complience might depend on what your appactually does, what information it accesses and stores etc.  and how it communicates with the outside world.

-- 

Checking if text is null


I am trying to check if some text is null. 

When I do "If (isEmpty(get_text_variable))" an error comes up that says "The operation is text empty? cannot accept the arguments: [*nothing*]"
I would think this should just return true, instead of throwing an error. Is there a way to catch a generic error like that?

-- 
you probably found an App Inventor bug...

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

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

-- 
Here's a screenshot of the error that shows up: https://snag.gy/HMyWpg.jpg

Here's the block of code: https://snag.gy/aNpuL5.jpg 

The issue is when I click the "ConnectButton" and the device that is at index 'number' does not advertise a device name (i.e device_name is null) it comes up with that error. If I instead set 'global device_name' to a constant string, everything works.

I'll work on getting the file uploaded soon...

-- 
Here is the .aia file for the whole app. It's not that complex overall, and I'm sure there are a lot of "best practices" that I'm missing, but it's just meant to be a quick POC


-- 


bug about sound player extention


I found out a bug about it.
After playing a sound,  the current position was returned to the start (zero position).
So, the sound was played again from the start during 1~2 seconds.
When I tried to play the sound with the normal player as block, it did not happen.
block.jpg 표시 중
see the notes in the description of the Pause block here puravidaapps.com/player.php

Note: I received the following feedback from Hussein: I found when Play then pause then play, I cannot pause again. It will be stuck on play unless I stop the playing. The workaround is when clicking pause the program should read the current playing position before pausing, then stop instead of pause, and when want to play, use the play at that position. Thank you Hussein!

-- 
Unfortunately, I could not made you know well  what I want to say.
Play a music (not sound like your file,aia) with app and PC, then you will also find out the bug.
Play block of extention always automatically restart during 1.5 seconds  at the end.
It is not a noise.
-- 
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 I can take a look

-- 
I prepared the file.
Please check it.
sound_play.aia

-- 


search results for multi touch


You could add a slider at each player's end to control his paddle location. ABG.

How to get multitouch working for seperate components in an App Inventor project by Gareth. Taifun. Trying to push the limits of App ...

for questions about AppToMarket, please ask in the AppToMarket forum. https:// groups.google.com/forum/#!forum/apptomarket. Taifun.

I don't think AI2 supports multi-touch yet, so you might need to work around this. What if you set Long Click events to switch the background ...

Issue: May any one else know that does App Inventor support multi-touch function or photo sphere function? Thank you for your attention. Comments:

I believe multitouch is available if you use the WebViewer,. Multi Touch Demo with the App Inventor Webviewer. Taifun.

Thanks. Joystick_copy is the original one. Joystick_copy_new is the modified with AppToMarket setting 5 and 11 for multi touch.

A monitor in the middle displays an image and the person has to touch the correct "button" (tablet) not the other one. Example: When the picture ...

I need to control the direction and the acelerator of the car at the same time, so i need to touch the screem in two diferents place at the same ...

I have done some researching and it seems AI does not support multi touch, but if you edit the "manifest" and add a line, then it will work.

btw, the webviewer can do it. Multi Touch Demo with the App Inventor Webviewer. Taifun.

Do you have any project or app that has successfully implemented multi touch according to Gareth or Alexandru guidelines.I have tried to implement ...

Hi Taifun,. So i have implemented the suggested info by Alexandru but still no multi touch.Do you have any app where someone has successfully ...

I am building a program using the AI2 multi screen template. When I try to work on Screen1, the computer screen and the screen on my phone keep ...

If " limitations of App Inventor, like, unscrollable screen, no multitouch etc bothers me" , then you need a more advanced compiler .. more ...

On a touch screen device, however, it's quite natural to lift your finger when the slide jumps left or right and 'regrab' it.

The TextBox with Multi-Line option gives me the scrolling but the keyboard pops up if I touch inside the text. If I set TextBox.enabled to False, ...

App Inventor doesn't do multi-touch. thanks for the reminder that we need to file this as an issues. I'll file it, but no promises as to when ...

The user will have to know that a kaipuke means boat or ship and to touch the boat rather than one of the other random pictures. Just a thought.

I wanted to develop a drumming app and a jump and run game, but both need multiple touches at once to work. How can i enable multi touch in ...

I have seen that there are a lot of questions on how to be able to multi touch in App Inventor 2. As you may know already, App Inventor 2 does not ...

How are you implementing two player? App Inventor doesn't support multi-touch. How are you moving the second goalie? Show us your blocks.

zoom - by multi-touch or by using the + on the display. This is in button 3 - http://images.intellicast.com/WxImages/RadarLoop/sat_None_anim.gif.

I built the attached sample before I remembered about the multi touch limitation . There are parts you can still use .

Добавьте пожалуйста Multi touch. И возможность писать на C# минуя блоки. То есть у пользователя есть выбор либо ему составлять блоки, ...

Are you in a multi-lingual environment? Also Google Translate will translate most instructions from English to Spanish on the pages that describe ...

Two of the links here might help you https://groups.google.com/forum/#!searchin/ mitappinventortest/multi$20touch ... they talk about ways of ...

Developing everything I touch! (I'm still learning... don't judge!) And... having a blast!....Just me & my computer in our special happy place :).

Offline unendorsed versions of AI2Multi-touch in AI2UTF-8 Encoding Generate your own BOMVideos Large videosHow to play videos Waiting and Timing ...



how to make multi touch application


i want to make multi touch app . any one help me fast as possible.

--
What AI2 forum users know about multi touch 

So if you build a multi touch Android app, you need to use a different compiler; perhaps Eclipse or Android Studio using the Java language because AI2 can not do it.

--
ok it done with AI Mainfest editer

--

Touching Canvas with two fingers simultaneously


I'm trying to build a remote controller for drummer robot.


First I set my screen background as a picture of drum set.
Then I covered most of screen with canvas.
However, I was only getting one of my finger's coordinate and not the other finger.
So I tried using image sprite to construct drum set's components but it only recognized one of the sprites being touched even tough I was touching two sprites at the same time.

Most of you guys know that drummer occasionally hit two different or three different components of drum set at the same time.
So I am trying to send data of two or three components being touched simultaneously.
Is there a way to solve this problem?

Thanks for reading my post!

--
MIT App Inventor does support multi touch unfortunately but there is a work round to get multi touch working on seperate components but not multi touch in a single canvas component

How to get multitouch working for seperate components in an App Inventor project
In MIT App Inventor the target SDK Level is not set which means multitouch doesn't work. What I did was set the target SDK level to 11 in the manifest file before the project is built as and APK. To do this you will need to:

1. Download you project from App inventor
2. You will need to build to project Via a version of appinventor locally installed on you computer
3. Use my AI Manifest Editor software or AppToMarket to modify the AndroidManifest.XML when building the app so you can add the line <uses-sdk android:targetSdkVersion=11/>

When the app is compiled as and APK you will now have multitouch on seperate components.
For more info about the AI Manifest Editor on this visit my website http://madrobots.wix.com/themadrobot#!ai-manifest-editor/c23po

Please note doing this won't give you mulittouch on a single canvas component, but on multiple components (E.g. 2 button components, 2 canvas components, etc). I have managed get multittouch working on a single Canvas component in my own extended version of App Inventor called Mad Robot AI which you can find out more about on my website www.themadrobot.talktalk.net

--
Since I'm using AI2, I downloaded AiLiveComplete from http://sourceforge.net/projects/ailivecomplete/files/?source=navbar
I set correct APK build directory and so on.
It seemed like it detected the apk file when I was building apk file for the first time.
But it didn't actually generate .xml file and it doesn't even detect them anymore. 
Do I have to use your ai4a personal server in order to use Manifest?

--
as Gareth said: Use AI Manifest Editor software or AppToMarket to modify the AndroidManifest

--

I have tried both, the manifest doesnt run and once finished with the market one it wont install
If I email the apk to you can you run through apptomarket for me
--
if you have problems using AppToMarket, ask Hossein here https://groups.google.com/forum/#!forum/apptomarket
--
Please you post your questions relating to AI Manifest Editor in the "The Mad Robot forum"  this way if anyone is looking has the same question they will be able to find the answer.

Here is the link to the forum:

--

multitouch


How to get multitouch working for seperate components in an App Inventor project by Gareth. Taifun. Trying to push the limits of App Inventor!
How to get multitouch working for seperate components in an App Inventor project by Gareth. Taifun. Trying to push the limits of App Inventor!
You cannot use multitouch in AppInventor. However, using extensions, you can add a multitouch scale gesture detector to a Canvas. See here:.
I believe multitouch is available if you use the WebViewer,. Multi Touch Demo with the App Inventor Webviewer. Taifun.
first do the tutorials! there is no multitouch available in App Inventor. How to get multitouch working for seperate components in an App Inventor ...
How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this guide by Alexandru.
App Inventor does not offer multitouch (except of the webviewer), but: How to get multitouch working for seperate components in an App Inventor ...
Hi! I'm trying to make my app able to recognize two slidders (canvas) being held at the same time. I've already seen How to get multitouch working ...
App Inventor does not offer multitouch, so you only can touch one sprite or ball at a given time, which means, you should not have any issue.
3) Is there a command to use MULTITOUCH? Click 2 bottons at the same time? I think you are right, I have problems with the memory. Thak you!
there is no multitouch available, except for the webviewer component,.
there is currently no multitouch available in MIT App Inventor, but Gareth is working on that... Taifun.
How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this guide by Alexandru.
How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this guide by Alexandru.
How to get multitouch working for seperate components in an App Inventor project by Gareth. Taifun. Trying to push the limits of App Inventor!
How to get multitouch working for seperate components in an App Inventor project by Gareth. Taifun. Trying to push the limits of App Inventor!
How to get multitouch working for seperate components in an App Inventor project by Gareth. Taifun. Trying to push the limits of App Inventor!
That multitouch idea is very useful. I will go update myself on that now. The upside down text one wont fit for me as i need something that can ...
As you may know already, App Inventor 2 does not support multitouch natively. But you can use a workaround so that your app will have multitouch ...
I wanted to develop a drumming app and a jump and run game, but both need multiple touches at once to work. How can i enable multi touch ...
How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this guide by Alexandru.
are you talking about multitouch or about adding another screen? ad 1). How to get multitouch working for seperate components in an App Inventor ...
Multitouch is not a native App Inventor capability, however How to get multitouch working for seperate components in an App Inventor project by ...
Also search this board for multitouch. That will send you far afield into manifest editing, extensions, and JavaScript stunts in the Web Viewer.
... of searching for "multitouch". https://groups.google.com/forum/?utm_medium= email&utm_source=footer#!searchin/mitappinventortest/multitouch.
Multitouch is not supported yet. Search for multitouch in the forum for workarounds.
for multitouch see here How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this guide by ...
App Inventor does not offer multitouch. How to get multitouch working for seperate components in an App Inventor project by Gareth.
How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this guide by Alexandru. or alternatively.
btw. multitouch is possible, see here How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this ...
App Inventor does not offer multitouch, only the webviewer can do it. How to get multitouch working for seperate components in an App Inventor ...
Hello im having a bit of trouble, my app works great when just dowloading it from AI but when i change the target sdk to add multitouch (in ...
Is there a reason why a custom user control or multitouch is disabled in the app inventor base code IDE? Once the app is complete can it be put on ...
Scrolling doesn't work well if I set the webviewer height to automatic or fill parent, but it does work fine (also zooming with multitouch or the ...
you also could use a canvas and Hal's scale detector extension. Scale Detector Extension by Hal: Adds a multitouch scale gesture detector to a ...
Did you see the way I added Gesture Detection and multitouch to canvas using extensions? That's something like the approach you are taking about, ...
Try using a joystick control until multitouch is supported. See: https://groups. google.com/forum/#!searchin/app-inventor-developers-library/ ...
App Inventor does not offer multitouch, so there should be no problem with simultaneous clicks in your app. Taifun ...
yes, however App Inventor does not offer multitouch, but there is also a workaround... It would really help if you provided a screenshot of your ...
Is it possible to drag two sprites simultaneously? no. but you could take a look at the following probably helpful links. How to get multitouch ...
How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this guide by Alexandru; Taifun ...
How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this guide by Alexandru.
App Inventor is single touch, but probably this can help: How to get multitouch working for seperate components in an App Inventor project by ...
How to get multitouch working for seperate components in an App Inventor project by Gareth, see also this guide by Alexandru; Taifun.