Skip to content

Commit

Permalink
Merge pull request #13 from aerisweather/release-2.6.1
Browse files Browse the repository at this point in the history
Release 2.6.1
  • Loading branch information
hwleeh authored Oct 6, 2020
2 parents 8311d6d + 8364416 commit 26da5b7
Show file tree
Hide file tree
Showing 16 changed files with 91 additions and 67 deletions.
27 changes: 14 additions & 13 deletions AerisDemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
compileSdkVersion 30
buildToolsVersion "29.0.2"
defaultConfig {
minSdkVersion 19
applicationId "com.example.demoaerisproject"
versionCode 10
targetSdkVersion 27
versionName "2.6.0"
versionCode 12
targetSdkVersion 30
versionName "2.6.1"
//multiDexEnabled true
signingConfigs {
config {
keyAlias 'demoprojkey'
keyPassword 'password'
storeFile file('C:/Projects/AndroidStudioProjects/AerisAndroidSDK/AerisDemo/demoprojkeystore.jks')
storeFile file('/Users/Lee/AndroidStudioProjects/AerisAndroidSDK/AerisDemo/demoprojkeystore.jks')
storePassword 'password'
}
}
Expand Down Expand Up @@ -59,27 +59,28 @@ buildscript {
mavenCentral()
google()
jcenter()
// maven { url maven_staging_url }
//maven { url maven_staging_url }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.android.tools.build:gradle:4.0.1'
}
}


