Skip to content
Lrac edited this page Sep 21, 2014 · 4 revisions

##Android app Below is a brief description of each class in the FakeNotifications app and what it's there for


####ConnectionService.java This service is started by Main, and starts/maintains the connection to the XMPP server. It receives all incoming messages from the server and passes them to Main for handling. It also receives logging messages from various classes and sends those back through to the XMPP server. Make sure you specify the correct HOST, PORT, USERNAME, PASSWORD, and RECEIVE_FROM or you won't be able to connect to the XMPP server.


####Main.java This is the main activity of the app. It starts/stops the ConnectionService, and handles the sending of messages to other devices (pebble and glass). It also starts the appropriate activity for android texts/calls (either DisplayNewMessage or PhoneCall). In the app, it appears as the text message inbox and shows all the senders and their most recent message.


####DisplayNewMessage.java This activity displays all the text messages between the user and a specific sender. It's opened either when the user taps on a new text notification, or they select that sender from the inbox activity (Main). It allows them to reply back with their own messages or with preset text messages.


####PhoneCall.java This activity emulates an incoming phone call. It currently displays the sender's name and number, as well as a default image. User's have the option to accept, decline, or answer back with a preset message.


####TextMessage.java This is an object that holds all the information for a text message (sender, list of texts, sent time). Used by Main and PhoneCall.


####ScreenReceiver.java Broadcast receiver that detects whenever the user turns off the screen, turns on the screen, or unlocks the phone.


####MyAdapter.java/MessageAdapter.java Custom adapter used to populate the ListViews for the Main(inbox) and DisplayNewMessage screen respectively.


####PebbleKit.java/Constants.java Classes used to allow for sending/receiving data to/from the Pebble.


####MTMDecision.java/MemorizingActivity.java/MemorizingTrustManager.java These are necessary for connecting to the XMPP server, but will basically only be used when connecting to a new server for the first time.


Clone this wiki locally