2017년 1월 4일 수요일

error 2001 for camcorder


 ..need to share the camcorder file after camcorder records but i keep getting error 2001


Screenshot_2016-04-21-14-35-49.png 표시 중

--
the result from the camcorder unfortunately is a video content uri, but not a path to the recorded clip and for the sharing coponent you wil need the path to the file
and unfortunately there also is no conversion block available, which converts a video content uri into a path to the file

however you could write your own extension and create a block yourself...

more information about how to create an extension see here Announcing App Inventor Extension Components
however that will be more advanced and will require some Java skills...

I also can offer to write that conversion block for you. In case you like to be the sponsor of that block, please contact me by email. Thank you.

-- 
The correct path to the video clip is content://media/external/video/media/7290
The Sharing component ShareFileWithMessage event block is adding a file:// prefix to that path which is causing an error.
That results in the incorrect file://content://media/external/video/media/7290 path attached to the 'file' socket.
This may be a bug.

-- 
Share - Error 2001: "The File could not be found on your device"

--

ActivityStarter Component


ActivityStarter

A component that can launch an activity using the StartActivity method.
Activities that can be launched include:
✱ Starting another App Inventor for Android app. To do so, first find out the class of the other application by downloading the source code and using a file explorer or unzip utility to find a file named "youngandroidproject/project.properties". The first line of the file will start with "main=" and be followed by the class name; for example, main=com.gmail.Bitdiddle.Ben.HelloPurr.Screen1. (The first components indicate that it was created by Ben.Bitdiddle@gmail.com.) To make yourActivityStarter launch this application, set the following properties:
⦁ ActivityPackage to the class name, dropping the last component (for example, com.gmail.Bitdiddle.Ben.HelloPurr)
⦁ ActivityClass to the entire class name (for example, com.gmail.Bitdiddle.Ben.HelloPurr.Screen1)
✱ Starting the camera application by setting the following properties:
⦁ Action: android.intent.action.MAIN
⦁ ActivityPackage: com.android.camera
⦁ ActivityClass: com.android.camera.Camera
✱ Performing web search. Assuming the term you want to search for is "vampire" (feel free to substitute your own choice), set the properties to:
⦁ Action: android.intent.action.WEB_SEARCH
⦁ ExtraKey: query
⦁ ExtraValue: vampire
⦁ ActivityPackage: com.google.android.providers.enhancedgooglesearch
⦁ ActivityClass: com.google.android.providers.enhancedgooglesearch.Launcher
✱ Opening a browser to a specified web page. Assuming the page you want to go to is "www.facebook.com" (feel free to substitute your own choice), set the properties to:
⦁ Action: android.intent.action.VIEW
⦁ DataUri: http://www.facebook.com

Properties

Action
ActivityClass
ActivityPackage
DataType
DataUri
Extras
Accepts a list of pairs which are used as key/value pairs in the “Extra” field of the activity

ExtraKey(Obsolete)
ExtraValue(Obsolete)
Result
ResultName
ResultType
ResultUri

Events

AfterActivity(text result)
Event raised after this ActivityStarter returns.
ActivityCanceled()
Event raised if this ActivityStarter returns because the activity was canceled.

Methods

text ResolveActivity()
Returns the name of the activity that corresponds to this ActivityStarter, or an empty string if no corresponding activity can be found.

StartActivity()
Start the activity corresponding to this ActivityStarter.

Can we use "getCropAndSetWallpaperIntent" on AppInventor ?


Hello I'm using MIT Appinventor since this morning and I have an issue with the "Activity starter" option. Indeed I want to make an application in which I have to change the wallpaper without having to crop, which is not possible with this action : android.intent.action.ATTACH_DATA. After 5mn of research I found this "getCropAndSetWallpaperIntent" but it seems to don't work on Appinventor or at least it don't work under this form.
Do you know if I can use it, and if yes how ?

--
See if Peep's post on Wallpaper HERE works for you.
   
-- 
I already tried "android.intent.action.ATTACH_DATA" but the problem as I said is that the phone ask me to manually crop the picture.
"android.intent.action.SET_WALLPAPER" give me this error : "Error 601 : No corresponding activity was found."

-- 

TinyDB store component visibility


Is it possible to store a component visibility in TinyDB?
In that case how?

