2016년 11월 28일 월요일

send image to drive


what is my problem for?? 
 capdrive.png
the url not valid and the request not valid 

-- 
it is Content-Type and not content_type
also it is
Authorization without : and in the next row
Bearer followed by a space followed by the access token

-- 
 capdrive1.png

thinks Taifun for help but my problem not resolved 

-- 
let me suggest to work more carefully...
it is Content-Type and not content-type
it is Bearer and not bearer

and in case you do not get is running, see here
-- 
 cap3.png


thanks! not work again 

-- 
yes, a correct url always starts with http or https
the access token is valid only for 1 hour, nobody is able to know, which access token will be the correct one for you

-- 
My application has a lot of user who must send images and information on google drive and merge table as database; The toturiel of https://puravidaapps.com/drive.php is a complicated for me!
How I can get my access token and token ID!
Thank you infinitely

-- 
see the large green box on the bottom of that page https://puravidaapps.com/drive.php how to get the source code of the example


-- 

Can an app be embedded into a webpage


Can an app be embedded into a webpage? The student has built the app and I'd like to have them display on their portfolio page. 

-- 
as far as I know this is not possible, I might be wrong
Taifun



Trying to push the limits of App InventorSnippetsTutorials and Extensions from Pura Vida Apps by Taifun. 

-- 
I found this: http://runthatapp.com/
it's not free, but it can show a working apk on a browser. The first example is an iPhone. Scroll down and click on CLICK HERE FOR ANDROID DEMO.

-- 
Interesting!
Did you find how you could use internal storage, like TinyDB or SD-card?
Cheers, Ghica.

-- 


Taifun File Extension


I've been working with Taifuns file extension and got most everything working. 
I have a app that records audio and video. You are able to export both and save both in a tinydb for recall. 

in order to export video I used the get content uri from the extenstion.  That will display the correct path to the video.

I would like to delete the video when the tinydb entry is deleted.  Im using the delete filename extension, and using the label Path.text  (this block holds the content uri path from the load and playback)
but it doesnt delete the file.

Any ideas?

-- 
use the complete filename of the video to delete it (and not the content uri)

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

-- 
 11-28-2016 6-02-58 PM.png

Here are the blocks showing whats going on..  As you can see the content uri will 'find' the clips location on the device and display the whole path plus file name.

In the list files block you see that it lists all the files in that directory, which is the same as the content uri displays.

Is there a work around for putting the filename in the block?   I need to be able to delete the file associated with that entry/uri where ever it is on the device.

I've tried on a few different devices and the path is a little different depending on the phone, but it lists the correct path every time.  I just need to be able to delete the file when I delete the associated record in the tiny db.  (the delete code is in the notify block and is very lengthy, but its a standard delete the entry and clear tag)  Once it works Im putting the delete blocks into the notify delete to make it delete the file and entry at once.  THe above code is just testing.

-- 

your version 2 looks fine
you are trying to delete a file from an external sdcard


unfortunately I do not have such device, so I can't test this
I now set the feature "deleting a file from the external sdcard" to experimental
there might be the similar restrictions as for copying files, see the notes below the copy method here https://puravidaapps.com/file.php


-- 
It may look ok, but it doesnt work.  Ive tried it on a device with a sd card and one without.

I can show the path and filename with the uri in a label and use that label to display the correct path, but it doesnt delete the file, no error, no message....

I put the the code to a file on the device and it deleted no problem. 


Using ES File explorer, I tried to rename a file on the SD (to make it easier to find) and it threw a message that my device did not allow ES to to make edits to the SD card unless the device is rooted. HOWEVER, I was able to rename that same file using the file manager that came on the device.  

Does your extension need permissions to delete from the SD?

-- 
I found this post http://android.stackexchange.com/a/96604 

but unfortunately I will not be able to follow that recommendation, because (as already said) I do not have a device witch has an external sdcard, so I'm not able to implement this...

-- 
I think there must be a bug when it comes to the external SD card.  Ive tried every way under the sun to delete a file. starting with File:///mnt/extSdCard/DCIM/Camera/filename.mp4 and going down to filename.mp4.

I can delete just fine from the device.  I think it may be something in the OS.  ES File Explorer and another file manager is 'not allowed' to make edits to the sd, but the preloaded file manager can delete, rename anything on the SD.

Does anyone know a work around?  Ive tried activity starters, file, taifuns file extension, everything.

