New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23600] Android: Recompile ti.map module against latest SDK #167

Merged
merged 1 commit into from Jul 11, 2016
Jump to file or symbol
Failed to load files and symbols.
+84 −69
Diff settings

Always

Just for now

View
@@ -26,7 +26,6 @@ android/clean
android/ant_clean
android/.classpath
android/.settings
android/dist/
android/launch-*
nbproject
View
@@ -1,19 +1,26 @@
language: objective-c
osx_image: xcode7.1
osx_image: xcode7.3
env:
global:
- "ARTIFACTS_AWS_REGION=us-east-1"
- "ARTIFACTS_S3_BUCKET=builds.appcelerator.com"
- "MODULE_NAME=ti.map"
- TRAVIS_NODE_VERSION="4"
before_install:
- MODULE_ROOT=$PWD
- brew update
- brew install nvm
- source $(brew --prefix nvm)/nvm.sh
- nvm install 4
- npm config delete prefix
- nvm use --delete-prefix v4.4.7 4
install:
- cd $MODULE_ROOT
- curl -o install.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/install.sh #change this to appcelerator-modules once PR has been merged
- source install.sh -s "--branch 5_1_X"
script:
- curl -o script.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/script.sh
- curl -o install.sh https://raw.githubusercontent.com/sgtcoolguy/ci/v8/travis/install.sh #change this to appcelerator-modules once PR has been merged
- source install.sh -s "--branch master"
script:
- curl -o script.sh https://raw.githubusercontent.com/sgtcoolguy/ci/v8/travis/script.sh
- source script.sh
after_success: # and this only on success
- curl -o deploy.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/deploy.sh
- source deploy.sh
- curl -o deploy.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/deploy.sh
- source deploy.sh
View
@@ -2,9 +2,9 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 2.3.10
apiversion: 2
architectures: armeabi armeabi-v7a x86
version: 3.0.0
apiversion: 3
architectures: armeabi-v7a x86
description: External version of Map module to support new Google Map v2 sdk
author: Hieu Pham
license: Apache Public License v2
@@ -16,5 +16,5 @@ name: map
moduleid: ti.map
guid: f0d8fd44-86d2-4730-b67d-bd454577aeee
platform: android
minsdk: 4.1.0
minsdk: 6.0.0
respackage: com.google.android.gms
@@ -1,6 +1,6 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2013-2016 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
@@ -17,7 +17,6 @@
import org.appcelerator.titanium.TiApplication;
import org.appcelerator.titanium.TiBlob;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.TiContext;
import org.appcelerator.titanium.TiDimension;
import org.appcelerator.titanium.TiPoint;
import org.appcelerator.titanium.proxy.TiViewProxy;
@@ -70,7 +69,7 @@
private int iconImageWidth = 0;
private String annoTitle;
private AnnotationDelegate delegate = null;
private static final int MSG_FIRST_ID = KrollProxy.MSG_LAST_ID + 1;
private static final int MSG_SET_LON = MSG_FIRST_ID + 300;
@@ -86,15 +85,10 @@ public AnnotationProxy()
defaultValues.put(MapModule.PROPERTY_SHOW_INFO_WINDOW, true);
}
public AnnotationProxy(TiContext tiContext)
{
this();
}
public void setDelegate(AnnotationDelegate delegate) {
this.delegate = delegate;
}
@Override
protected KrollDict getLangConversionTable()
{
@@ -251,7 +245,7 @@ private void handleImage(Object image)
return;
}
}
// Image blob
if (image instanceof TiBlob) {
Bitmap bitmap = ((TiBlob) image).getImage();
@@ -261,7 +255,7 @@ private void handleImage(Object image)
return;
}
}
Log.w(TAG, "Unable to get the image from the path: " + image);
setIconImageDimensions(-1, -1);
}
@@ -409,10 +403,10 @@ private void updateInfoWindow()
getMainHandler().sendEmptyMessage(MSG_UPDATE_INFO_WINDOW);
}
}
private void requestRefresh() {
if (this.delegate != null) {
this.delegate.refreshAnnotation(this);
}
}
}
}
@@ -1,3 +1,9 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2013-2016 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
package ti.map;
import java.util.HashMap;
@@ -8,7 +14,6 @@
import org.appcelerator.kroll.common.TiMessenger;
import org.appcelerator.titanium.TiApplication;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.TiContext;
import org.appcelerator.titanium.TiDimension;
import org.appcelerator.titanium.util.TiConvert;
@@ -48,10 +53,6 @@ public CircleProxy() {
super();
}
public CircleProxy(TiContext tiContext) {
this();
}
private int toPx(Object size){
ViewGroup rootViewGroup = (ViewGroup)TiApplication.getAppCurrentActivity().getWindow().getDecorView().findViewById(android.R.id.content);
return TiConvert.toTiDimension(size, TiDimension.COMPLEX_UNIT_AUTO).getAsPixels(rootViewGroup);
@@ -1,7 +1,7 @@
/**
* This file was auto-generated by the Titanium Module SDK helper for Android
* Appcelerator Titanium Mobile
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2013-2016 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
@@ -95,4 +95,3 @@ public int isGooglePlayServicesAvailable() {
return GooglePlayServicesUtil.isGooglePlayServicesAvailable(TiApplication.getAppRootOrCurrentActivity());
}
}
@@ -1,3 +1,9 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2013-2016 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
package ti.map;
import java.util.ArrayList;
@@ -9,7 +15,6 @@
import org.appcelerator.kroll.common.AsyncResult;
import org.appcelerator.kroll.common.TiMessenger;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.TiContext;
import org.appcelerator.titanium.util.TiConvert;
import ti.map.Shape.IShape;
@@ -46,10 +51,6 @@ public PolygonProxy() {
super();
}
public PolygonProxy(TiContext tiContext) {
this();
}
@Override
public boolean handleMessage(Message msg) {
@@ -1,3 +1,9 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2013-2016 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
package ti.map;
import java.util.ArrayList;
@@ -8,7 +14,6 @@
import org.appcelerator.kroll.common.AsyncResult;
import org.appcelerator.kroll.common.TiMessenger;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.TiContext;
import org.appcelerator.titanium.util.TiConvert;
import ti.map.Shape.IShape;
@@ -53,10 +58,6 @@ public PolylineProxy() {
super();
}
public PolylineProxy(TiContext tiContext) {
this();
}
@Override
public boolean handleMessage(Message msg)
{
@@ -111,7 +112,7 @@ public void processOptions() {
if (hasProperty(PolylineProxy.PROPERTY_STROKE_COLOR2)) {
options.color(TiConvert.toColor((String)getProperty(PolylineProxy.PROPERTY_STROKE_COLOR2)));
}
if (hasProperty(MapModule.PROPERTY_STROKE_WIDTH)) {
options.width(TiConvert.toFloat(getProperty(MapModule.PROPERTY_STROKE_WIDTH)));
}
@@ -1,3 +1,9 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2013-2016 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
package ti.map;
import java.util.ArrayList;
@@ -8,7 +14,6 @@
import org.appcelerator.kroll.common.AsyncResult;
import org.appcelerator.kroll.common.TiMessenger;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.TiContext;
import org.appcelerator.titanium.util.TiConvert;
import android.os.Message;
@@ -23,26 +28,22 @@
TiC.PROPERTY_WIDTH
})
public class RouteProxy extends KrollProxy{
private PolylineOptions options;
private Polyline route;
private static final int MSG_FIRST_ID = KrollProxy.MSG_LAST_ID + 1;
private static final int MSG_SET_POINTS = MSG_FIRST_ID + 400;
private static final int MSG_SET_COLOR = MSG_FIRST_ID + 401;
private static final int MSG_SET_WIDTH = MSG_FIRST_ID + 402;
public RouteProxy() {
super();
}
public RouteProxy(TiContext tiContext) {
this();
}
@Override
public boolean handleMessage(Message msg)
public boolean handleMessage(Message msg)
{
AsyncResult result = null;
switch (msg.what) {
@@ -53,14 +54,14 @@ public boolean handleMessage(Message msg)
result.setResult(null);
return true;
}
case MSG_SET_COLOR: {
result = (AsyncResult) msg.obj;
route.setColor((Integer)result.getArg());
result.setResult(null);
return true;
}
case MSG_SET_WIDTH: {
result = (AsyncResult) msg.obj;
route.setWidth((Float)result.getArg());
@@ -79,17 +80,17 @@ public void processOptions() {
if (hasProperty(MapModule.PROPERTY_POINTS)) {
processPoints(getProperty(MapModule.PROPERTY_POINTS), false);
}
if (hasProperty(TiC.PROPERTY_WIDTH)) {
options.width(TiConvert.toFloat(getProperty(TiC.PROPERTY_WIDTH)));
}
if (hasProperty(TiC.PROPERTY_COLOR)) {
options.color(TiConvert.toColor((String)getProperty(TiC.PROPERTY_COLOR)));
}
}
public void addLocation(Object loc, ArrayList<LatLng> locationArray, boolean list) {
if (loc instanceof HashMap) {
HashMap<String, String> point = (HashMap<String, String>) loc;
@@ -107,7 +108,7 @@ public void addLocation(Object loc, ArrayList<LatLng> locationArray, boolean lis
}
public ArrayList<LatLng> processPoints(Object points, boolean list) {
ArrayList<LatLng> locationArray = new ArrayList<LatLng>();
//multiple points
if (points instanceof Object[]) {
@@ -123,44 +124,44 @@ public void addLocation(Object loc, ArrayList<LatLng> locationArray, boolean lis
addLocation(points, locationArray, list);
return locationArray;
}
public PolylineOptions getOptions() {
return options;
}
public void setRoute(Polyline r) {
route = r;
}
public Polyline getRoute() {
return route;
}
@Override
public void onPropertyChanged(String name, Object value) {
super.onPropertyChanged(name, value);
if (route == null) {
return;
}
else if (name.equals(MapModule.PROPERTY_POINTS)) {
TiMessenger.sendBlockingMainMessage(getMainHandler().obtainMessage(MSG_SET_POINTS), value);
}
else if (name.equals(TiC.PROPERTY_COLOR)) {
TiMessenger.sendBlockingMainMessage(getMainHandler().obtainMessage(MSG_SET_COLOR), TiConvert.toColor((String)value));
}
else if (name.equals(TiC.PROPERTY_WIDTH)) {
TiMessenger.sendBlockingMainMessage(getMainHandler().obtainMessage(MSG_SET_WIDTH), TiConvert.toFloat(value));
}
}
@Override
public boolean hasProperty(String name)
{
return (super.getProperty(name) != null);
}
}
Oops, something went wrong.