repositories {
mavenCentral()
google()
jcenter()
// maven { url maven_staging_url }
//maven { url maven_staging_url }
}
dependencies {
testImplementation 'junit:junit:4.12'
implementation ('com.aerisweather:aeris-maps-lib:2.6.0@aar') {
implementation ('com.aerisweather:aeris-maps-lib:2.6.1@aar') {
transitive true
}
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
}
4 changes: 3 additions & 1 deletion AerisDemo/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

org.gradle.jvmargs=-Xmx2048M

maven_staging_url=https://oss.sonatype.org/content/repositories/comaerisweather-1615
maven_staging_url=https://oss.sonatype.org/content/repositories/comaerisweather-1625
android.useAndroidX=true
android.enableJetifier=true
4 changes: 2 additions & 2 deletions AerisDemo/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Dec 14 13:12:43 CST 2017
#Fri Sep 11 12:37:59 CDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Binary file added AerisDemo/res/drawable/legend_temp_outlook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions AerisDemo/res/layout/menu_drawer.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
Expand Down Expand Up @@ -106,4 +106,4 @@
android:divider="@color/light_gray"
android:dividerHeight="1dp" />
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
13 changes: 7 additions & 6 deletions AerisDemo/res/menu/main.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android" >

<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="always"
android:icon="@drawable/ic_action_action_settings"
android:title="@string/action_settings"/>
android:title="@string/action_settings"
app:showAsAction="always" />

<item
android:id="@+id/action_refresh"
android:showAsAction="always"
android:icon="@drawable/ic_action_navigation_refresh"
android:title="@string/action_refresh"/>
android:icon="@drawable/ic_action_navigation_refresh"
android:title="@string/action_refresh"
app:showAsAction="always" />

</menu>
5 changes: 3 additions & 2 deletions AerisDemo/res/menu/menu_maps_fragment.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_weather_layers"
android:title="Layers"
android:icon="@drawable/ic_action_layers"
android:showAsAction="ifRoom|withText"/>
app:showAsAction="ifRoom|withText" />
</menu>
8 changes: 4 additions & 4 deletions AerisDemo/res/menu/menu_search.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android" >

<item android:id="@+id/menuLocateMe"
android:title="Locate me"
android:icon="@android:drawable/ic_menu_mylocation"
android:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />

<item android:id="@+id/menuMyLocs"
android:title="My Locations"
android:icon="@android:drawable/ic_menu_sort_by_size"
android:showAsAction="ifRoom"
/>
app:showAsAction="ifRoom" />
</menu>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;

import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import androidx.core.app.NotificationCompat;
import android.widget.RemoteViews;

import com.aerisweather.aeris.logging.Logger;
Expand All @@ -14,7 +14,6 @@
import com.aerisweather.aeris.response.ObservationResponse;
import com.aerisweather.aeris.util.FileUtil;
import com.aerisweather.aeris.util.WeatherUtil;
import com.example.service.NotificationJobService;

import java.util.HashMap;
import java.util.Map;
Expand Down
10 changes: 5 additions & 5 deletions AerisDemo/src/com/example/demoaerisproject/DrawerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
import java.util.ArrayList;

import android.annotation.TargetApi;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import android.app.LoaderManager.LoaderCallbacks;
import android.content.Intent;
import android.content.Loader;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.drawerlayout.widget.DrawerLayout;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
Expand Down
2 changes: 1 addition & 1 deletion AerisDemo/src/com/example/fragment/AerisFragment.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.example.fragment;

import android.app.Activity;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.widget.Toast;

import com.example.fragment.HeadlessFragment.HeadlessObserver;
Expand Down
32 changes: 28 additions & 4 deletions AerisDemo/src/com/example/fragment/MyMapFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import android.content.pm.PackageManager;
import android.location.Location;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import androidx.core.app.ActivityCompat;
import androidx.fragment.app.Fragment;
import androidx.core.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
Expand All @@ -20,6 +20,7 @@
import android.widget.Toast;

import com.aerisweather.aeris.maps.AerisMapContainerView;
import com.aerisweather.aeris.tiles.AerisConstants;
import com.example.db.MyPlace;
import com.example.db.MyPlacesDb;
import com.example.demoaerisproject.MapOptionsLocalActivity;
Expand Down Expand Up @@ -92,6 +93,8 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
m_container = container;
m_savedInstanceState = savedInstanceState;



View view = inflater.inflate(R.layout.fragment_interactive_maps, container, false);
AerisMapContainerView mapContainer = (AerisMapContainerView) view.findViewById(R.id.mapView);
m_aerisMapView = mapContainer.getAerisMapView();
Expand Down Expand Up @@ -229,6 +232,13 @@ private void initMap()
//create a new MapOptions obj
m_mapOptions = new AerisMapOptions();
m_aerisAmp.getPermissibleLayers(false);
/*
Example of overriding the default domain for AMP
i.e. using a custom CDN
AerisConstants.getInstance().setBaseTileSecureUrl("https://maps.yourdomain.com/");
*/


//set the mapOptions class's AerisAMP obj
m_mapOptions.setAerisAMP(m_aerisAmp);
Expand All @@ -248,6 +258,7 @@ private void initMap()

//amp layer(s)
AerisAmp aerisAmp = m_mapOptions.getAerisAMP();

/**
* CUSTOM / UNDOCUMENTED LAYER
*/
Expand All @@ -265,12 +276,24 @@ private void initMap()
aerisAmp.setLayer(statesAmpLayer);
*/

/**
* EXAMPLE: Adding 6-10day outlook with custom legend
*/
/*
AerisAmpLayer outlookAmpLayer = new AerisAmpLayer("temperatures-outlook-6-10d-cpc","temperatures-outlook-6-10d-cpc",100);
outlookAmpLayer.setCustomLayerLegend(R.drawable.legend_temp_outlook);
aerisAmp.setLayer(outlookAmpLayer);
*/


if (aerisAmp.getActiveMapLayers().size() < 1)
{
aerisAmp.setDefaultLayers();
}
m_aerisMapView.addLayer(aerisAmp);



//point data layer(s)
m_aerisMapView.addLayer(m_mapOptions.getPointData());

Expand All @@ -294,10 +317,11 @@ private void initMap()
/**
* SAMPLE: TROPICAL CYCLONES ERROR CONES
*/
/*
AerisPolygonData aerisPolygonData = AerisPolygonData.TROPICAL_CYCLONE_ERROR_CONES;
m_aerisMapView.addLayer(aerisPolygonData);
*/

// m_aerisMapView.addLayer(m_mapOptions.getPolygonData());

//get a new marker option object
MarkerOptions markerOptions = new MarkerOptions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import android.os.Build;
import android.os.StrictMode;
import android.os.SystemClock;
import android.support.annotation.RequiresApi;
import androidx.annotation.RequiresApi;

import com.aerisweather.aeris.communication.Action;
import com.aerisweather.aeris.communication.AerisRequest;
Expand Down
42 changes: 19 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The Aeris Android SDK allows a developer to quickly and easily add weather conte

## Getting Started

View the latest installation and implementation details at AerisWeather under the [Aeris Android SDK toolkit documentation] (http://www.aerisweather.com/support/docs/toolkits/aeris-android-sdk/getting-started/).
View the latest installation and implementation details at AerisWeather under the [Aeris Android SDK toolkit documentation](http://www.aerisweather.com/support/docs/toolkits/aeris-android-sdk/getting-started/).

### Aeris API Configuration for the AerisDemo App
Before you can begin using the Aeris Android SDK in your project, you will need to download the latest version of the SDK and ensure that you have the required Aeris API keys for your application.
Expand Down Expand Up @@ -48,44 +48,40 @@ In the resulting dialog, enter the SHA-1 fingerprint, then a semicolon, then The
The Google API Console responds by displaying Key for Android apps (with certificates) followed by a forty-character API key.

In your Android project, update the meta tag in the Demo Project’s Manifest:
```java
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="your_api_key" />
```
<pre><code class="java">&lt;meta-data
android:name=&quot;com.google.android.maps.v2.API_KEY&quot;
android:value=&quot;your_api_key&quot; /&gt;
</code></pre>
Note: Your SHA1 can be obtained in Android Studio by running the **"signingReport"** task under the **"Gradle projects"** section.

### Permissions
The following permissions are required in order to use the Aeris Android SDK in the application. Please add these to your AndroidManifest.xml:
```java
<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COURSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
</manifest>
```
<pre><code class="java">&lt;manifest&gt;
&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;
&lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot;/&gt;
&lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot;/&gt;
&lt;uses-permission android:name=&quot;android.permission.ACCESS_COURSE_LOCATION&quot;/&gt;
&lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot;/&gt;
&lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt;
&lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot;/&gt;
&lt;/manifest&gt;
</code></pre>
### Gradle Configuration
The Aeris Core and Aeris Maps libraries are available through Maven Central. To add these dependencies to your project add these lines to your build.gradle file.

**Aeris Core:**
```java
repositories {
<pre><code class="java">repositories {
mavenCentral()
}
dependencies {
compile 'com.aerisweather:aeris-core-lib:#.#.#@aar'
}
```
</code></pre>

**Aeris Maps:**

(Note: you do not need to to add Aeris Core seperately if you are using Aeris Maps - the core lib is referenced in the maps lib)
```java
repositories {
<pre><code class="java">repositories {
mavenCentral()
}
dependencies {
Expand All @@ -95,7 +91,7 @@ dependencies {
compile 'com.google.android.gms:play-services-maps:#.#.#'
compile 'com.android.support:appcompat-v7:#.#.#'
}
```
</code></pre>

##Reference Links

Expand Down

0 comments on commit 26da5b7

Please sign in to comment.