Just reading through posts I know there are a bunch of people who have the same issue.

-- 
read again the links in my previous answer
use the internal sdcard instead

Taifun


-- 

TextToSpeech


Hello,

A couple of questions about the TextToSpeech media component:

1. Is there any plan to add Greek to supported languages?
2. How can I fix the bug when the TextToSpeech does not pronounce the char "-"? It's ok when it has to pronounce "+" (it pronounces it as plus in English) or other symbols, but with "-" (the minus symbol) it says nothing. However, when it has to pronounce "-1" everything is fine (it says "minus one").

Thanks a lot,

-- 
Greek as supported languages?  The text to speech engine MIT AI2 links to  is part of the Android operating system.   Greek is not supported so perhaps look here: https://www.google.com/search?q=tts+android+greek&oq=tts+android+greek&aqs=chrome..69i57.7055j0j7&sourceid=chrome&ie=UTF-8  for other TTS engines...these may or may not be supported by the AI2 TTS component.

To get TTS to 'speak' unusual characters ( does not pronounce the char "-" )   you need to provide some logic blocks.     If "-" then substitute the word  'dash' perhaps using appropriate blocks whenever a dash occurs.     How you do this depends on what your source text is for the TTS block.   You might have to use a replace block to substitute everywhere for the 'unpronounceable' word or character.

Try some blocks. When you get a workable solution, why not post some blocks so others can share in your solution?

-- 
Thanks for the reply,

I'll try to work out the Greek language thing.

The problem with the "-" symbol is that I don't want to hardcode it as "minus" or "dash". The reason is that when English is selected as the device language, "-" should be pronounced as "minus". However, if the device language is e.g. French, the system should automatically pronounce it as "moins", giving thus the capability of auto-localisation of the app. I don't know if it's intended or not, but I see no reason why other arithmetic symbols are pronounced just fine (e.g. "×" or "÷", pronounced "times" and "divided by" respectively).

-- 
 Google did not include the capability to pronounce ALL possible symbols and letters. Developers need to write their own TTS or live with what Google provides 'free.'

I you want to substitute   moins, then you need more logic blocks       In pseudo code,   if   device language is en then replace with 'dash' else if fr then replace with 'moins'.  This is not an issue exclusive to AI2, the pronunciation issue is also present when using the professional Eclipse and Android Studio 2  compilers when the Android TTS is used.  If you want added capability to filter and make available alternative pronunciation, it is possible, complex and will require additional coding.

-- 
I don't know how device language can be detected with ai2, but, in any case, all not pronouncable chars would have to be hardcoded for all languages.

Thanks a lot, I'll come back if I manage to find a solution to this.

-- 

I don't know how device language can be detected with ai2,
my tools extension https://puravidaapps.com/tools.php can do it

Taifun

-- 
Thanks Taifun, I'll use it

-- 

2 DIM ARRAYS - REALLY LOST, pls help


Hi all

I love this app, for someone like me its so great I can join in the "new world".
So, Im trying to create 2 dim arrays so i can use them as look up table,
How do i create string and integer 2 dimension variables?
How do I assign values to them?

pls help.
Many many thanks in advance.

Sof

-- 

How do i create string and integer 2 dimension variables?
How do I assign values to them?

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.

Taifun

-- 

Javascript reload


I have a screen with webview load an html/javascript. When i change the screen script is reloaded, and the screen does not remain running. Can someone help me?

I hope image can help my very bad english

After.png 표시 중

Before.png 표시 중
Block.PNG 표시 중
Designer.PNG 표시 중

flappy bird


Hi i am on my half way to build the flappy bird app by watching the tutorial on youtube https://www.youtube.com/channel/UCfVUHABep-4xlpD78AFzdgA.
mean while i got stuck in the place where branches should be move from right to left and as result they got stuck in there current position so i am facing problem to solve this bug.
i am attaching the snapshot of blocks and game at which it was stuck.
please help me!!
bug.PNG 표시 중

4bbae21e-4386-4ae4-b739-71724564c4a4.jpg 표시 중

-- 
Have you you posted this question on the 3D Print N Pack YouTube discussion thread?
They know how the app works.

--
got no reply


-- 
I added additional suggestions to my reply...

--
how about starting with my version?
here's a simpler one to start with.

-- 
i coded my version exactly like a video and they provided source code to that also, i figured no difference between provided code and the one i wrote while watching the tutorial but still error occurs   

-- 
Thanks ScottFerguson 


--