Skip to content

Commit

Permalink
#3 NullPointerException when running on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Feb 4, 2016
1 parent dd49307 commit 625bc4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions mapbox.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ var utils = require("utils/utils");
var application = require("application");
var frame = require("ui/frame");
var mapbox = require("./mapbox-common");
var context = application.android.context;
var ACCESS_FINE_LOCATION_PERMISSION_REQUEST_CODE = 111;

mapbox._fineLocationPermissionGranted = function () {
Expand Down Expand Up @@ -63,7 +62,7 @@ mapbox.show = function(arg) {
return;
}

mapView = new com.mapbox.mapboxsdk.views.MapView(context, settings.accessToken);
mapView = new com.mapbox.mapboxsdk.views.MapView(application.android.context, settings.accessToken);
mapView.onResume();
mapView.onCreate(null);
mapView.setStyleUrl(mapbox._getMapStyle(settings.style));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-mapbox",
"version": "1.1.0",
"version": "1.1.1",
"description": "Native Maps, by Mapbox.",
"main": "mapbox.js",
"nativescript": {
Expand Down

0 comments on commit 625bc4a

Please sign in to comment.