Skip to content

Commit

Permalink
Init starter project
Browse files Browse the repository at this point in the history
  • Loading branch information
Mesosfer authored and mesosfer committed Oct 20, 2016
1 parent 4b7112e commit ab02f3f
Show file tree
Hide file tree
Showing 26 changed files with 578 additions and 0 deletions.
Binary file added Library/MesosferSDK-Android-0.1.0.aar
Binary file not shown.
9 changes: 9 additions & 0 deletions Sample/01-starter-project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
22 changes: 22 additions & 0 deletions Sample/01-starter-project/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Sample/01-starter-project/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Sample/01-starter-project/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions Sample/01-starter-project/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Sample/01-starter-project/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Sample/01-starter-project/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions Sample/01-starter-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Mesosfer Starter Project for Android #


A library that gives you access to the powerful Mesosfer cloud platform from your Android app.
For more information about Mesosfer and its features, see [Mesosfer Website][mesosfer.com] and [Mesosfer Documentations][docs].

## Download
1. Download [the latest AAR][library] and copy it on `libs` directory.
2. Define in your `app` module `build.gradle` this code below before `dependencies`

```groovy
repositories{
flatDir {
dirs 'libs'
}
}
```

Then add this code below on `dependencies` :

```groovy
compile 'com.eyro.mesosfer:MesosferSDK-Android:0.1.0@aar'
```

## Setup
1. Register first to [Mesosfer Cloud][cloud]
2. Create an application to get `applicationId` and `clientKey`
3. Add this line below to your `Application` class to initialize Mesosfer SDK

```java
Mesosfer.initialize(this, "YOUR-APPLICATION-ID-HERE", "YOUR-CLIENT-KEY-HERE");
```
Don't forget to initialize your application class to `AndroidManifest.xml`

(Optional) You can add some custom setup :

* Enable Mesosfer SDK debug logging by calling `Mesosfer.setLogLevel(int);` before initialize SDK.
* Mesosfer Log Level Mode : `LOG_LEVEL_VERBOSE`, `LOG_LEVEL_DEBUG`, `LOG_LEVEL_INFO`, `LOG_LEVEL_WARNING`, `LOG_LEVEL_ERROR`, `LOG_LEVEL_NONE`

Everything is done!

## License
Copyright (c) 2016, Mesosfer.
All rights reserved.

This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.

[mesosfer.com]:https://mesosfer.com
[docs]:https://docs.mesosfer.com/
[cloud]:https://cloud.mesosfer.com/
[library]:../../Library/MesosferSDK-Android-0.1.0.aar
1 change: 1 addition & 0 deletions Sample/01-starter-project/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
31 changes: 31 additions & 0 deletions Sample/01-starter-project/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.eyro.mesosfer.sample"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
}

repositories{
flatDir {
dirs 'libs'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.eyro.mesosfer:MesosferSDK-Android:0.1.0@aar'
}
Binary file not shown.
14 changes: 14 additions & 0 deletions Sample/01-starter-project/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eyro.mesosfer.sample">

<application
android:name=".MesosferApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">

</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.eyro.mesosfer.sample;

import android.app.Application;

import com.eyro.mesosfer.Mesosfer;

/**
* Created by Eyro on 10/19/16.
*/
public class MesosferApp extends Application {
@Override
public void onCreate() {
super.onCreate();

// uncomment this line below to show Mesosfer log in verbose mode
// Mesosfer.setLogLevel(Mesosfer.LOG_LEVEL_VERBOSE);

// initialize Mesosfer SDK
Mesosfer.initialize(this, "YOUR-APPLICATION-ID-HERE", "YOUR-CLIENT-KEY-HERE");
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Sample/01-starter-project/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#1567a3</color>
<color name="colorPrimaryDark">#0d4367</color>
<color name="colorAccent">#1567a3</color>
</resources>
3 changes: 3 additions & 0 deletions Sample/01-starter-project/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">Mesosfer</string>
</resources>
11 changes: 11 additions & 0 deletions Sample/01-starter-project/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

</resources>
23 changes: 23 additions & 0 deletions Sample/01-starter-project/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
17 changes: 17 additions & 0 deletions Sample/01-starter-project/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
Loading

0 comments on commit ab02f3f

Please # to comment.