A shell for building Android apps with Strava authentication.
ExampleAuthActivity | ExampleMainActivity |
---|---|
Available via jcenter()
:
Gradle:
Add the following to your Android application's build.gradle
file:
dependencies {
compile 'com.samsandberg.stravaauthenticator:strava-authenticator-android:2.0.0'
}
OR
Maven:
<dependency>
<groupId>com.samsandberg.stravaauthenticator</groupId>
<artifactId>strava-authenticator-android</artifactId>
<version>2.0.0</version>
<type>pom</type>
</dependency>
In your Android app, create an activity that extends StravaAuthenticateActivity, and override a few of the protected methods, in the very least: getStravaClientId()
, getStravaClientSecret()
, and getStravaActivityIntent()
.
Included is an example app with an ExampleAuthActivity that redirects to ExampleMainActivity on successful auth.
Some boilerplate OAuth code used from Android OAuth Client Library (android-oauth-client)
https://github.com/wuman/android-oauth-client
Copyright 2013 David Wu Copyright (C) 2010 Google Inc.
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.
- https://github.com/wuman/android-oauth-client
- http://search.maven.org/#search|gav|1|g:"com.wu-man" AND a:"android-oauth-client"
- http://strava.github.io/api/v3/oauth/
- https://www.strava.com/settings/api
- https://developers.strava.com/
- https://www.strava.com/legal/api
- https://developers.strava.com/guidelines/