-- 
You can do that by setting a flag to true or false. 
For example, if you have Button1, do TInyDb1.StoreValue: Button1 to ture or false
Then when screen loads, retrieve that value and set your component visibility accordingly.

-- 
 test.PNG
This works :)
 test.PNG
-- 
instead of using the text "true" as valueIfTagNotThere you better use the logic block true instead

-- 

custom font


Re: Fonts.

Once upon a time, one of the third party versions of AI2 had a custom font drawer. It may no longer be available. You might be able to use a custom ...
16. 12. 9. 작성자: SteveJG - 작성자 3명의 게시물 3개 15회 조회

Re: How do I use custom fonts is an html saved as asset?

You have declared that custom font shows in but text in body NOT between div!
16. 5. 10. 작성자: Peep Prants - 작성자 2명의 게시물 4개 22회 조회

Re: add font.

see these threads https://groups.google.com/forum/#!searchin/mitappinventortest/ custom$20font%7Csort:date. Taifun ...
16. 4. 22. 작성자: Taifun - 작성자 2명의 게시물 2개 17회 조회

fusion table error: 400 bad request "invalid_grant" on Samsung.

The custom font (feature of AI2LiveComplete) doesn't display on her phone either . I did get the error once with the Note 2, though. After puzzling over ...
16. 3. 7. 작성자: M Barton - 작성자 2명의 게시물 5개 76회 조회

UI Themes creator.

... for: Font Typeface Font Bold Font Italic Font Size Font Color Font Background color Controls Background colors Controls borders Custom Screen ...
15. 8. 20. 작성자: bianca fenice - 작성자 2명의 게시물 2개 47회 조회

UI design in 2 apps of the month.

I know in ai2 custom font is not enabled and colors of screen/buttons limited. In my "research" I came across AppToMarket which amongst other things ...
15. 2. 11. 작성자: Neo Malesa - 작성자 1명의 게시물 1개 45회 조회

Moving a inputing Bold Text in Canvas.

Hi Inventor, I have a problem for my T-Shirt Design App. Canvas seems cannot allow to draw a custom Font type text after I input the text in a textbox.
15. 1. 21. 작성자: chak Wong - 작성자 2명의 게시물 5개 42회 조회

Re: Help in displaying Unicode text from a Unicode text file.

I will upgrade the os version or install the custom font. I heard that the calibre font displays these characters nicely and in fact the unicode txt file I sent ...
14. 11. 7. 작성자: Bhagavati Kanta Dasa - 작성자 2명의 게시물 7개 92회 조회

Re: Layout, fonts etc.

If you want a custom font, perhaps you can design your own label and save it as a .png or .jpg, and then import it as an Image instead of a label.
14. 9. 19. 작성자: Zack Uhlenhuth (AppInventor Development Team) - 작성자 3명의 게시물 5개 79회 조회

Re: Custom font.

You can simulate any font you want. Capture the text and save it as an image (jpg or png) and display it with an image control. You can not change the ...
14. 8. 16. 작성자: SteveJG - 작성자 3명의 게시물 4개 79회 조회

Re: [mitappinv] Re: Can I Choose a custom font for my app?

You can look at the offline version: http://amerkashi.wordpress.com/2013/07/12/ offline-app-inventor-custom-font-face/. -Hossein. On Fri, Jan 3, 2014 at ...
14. 1. 4. 작성자: Joshua Hawkeye - 작성자 3명의 게시물 4개 635회 조회

add font


please how can i add font to mit app inventor ?

--
see these threads custom font

-- 

ring fence


Re: App that notifies you when you are near a specific place.

Your example ring fence is 18 x 18 meters. Your GPS seldom has an Accuracy ( see the above tutorial) that good . Some times when you get a satellite ...
16. 12. 14. 작성자: SteveJG - 작성자 2명의 게시물 5개 55회 조회

Re: Help with app!

see these threads about ring fences https://groups.google.com/forum/#!searchin/ mitappinventortest/ring$20fence. your app must be up and running to ...
16. 7. 29. 작성자: Taifun - 작성자 5명의 게시물 15개 63회 조회

Hello friends I had made a location sensor app.

Hello friends I had made a location sensor app which compares the current lat, long with preloaded list of lat long and if it is in the ring fence It will raise ...
16. 6. 13. 작성자: ravl - 작성자 3명의 게시물 9개 39회 조회

