Android app to open an intercom system, which is connected to a Particle Photon.
Created in collaboration with @sjparkinson.
Visit our hackster.io page to see how we made it.
- Clone
- Import with Android Studio
- Configure the app
- Connect device or emulator
- Build and run
All of the secret values of this app have been extracted into the .secrets
directory.
To run the app for with your photon and service you will need to configure the following values.
-
Login or create a Firebase account, then create a new app.
-
In the directory
.secrets/props
there is a file calledapp.properties.example
-
Copy and rename this file in the same location, to
app.properties
-
Fill in the config file with your particle and Firebase settings
# This is an example app.properties file. particle_device=device-id particle_auth=Authorization: particle-auth firebase_endpoint=https://the-door-unlocker.firebaseio.com/ firebase_secret=custom-auth-token
-
Add following to the
local.properties
fileapp.props.file=../.secrets/props/app.properties
To create an app that can be installed on a device and recieve GCM messages you'll need to create a keystore. Learn how to sign the app here https://developer.android.com/tools/publishing/app-signing.html
Similar to the steps above:
-
In the directory
.secrets/props
there is a file calledkeystore.properties.example
-
Copy and rename this file in the same location, to
keystore-debug.properties
&keystore-release.properties
-
Fill in the config file with keystore alias and passwords
# This is an example keystore.properties file. store=../.secrets/keys/app-release.keystore alias=your_alias storePass=your_keystore_password pass=your_password
-
Add following to the
local.properties
filekeystore-debug.props.file=../.secrets/props/keystore-debug.properties keystore-release.props.file=../.secrets/props/keystore-release.properties
I have already registered the current app ids for release and debug so first step is to change the applicationId
in the build.gradle
file.
To setup cloud messaging follow the guide in the Google developers documentation.
https://developers.google.com/cloud-messaging/android/start
Once you have a configuration file for release and debug (if you want a different AppId for debug).
Add them to mobile/src/debug/google-services.json
& mobile/src/release/google-services.json
Fabric is a very useful tool for crash reporting, simple analytics, and beta distribution.
to use fabric add a fabric.properties
file with your apiSecret & apiKey in the /mobile
directory.
https://docs.fabric.io/android/fabric/integration.html#add-api-key-and-build-secret
- | Status |
---|---|
master |
Copyright 2016 Andrew Jack
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.