2017년 1월 6일 금요일

TimeStamp


Hi, I want to display a list of new messages from a user's chat page.
At the moment, my code is: SELECT Message FROM <tableid> WHERE TargetUser = <currentuser> AND TimeStamp = (from between the time when the user last opened the page and now).
Is there any way to calculate this?
I have saved the time when the user exited the page into a variable and the time when the user opened it again into a different one.
I just want to know how to get all the messages where the target user is the current one and the timestamp is from between the time when the user last opened the page and now.

-- 
According to the SQL Reference at https://developers.google.com/fusiontables/docs/v2/sql-reference
you will need an extra filter clause on the timestamp column
to set the lower bound.
You don't need an upper bound, because you want to see everything till now.
Save the timestamp in TinyDB (tag = "LastTimeStamp") after each message, for future reference next time you start this app.
See the SQL Reference for the special formats recognized for timestamp comparison.

Filtering on DATETIME
When filtering on a column of type DATETIME, the <value> should be formatted as one of the following supported formats:

⦁ MMM dd, yy
⦁ MM/dd/yy
⦁ MM-dd-yy
⦁ MMM-dd-yy
⦁ yyyy.MM.dd
⦁ dd-MMM-yy
⦁ MMM/yy
⦁ MMM yy
⦁ dd/MMM/yy
⦁ yyyy

-- 
Oh, and by the way, you need timestamp >= , not timestamp =.

-- 
So would this work?
SELECT Message FROM <tableid> WHERE TargetUser = <currentuser> AND TimeStamp >= <LastTimeStamp>

-- 
Try it.

Catch the outgoing SQL statement somewhere so we can read it,
and see how it worked.

-- 
I'm not quite sure how to get the SQL statement, but it definitely worked! :)
Thanks!

--

I'm not quite sure how to get the SQL statement

-- 

explain an error message for length of list


Can someone explain this error please , i searched everywhere and i didn't get it 

Sans titre.png 표시 중

--
my guess is you get an error message because the list is not long enough in case the email address is not in the table?
what about adding an if statement like this
 if length of list < 6 then "sorry, email is not in the list"
next time you might want to provide a screenshot of the error message?

-- 

Export project and all projects fail


I cannot seem to export any aia files from AppInventor.  I have tried to export files individually and as a group (all).  The first time the system provided a message that said to be patient.  Then it seemed to lock up.  I logged out and in, but there has been no change.

I suspect the fact that I have a BUNCH of projects may have something to do with the behavior I am seeing, and am therefore trying to export the aia files one at a time (as mentioned in the forum).  However, this does not seem to be working for me.

Is there something that anyone can suggest to get around this?  I want the aia files that are in my account, but as they are so numerous (200+), it really takes AI a long time to open up.

--
you only can use the "export all" feature, if you have a reasonable amount of projects
it looks like 200 projects is too much, you will have to export them one by one

-- 
The export is not working at all now, either as single aia files or as export all.

I have tried Chrome, FF, and even IE (for fun).

No joy.

Might it be related to the fact that I have 200+ projects?

The point is, now no export is possible.

Thanks for any help you can provide.

-- 

Flash Cam


I need Switch On and Switch Off the flash of my phone, but I don't find the control.

Where is it?

How I can do it?

Thanks in advance

--
you can't do this using the built-in blocks of AppInventor

probably 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 don'k believe that any people use the front flash i the aplication.

Where can I find  a sample?

I don't know how to do a new block.
-- 

Where can I find  a sample?
A sample of what?

There's another version of App Inventor 2 called Appy Builder, there's a free and paid subscriptions. The free one includes using the camera flash. http://appybuilder.com/

-- 

Re: Display a portion of a PDF as one screen


I am trying to convert our Emergency and Safety Procedures flip chart into an app that can be placed on our internal devices.

Current fix has the app pulling a PDF viewer, but the app does not recognize the file path. I have successfully opened the PDF viewer with one of my buttons.
The PDF viewer locates the files, the files are stored on the local SD Card.

Am I just missing what the file location is?

--

Am I just missing what the file location is?
probably es

How to view a pdf document

-- 
file://storage/extSdCard/download/FIRE_EVACUATION.pdf

That is what I have typed in. Below is what part of the code looks like. The top one properly calls the PDF viewer, the bottom throws an error saying, "This file could not be accessed. Check the location or the network and try again."

 Capture3.PNG



-- 
Potential fix:

file://mnt/storage/extSdCard/download/(file name).pdf

Will be testing with under score and without under score to see if this resolves the issue.

-- 
This has fixed the issue with the app. The app pulls the file regardless of underscore or no underscore.

For future issues that are similar to this recommend having file path as: file://mnt/storage/(file location on device)/(file name)(file extension)Thank you for all of your assistance.

--