Re: pulling data from fusion table into file in app inventor.

... wont be practical so please suggest me some option to make ring fence app with about 148 locations and an option to update or add further places .
16. 5. 6. 작성자: ravl - 작성자 2명의 게시물 4개 25회 조회

Re: Help me with a promotional app using google maps.

see these threads https://groups.google.com/forum/#!searchin/mitappinventortest/ ring$20fence%7Csort:date. Taifun ...
16. 4. 22. 작성자: Taifun - 작성자 2명의 게시물 2개 9회 조회

Re: Gps questions.

see these threads about ring fences https://groups.google.com/forum/#!searchin/ mitappinventortest/ring$20fence. your app must be up and running to ...
16. 4. 19. 작성자: Taifun - 작성자 2명의 게시물 3개 24회 조회

Re: GPS app for my school.

When you are reviewing the tutorials, look at techniques described for a 'ring fence' or others that help you tell your app user when they have arrived ...
16. 2. 26. 작성자: SteveJG - 작성자 2명의 게시물 2개 39회 조회

Re: Mapping for directions in school.

BackgroundImage and use a ring fence to find each room. You could have two lists, one with room numbers and one with the classes and use them to ...
16. 2. 12. 작성자: SteveJG - 작성자 3명의 게시물 3개 27회 조회

Re: Need to measure 27 feet.

3b) Use a ring-fence as described here. Chapter 18. Programming Your App to Make Decisions. Now, read or (re-read) the Location Sensor tutorial to ...
15. 11. 18. 작성자: SteveJG - 작성자 3명의 게시물 4개 38회 조회

Re: location sensor finding home.

... successful perhaps: https://groups.google.com/forum/#!searchin/ mitappinventortest/ring$20fence/mitappinventortest/EIQjSZTnVgc/ dG_RSlhFEQAJ.
15. 11. 16. 작성자: SteveJG - 작성자 2명의 게시물 5개 35회 조회

Re: "Navigation"

Without seeing the interval of your ring fence, I cannot comment as to whether the ring-fence should be smaller or not. See below-you will have to ...
15. 10. 31. 작성자: SteveJG - 작성자 4명의 게시물 9개 96회 조회

Re: Loading content on screen based on GPS coordinates.

Read the section on coding complex conditions in http://www.appinventor.org/ bookChapters/chapter18.pdf (This shows how to make a ring fence, ...
15. 8. 18. 작성자: SteveJG - 작성자 3명의 게시물 5개 201회 조회

Re: Scaling background image without distorting proportions.

... can create a hotspot on the Canvas so that when clicked the Canvas Touched will act as a button but only for the area you define with a 'ring fence.).
15. 5. 27. 작성자: SteveJG - 작성자 2명의 게시물 4개 1296회 조회

Re: Differentiate between moving and standing still.

establish a ring-fence .... see this article (the section on programming complex situations) http://www.appinventor.org/bookChapters/chapter18.pdf.
15. 5. 25. 작성자: SteveJG - 작성자 2명의 게시물 6개 33회 조회

Re: Create Geofences in AppInventor.

