-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release Android app to Google Play store (#3)
* Attempt to generate a signed APK * Overcome release issues * Access release key password from keychain * Fix unmet dependency error * Add About page and Contact info; close #1 * Add venmo link #1 * Change section order on About page * Detect internet connection before making request * Edit contents of about page * Edit about page and restrict stations * Fix default station issue * Customize home screen icon
- Loading branch information
Showing
21 changed files
with
480 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Releasing | ||
|
||
## Android | ||
|
||
This document describes the process of releasing a new software version to the Android Store. Adapted from [source](https://facebook.github.io/react-native/docs/signed-apk-android.html). | ||
|
||
### Prerequisites | ||
|
||
#### Release Key | ||
|
||
```` sh | ||
cd android/app | ||
```` | ||
|
||
Generate a release key called `next-train-ct-release-key.keystore` with an alias called `next-train-ct-key-alias`. | ||
|
||
```` sh | ||
keytool -genkey -v -keystore next-train-ct-release-key.keystore -alias next-train-ct-key-alias -keyalg RSA -keysize 2048 -validity 10000 | ||
```` | ||
|
||
Ensure it is not being tracked by version control. | ||
|
||
Save it somewhere secure. | ||
|
||
[Add it to your Mac OS Keychain](https://pilloxa.gitlab.io/posts/safer-passwords-in-gradle/): | ||
|
||
+ Item Name: `next-train-ct-android-release-key` | ||
+ Account Name: `mjr` | ||
+ Password: HIDDEN | ||
|
||
#### Home Screen Icons | ||
|
||
Save icon images as `ic_launcher.png` in various directories within `/android/app/src/main/res/mipmap-*`: | ||
|
||
+ 72*72 in mipmap-hdpi | ||
+ 48*48 in mipmap-mdpi | ||
+ 96*96 in mipmap-xhdpi | ||
+ 144*144 in mipmap-xxhdpi. | ||
|
||
### Releasing | ||
|
||
Generate an APK: | ||
|
||
```` sh | ||
cd android && ./gradlew assembleRelease | ||
```` | ||
|
||
Upload the APK file (`android/app/build/outputs/apk/app-release.apk`) to the [Google Play Developer Console](https://play.google.com/apps/publish/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
import React, {Component} from 'react'; | ||
import {Text, StyleSheet, Linking, TouchableOpacity} from 'react-native' | ||
import { | ||
Container, Header, Title, Content, Footer, Button, Icon, List, ListItem, Badge | ||
} from 'native-base'; | ||
|
||
export default class About extends Component { | ||
constructor(props){ | ||
super(props) | ||
this.navigator = this.props.navigator; | ||
this.goBack = this.goBack.bind(this); | ||
this.goEmail = this.goEmail.bind(this); | ||
this.goTweet = this.goTweet.bind(this); | ||
this.goVenmo = this.goVenmo.bind(this); | ||
this.goClientRepo = this.goClientRepo.bind(this); | ||
this.goServerRepo = this.goServerRepo.bind(this); | ||
this.goGTFS = this.goGTFS.bind(this); | ||
} | ||
|
||
render() { | ||
return ( | ||
<Container> | ||
<Header> | ||
<Button transparent onPress={this.goBack}><Icon name="md-arrow-back" /></Button> | ||
<Title>About NextTrain CT</Title> | ||
</Header> | ||
|
||
<Content style={styles.content}> | ||
|
||
<Title style={styles.firstHeading}>About</Title> | ||
<Text style={styles.text}> | ||
Search Shore Line East transit schedules in a fast and easy way. | ||
Save a route to your favorites, then find out when the next train is coming anytime with the click of a button. | ||
</Text> | ||
|
||
<Title style={styles.heading}>Disclaimer</Title> | ||
<Text style={styles.text}> | ||
This app relies on Shore Line East schedule data published online by CTtransit. | ||
The app developer is not affiliated with Shore Line East or CTtransit, and cannot guarantee the accuracy of their data. | ||
If you notice an issue with the schedule data, please contact the developer, who will notify CTtransit. | ||
</Text> | ||
|
||
<Title style={styles.heading}>Contact</Title> | ||
<Text style={styles.text}> | ||
This app was made by MJ Rossetti, a native of Branford, CT. | ||
It relies on a backend web server which is operated by his software development company, Data Creative, as a free public service. | ||
</Text> | ||
<List> | ||
<ListItem iconLeft style={styles.listItem}> | ||
<Button transparent onPress={this.goTweet}> | ||
<Icon name='logo-twitter' style={styles.listItemIcon}/> | ||
<Text style={styles.listItemText}>Tweet @data_creative</Text> | ||
</Button> | ||
</ListItem> | ||
<ListItem iconLeft style={styles.listItem}> | ||
<Button transparent onPress={this.goEmail}> | ||
<Icon name='md-mail' style={styles.listItemIcon}/> | ||
<Text style={styles.listItemText}>Email datacreativellc@gmail.com</Text> | ||
</Button> | ||
</ListItem> | ||
</List> | ||
|
||
<Title style={styles.heading}>Donate</Title> | ||
<Text style={styles.text}> | ||
If you like this app, please consider donating. | ||
Your donations keep the servers running! | ||
</Text> | ||
<List> | ||
<ListItem iconLeft style={styles.listItem}> | ||
<Button transparent onPress={this.goVenmo}> | ||
<Icon name='logo-usd' style={styles.listItemIcon}/> | ||
<Text style={styles.listItemText}>{"Venmo $2.99 to @data_creative"}</Text> | ||
</Button> | ||
</ListItem> | ||
</List> | ||
|
||
<Title style={styles.heading}>Contribute</Title> | ||
<Text style={styles.text}> | ||
This app is powered by open data and open source software. | ||
If you know how to submit a PR or file an issue on GitHub, your contributions are welcome! | ||
</Text> | ||
<List> | ||
<ListItem iconLeft style={styles.listItem}> | ||
<Button transparent onPress={this.goClientRepo}> | ||
<Icon name='logo-github' style={styles.listItemIcon}/> | ||
<Text style={styles.listItemText}>Contribute to the mobile app</Text> | ||
</Button> | ||
</ListItem> | ||
<ListItem iconLeft style={styles.listItem}> | ||
<Button transparent onPress={this.goServerRepo}> | ||
<Icon name='logo-github' style={styles.listItemIcon}/> | ||
<Text style={styles.listItemText}>Contribute to the web service</Text> | ||
</Button> | ||
</ListItem> | ||
</List> | ||
|
||
|
||
</Content> | ||
|
||
</Container> | ||
); | ||
} | ||
|
||
goBack(){ | ||
this.navigator.pop() | ||
} | ||
|
||
linkTo(url){ | ||
Linking.openURL(url).catch(function(err){ console.error("LINKING ERROR", err) }) | ||
} | ||
|
||
goEmail(){ | ||
this.linkTo("mailto:datacreativellc@gmail.com") | ||
} | ||
|
||
goTweet(){ | ||
this.linkTo("https://twitter.com/data_creative") | ||
} | ||
|
||
goVenmo(){ | ||
this.linkTo("https://venmo.com/data_creative?txn=pay&amount=2.99") | ||
} | ||
|
||
goClientRepo(){ | ||
this.linkTo("https://github.com/data-creative/NextTrainCT") | ||
} | ||
|
||
goServerRepo(){ | ||
this.linkTo("https://github.com/data-creative/next-train-api") | ||
} | ||
|
||
goGTFS(){ | ||
this.linkTo("https://www.cttransit.com/about/developers") | ||
} | ||
}; | ||
|
||
About.propTypes = { | ||
navigator: React.PropTypes.object.isRequired // an instance of react-native Navigator | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
content: {margin: 20}, | ||
text: {marginTop: 10}, | ||
firstHeading: {color: "#7a7a7a"}, | ||
heading: {color: "#7a7a7a", marginTop: 10}, | ||
listItem: {height:60}, | ||
listItemIcon: {marginRight:13, color:'#282828'}, | ||
listItemText: {fontSize:18} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.