I included sdk file from https://developer.here.com by this location my_plugin/src/platforms/android/HERE-sdk.aar
. In java code I can use it like this:
package com.here.android.tutorial;
...
import com.here.android.mpa.mapping.MapFragment;
...
private MapFragment mapFragment = null;
private void initialize() {
mapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.mapfragment);
...
I tried this:
// my-plugin.android.ts
import { Common } from './my-plugin.common';
declare var com: any;
export class MyPlugin extends Common {
public mapFragment: any;
constructor() {
super();
this.mapFragment = new com.here.android.mpa.mapping.MapFragment()
}
}
But it shows error: TypeError: Cannot read property 'android' of undefined
How to properly include .aar
library file and use MapFragment in Nativescript(JS) code?