Your ring fence is 0.00008 deg lat by 0.00026 long. That is approximately 9 meters by about a little less than 28 meters (0.00001 of longitude at your ...
15. 4. 10. 작성자: SteveJG - 작성자 3명의 게시물 6개 470회 조회

Re: How to change an ImageSprite picture without using internal properties?

What it does is ring fence areas in the Canvas that respond to touch. There are 36 in the example; this can easily be expanded to 100. Instead of the ...
15. 3. 27. 작성자: SteveJG - 작성자 3명의 게시물 6개 41회 조회

Re: Year 11 Student Need HELP !

... you can use code in the 'ring fence' example here in the Complex Decisions section http://www.appinventor.org/bookChapters/chapter18.pdf .
15. 3. 21. 작성자: SteveJG - 작성자 1명의 게시물 1개 26회 조회

Re: image custom map.

... you can use code in the 'ring fence' example here in the Complex Decisions section http://www.appinventor.org/bookChapters/chapter18.pdf .
15. 3. 5. 작성자: SteveJG - 작성자 2명의 게시물 2개 14회 조회

Re: How to add specific lat and long in blocks?

What you are attempting is to establish a ring-fence .... see this article (the section on programming complex situations) ...
15. 3. 4. 작성자: SteveJG - 작성자 3명의 게시물 12개 49회 조회

Re: Coordinates help.

If we use the NW corner and the SE corner of the building, we define the rectangle for building A as far as the ring fence algorithm is concerned. I show ...
15. 1. 21. 작성자: SteveJG - 작성자 3명의 게시물 26개 122회 조회

Help me with a promotional app using google maps


As international level crossing awareness day is approaching I wanted to make an app in app inventorwhich could raise an alert using GPS co-ordinates that you are heading a level crossing be alert anmd want to display information related to that level crossing etc. can any one help I had collected all the level crossings co-ordinates and want to trigger a notification when any one reaches in 600 mts radius again at 200 mts radius.

--
see these threads ring fence

-- 

Use HTML in AppInventor


Is it possible to use a html form with different input fields and get the posts in AppInventor?
Fo example a contact form. I'd like to use the data from an html contact form in AI2.

--
I think, this is possible
you could pass the form values in the webviewstring of the webviewer back to App Inventor
see some HTML/JavaScript examples here https://puravidaapps.com/tutorials.php#html

✻✻✻✻✻
HTML file
<!doctype html> 
<head> 
 <meta name="author" content="puravidaapps.com"> 
 <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> 
 <title>Test</title> 
</head> 

<body>
<script> document.write("The value from the app is<br />" + window.AppInventor.getWebViewString()); window.AppInventor.setWebViewString("hello from Javascript") </script>
</body> 
</html>

file:///mnt/sdcard/AppInventor/assets/webviewstring.html
file:///android_asset/webviewstring.html

✻✻✻

Searching in TinyDB


I created a TinyDB in which the user can store productinformation, they read out from a NFC tag. 
The information looks like shown below:

Serielno: 12345
Type: T-Shirt
Size: Large

The information is loaded in the TinyDB as one entry.
Now I am creating a searchoption. The user needs to search for serialnumber and the enty containing this number is shown in a textbox.
I have tried multiple blocks to filter te TinyDB for a given serialnumber, but is doesn't filter the entry which contains that number/piece of text. I always get the message that the product is not found.
See the screenshot for the used blocks.

Hope someone can help me out!

 21 NFCDB (blocks) - zoekfunctie 5 (niet werkend).jpg

--
This should work.

 Capture.PNG

-- 
I see two different names for the TinyDB component ...
TinyDB2 and SavedApronsDB ?

You know that they are the same database, right?

--
Thanks for your reply.

I copied your setup but I keep getting the same message, product not found. Probably it has the same problem as my setup, it can't find the tag with only the serialnumber.

--
Thanks for your reply.

It was a little mistake, but doesn't change the problem I'm having.

--
Both images in this thread are currently irretrievable, for some unknown reason,
so I'll offer some blind ideas ...

The TinyDb storage of your data is in an unexpected format;
Code a test routine to loop through all tags and dump their
tag/value pairs to a ListView.  Surround both the tag and value with quotes,
to expose hidden whitespace.

Your scanner is adding whitespace to its input.
Wrap its output in quotes and display it in a label.

-- 
Thanks for your time! 

Is it possible that you can show an example of what your saying?
I'm not really understanding what you mean.

--
See attached for how to dump the contents of your TinyDB.

 2016-03-03 13_06_47-5554__build_.png

 blocks.png

 Designer.png



-- 
Thanks for your response! You helped me 1 step closer to the wanted result. 

I got the app to show the listed data, but is still doesn't filter on a given serialnumber. Instead it just shows al the listed data.

--
Can you post your modified blocks? And maybe an .aia?

--  
See the attachment for my implementation of the blocks.

 21 NFCDB (blocks) - zoekfunctie 7 (niet werkend).jpg

--
When you click the search button, you will get in the listview all tags that are in the SavedApronsDB. If that is what you want, fine.
But you could do that directly by set listviiw1 elements to call SavedApronsDB.getTags.
And, you are building a list in global tag of all the values of these tags. Why?? You have them in the TinyDB, and you could retrieve the value from the TinyDB if your user selects a tag from the listview.
I am missing a: when ListView1.AfterPicking block. If the user selects an item from the listview, you could retrieve the value from the SavedAprons_DB and display what you receive in a label.

-- 
Let's get back to the original problem.

You say you read serial numbers with a sensor, and want to look up TinyDB tags by the incoming serial numbers, but you never get a match.

So there are these things that might be going wrong ...

The serial numbers never arrive from the sensor,
The serial numbers aren't in your TinyDB tags, or are coded weird,
The serial numbers arrive from the sensor, but are coded weird.

I gave you a dump procedure to answer the second hypotheses, by seeing what's in TinyDB.

At this point, if you have actually seen what is in TinyDB (which I am not sure of, by the typos in your copy of my procedure),
the next step is to display the sensor reading of the serial number and screen print it.
Wrap the serial number in quotes, so we can see if there is anything extra riding along.

I do NOT mean typing a serial number into a block.
I mean capturing a serial number from the sensor into a global variable or label,
then displaying its contents in the Blocks Editor using a right-click-DoIt ,
taking a screen shot, and posting it here.

This mismatch can not be diagnosed without the Do It shot.

-- 
I got the TinyDB up and running and since your example I can find the tags that are saved in the TinyDB. The only problem is that when I use my Search optoin, it shows al the saved tags.
The next step in need to build is that the saved tag can been search for by entering a little piece of text of the tag.
So when the following tag is in the TinyDB:

Typ: Shirt
Serialno.: 12345
Size: XL

User need to get access to this piece of data by searching for: 12345. The user enters this in a textbox and another textbox shows the matching tag.
The problem now is, that the app ignores the 12345 and just shows the whole list. Both in the listviewer and in the textbox version. (The perfect app for us is one whitout the listviewer option)
What I want is that the app looks for an entry in the list, by searching for a little piece of the tag.

I think that the problem maybe caused by the fact that the listentry is multilined, the three lines above are one piece in the list. 
Or that the app doesn't make a new listitem when a new tag is entered?

EDIT: 

I have been trying to make the searchfunction work, but so far I have come only to display an message when the entry is in our searchbox is false. When a serialnumber is enter that is in the TinyDB I wil get the saved Tag. But, when multiple tags are entered, only the first one wil show, even when the serialnumber of the second tag is being searched for.

Attached you find the blocks.

 21 NFCDB (blocks) - zoekfunctie 9 (filter nog niet werkend).jpg

--
to simplify things, my recommendation is to use a fusiontable to store your data
you can easily send queries to the table like this
SELECT * FROM <tableid> WHERE Serialno = "12345"

--
For the TinyDB case, did you think of filtering the list entries by using the "contains text ... piece ... " text block?

--
The data needs to bestored on the device of the user. There are going to be multiple users, where each user has his own database. Thereby it can't be that databases of multiple users are stored together.
We want the users of the app to get a database of the products they are using. Not a database with the product their neighbour is using.


I have been looking at the Fusion Table DB, but I don't think it's a suitable solution for what we want with the app. (correct me if I'm wrong)

--
I have tried that option, but could not get it to work somehow. 

-- 
you could use a fusiontable, but you would have to add another column to identify the user to make sure, a user can only see his data

unfortunately MIT App Inventor does not offer access to the local SQlite database, but I can offer my SQlite extension
for more information see here https://puravidaapps.com/sqliteExt.php

The App Inventor Extensions are currently in testing. See the announcement for more information and read the App Inventor Extensions document about how to use an App Inventor Extension.

--
But isn't it possible to use the TinyDB? 

--
But isn't it possible to use the TinyDB? 
sure, it's possible, but more complicated

I think that the problem maybe caused by the fact that the listentry is multilined, the three lines above are one piece in the list. 
probably yes

you also can work with lists and list of lists
for example use one list to only store the serial numbers
and another list to store the detail data (this will be a list of lists)
then store the 2 lists in 2 separate tags in TinyDB

to search for a serial number, just get the selection index in list1 and use that selection index to get the detail data from list2


--
The user is going to scan the data from a NFC chip in the products. I have been looking at lists of lists, but is seems not to work. 
I wasn't able to separed the different lines from the chip into different textboxes, to make a list of list.

--
you always can use text blocks to split information

--
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
 Top 5 Tips: How to learn App Inventor

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.

--