Skip to content

Commit

Permalink
Merge pull request #1 from astronomerio/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
perryao authored Aug 9, 2016
2 parents 11de599 + b182f39 commit 39b4558
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 20 deletions.
45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,54 @@ analytics-android
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.segment.analytics.android/analytics/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.segment.analytics.android/analytics)
[![Javadocs](http://javadoc-badge.appspot.com/com.segment.analytics.android/analytics.svg?label=javadoc)](http://javadoc-badge.appspot.com/com.segment.analytics.android/analytics)

analytics-android is an Android client for [Segment](https://segment.com)
analytics-android is an Android client for [Astronomer](https://astronomer.io)

## Documentation

You can find usage documentation at [https://segment.com/libraries/android](https://segment.com/libraries/android).

## Integrating with Segment
## Snapshots

Interested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.
All changes committed to master are automatically released as snapshots.

To add a snapshot dependency to your builds, make sure you add the snapshot repository so your build system can look up the dependency.

Maven users can add the following to their `pom.xml`:
```
<repository>
<id>ossrh</id>
<name>Sonatype Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
```

Gradle users should declare this in their repositories block:
```
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
```

# Open-Source at Astronomer

One of our core values at Astronomer is "openness." We see this manifest in our dedication to open-source. We are relentless to **only invent what we must invent**; to use and contribute to the large and growing body of open-source software that countless developers have selflessly contributed to the world.

And it's not just about receiving value. Open-source is a two-way street. A core element of our business strategy is to open-source the [Aries Framework](github.com/aries-data), with the goal to reduce the amount of time developers waste re-writing integrations.

We also have many open-source projects in [our main Github organization](https://github.com/astronomerio).

## Special Notice re: Analytics.js and Segment

Early on, in order to get clickstream data collection capability quickly within our platform, and after a conversation with Peter Reinhart (an early Analytics.js contributor and CEO of Segment), we decided to adopt Analytics.js to support it as a standard for clickstream data collection. As Segment has built a successful commercial venture around the core library, they've open-sourced a number of supporting plugins and SDKs that we've also adopted.

Clickstream is one part of Astronomer, and an important one to our early customers. We publicly thank Segment for their open-source contributions, it made it easier to stand up that part of our platform. In appreciation and in the spirit of our cooperation, we open-source all of our Analytics.js-related code, contributing back to a growing ecosystem.

## License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public class SampleApp extends Application {

// https://segment.com/segment-engineering/sources/android-test/settings/keys
private static final String ANALYTICS_WRITE_KEY = "5m6gbdgho6";
private static final String ANALYTICS_WRITE_KEY = "M22kc6xTTPyKmpfFg";

@Override public void onCreate() {
super.onCreate();
Expand All @@ -30,7 +30,7 @@ public class SampleApp extends Application {
// listener.
analytics.onIntegrationReady("Segment.io", new Analytics.Callback() {
@Override public void onReady(Object instance) {
Toast.makeText(SampleApp.this, "Segment integration!", Toast.LENGTH_LONG).show();
Toast.makeText(SampleApp.this, "Astronomer integration!", Toast.LENGTH_LONG).show();
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<resources>

<string name="app_name">Segment Sample</string>
<string name="app_name">Astronomer Sample</string>
<string name="action_view_docs">Docs</string>
<string name="no_browser_available">No browser to open link</string>
<string name="track_button_a">Track Button A</string>
Expand All @@ -40,4 +40,4 @@
<string name="update_stats">Update Stats</string>
<string name="id_required">Id should not be blank or empty</string>

</resources>
</resources>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">Segment Wear Sample</string>
<string name="app_name">Astronomer Wear Sample</string>

</resources>
2 changes: 1 addition & 1 deletion analytics-wear/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
POM_NAME=Segment Android Wear Analytics
POM_NAME=Astronomer Android Wear Analytics
POM_ARTIFACT_ID=analytics-wear
POM_PACKAGING=aar
2 changes: 1 addition & 1 deletion analytics/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
POM_NAME=Segment Android Analytics
POM_NAME=Astronomer Android Analytics
POM_ARTIFACT_ID=analytics
POM_PACKAGING=jar
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ private String authorizationHeader(String writeKey) {

/** Return a {@link HttpURLConnection} that reads JSON formatted project settings. */
public HttpURLConnection projectSettings(String writeKey) throws IOException {
return openConnection("https://cdn.segment.com/v1/projects/" + writeKey + "/settings");
return openConnection("https://cdn.astronomer.io/v1/projects/" + writeKey + "/settings");
}

/**
* Return a {@link HttpURLConnection} that writes batched payloads to {@code
* https://api.segment.io/v1/import}.
*/
public HttpURLConnection upload(String writeKey) throws IOException {
HttpURLConnection connection = openConnection("https://api.segment.io/v1/import");
HttpURLConnection connection = openConnection("https://api.astronomer.io/v1/import");
connection.setRequestProperty("Authorization", authorizationHeader(writeKey));
connection.setRequestProperty("Content-Encoding", "gzip");
connection.setDoOutput(true);
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
GROUP=com.segment.analytics.android
GROUP=io.astronomer.analytics.android

VERSION_CODE=416
VERSION_NAME=4.1.6-SNAPSHOT

POM_NAME=Segment for Android
POM_NAME=Astronomer for Android
POM_DESCRIPTION=The hassle-free way to add analytics to your Android app.

POM_URL=http://github.com/segmentio/analytics-android
POM_SCM_URL=http://github.com/segmentio/analytics-android
POM_SCM_CONNECTION=scm:git:git://github.com/segmentio/analytics-android.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/segmentio/analytics-android.git
POM_URL=http://github.com/astronomerio/analytics-android
POM_SCM_URL=http://github.com/astronomerio/analytics-android
POM_SCM_CONNECTION=scm:git:git://github.com/astronomerio/analytics-android.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/astronomerio/analytics-android.git

POM_LICENCE_NAME=The MIT License (MIT)
POM_LICENCE_URL=http://opensource.org/licenses/MIT
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=segmentio
POM_DEVELOPER_NAME=Segment, Inc.
POM_DEVELOPER_ID=astronomerio
POM_DEVELOPER_NAME=Astronomer, Inc.

0 comments on commit 39b4558

Please sign in to comment.