sfu-innovation / wifilocator Goto Github PK
View Code? Open in Web Editor NEWWifi demo app for SFU Mobile
Wifi demo app for SFU Mobile
I was using this method to make sure the sign in page gets removed from the activity stack. This works if the app already has persisted the access token, but not for first time login. I think I'll have to call the sign in activity's finish() method at the right time to get the desired effect.
push notification, search event at near by zones
/getevents/zone_name
columns:
name (str),
organization (str),
time (datetime),
zone (Area - Key),
detail (str)
Put constant strings in another file, and reference the strings in that class in your twitter activity. Then do a git ignore on the file with the constant strings.. kkthx :D
Need to remove the friend relationship from the database when a user is deleted, otherwise it will cause the getfriendlist request to crash when one of the friends has been deleted.
Note: I think this issue is probably something that should be handled by the delete user method, rather than the getfriendlist method. Although, maybe we should also add a check to the getfriendlist method.
http://wifi-location.appspot.com/getfriends/Betty
should return:
{"Betty": Unknown}
try:
mail.SendMessage(to='[email protected]',
from='[email protected]',
subject='Test Email',
body='Testing')
except apiproxy_errors.OverQuotaError, message:
logging.error(message)
self.response.out.write('The email could not be sent. '
'Please try again later.')
The status of polling the server should be checked to see if there are any outstanding friend requests.
app crash re-enables auto polling regardless of previous state
As a user, I want to see my friends full names when I view my friend list and pending friendship requests. The server should put them both in the response body. Please alert the client side devs when this change goes in.
I want to be able to view my location on a map. The server should send the client a maps showing their location.
proposed
http://wifi-location.appspot.com/request/
http://wifi-location.appspot.com/accept/
[OLD] http://wifi-location.appspot.com/getrequests/
[NEW] http://wifi-location.appspot.com/request/pending/friendships
[OLD] http://wifi-location.appspot.com/acceptrequest/
[NEW] http://wifi-location.appspot.com/accept/friendship
now that map images have been created for each zone we need to have the get map method return the correct file name of the image associated with a zone. The get map function already exists so I believe this should involve just be a simple updating of the database tables. Also we need to find and document the image url for the client users.
for many of our post requests we have simply handled error cases by returning a plain text debug message (ex. "request_not_found"). These messages should be changed to json format to make the response formats more uniform.
The proposed format is:
{ "status" : 1, "message": "request_not_found"}
the status integer value is a return code with 0 meaning success and higher numbers associated with standard errors. The message field is a short plain text message which is useful for debugging, but can be removed for the final production version.
When the twitter servers throw a 503 because of heavy load, the twitter app doesn't launch properly, and the blank sign in page is displayed
http://wifi-location.appspot.com/getzone/Betty/00:1f:45:64:16:c8
Should return:
{"zone_id": -1, "user_location": -1, "last_update": "Unknown", "user": "Unknown", "mac_address": "00:1f:45:64:16:c8", "zone_name": "Unknown"}
http://wifi-location.appspot.com/getzone/Catherine/00:1f:45:64:16:xx
Should return:
{"zone_id": -1, "user_location": -1, "last_update": "Unknown", "user": "Catherine", "mac_address": "Unknown", "zone_name": "Unknown"}
When a user first authenticates, they must enter their username and password in the browser to get an access token and save it to persistent storage. After they log in successfully, trying to navigate back to the main activity causes the app to crash. To test, reinstall a fresh version of the app on your device and log into twitter, then hit back.
Since this whole application requires the use of the sfu wifi points, we should make sure that we are only running on wifi
FriendRequest: (user_id, friend_id)
and also:
POST sendrequest - BODY: {user_id: 123, user_id: 456}
GET getrequest/user_id RETURN: {frind_name: mike, friend_request_id: 111}
POST acceptrequest/friend_request_id BODY: {}
Currently the bb client does a PIN style based oauth to gain access to twitter. Switch out of out of band method
using post and delete HTTP request I am going to implement add/remove functionality to the friends table.
Hedy is testing the app on her 2.1 device and twitter is crashing. Find out what's wrong here.
Request: http://wifi-location.appspot.com/request/pending/friendships
Body: {"user_id" : 28001}
Response: {"status": 0, "requests": [{"friend_name": "Jordan", "request_id": "45011"}]}
I think the request_id should be an int instead of a string to keep consistency. To accept the friend request we have to pass the request_id as an int. Let me know if you think otherwise.
so far we have logging on a couple of the important methods, it would be useful to expand the logging to cover all of our server methods.
I was suggested that we add a field to the response from the "get friend location" request to show the filename of the map image where that friend is located.
Fix it!
Not sure of the best way to test this. Maybe just let them both run for an hour when the phone is fully charged.
implement a fast way to lazy load images for each user in twitter
so we can use it as a thread hold value when signal is weak
so far I have created regression test cases for two functions ("setuser" and "setfriend"). We need to create test for the other methods.
for A to add B
A ask for B's QR code - Triggers pulling friend list for 5 mins
A scans B and A's device send POST sendRequest to server to create a friend request
B's device fetch list of requests. GET getRequest/user_id
B accepts: POST acceptRequest/friend_request_id
Server creates two new entries in Friends table
A and B are friends! and their friend list should be updated.
Since we are on wifi we dont need to care about data usage , but we do need to care about battery.
It is relaly important to see if its more efficient to draw something 1000 times or send 1000 maps with distinct zones
The tweets need to be cached so on startup the table is filled with some entries from that zone
Date-time values are stored as and returned using the UTC time zone
http://pypi.python.org/pypi/py-pretty/1
http://stackoverflow.com/questions/1551382/python-user-friendly-time-format
When I send a post request to the server with a valid friend id I get:
Traceback (most recent call last): When I send a request with an invalid friend id I get a proper response: {"Status": 2, "request_id": "unknown"}
This might be difficult. Right now it just hangs on a black screen for a second or two. The sign in page doesn't even display before the tweets are fetched and loaded. I'll have to do some digging to see what is causing the issue.
We need to consider other bssid's that may have a stronger signal than the one currently connected to.
Instead of getting the exact time, day, hour , minute, month, date. We should juts get
2 days ago.. or 3 hours ago... or 5 minutes ago.. This more user friendly and should be handled on the server
Instead of storing the friend request, it should return a status code, saying that you've already sent a friend request to that user.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.