PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
Java Error Message
Java Error Message
Started by Abdul Mojeb Hadji Atief, Jun., 21 2016 8:33 AM - 2 replies
Connect yourself…
Abdul Mojeb Hadji Atief
#1
Posted on June, 21 2016 - 8:33 AM
hi WM experts,
I've created a global procedure in my WM project and I pasted this lines of code in java
import java.util.ArrayList;
import org.osmdroid.DefaultResourceProxyImpl;
import org.osmdroid.tileprovider.tilesource.TileSourceFactory;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.ItemizedIconOverlay;
import org.osmdroid.views.overlay.OverlayItem;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.text.InputType;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.Toast;
public class Map extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MapView mapView = new MapView(this, 256);
mapView.setClickable(true);
mapView.setBuiltInZoomControls(true);
mapView.setMultiTouchControls(true);
setContentView(mapView);
mapView.setTileSource(TileSourceFactory.MAPQUESTOSM);
mapView.getController().setZoom(14);
mapView.setUseDataConnection(false);
Drawable markerDrawable;
markerDrawable = getResources().getDrawable(R.drawable.marker);
GeoPoint center = new GeoPoint(14.487868, 121.043747);
ArrayList<OverlayItem> list = new ArrayList<OverlayItem>();
OverlayItem item = new OverlayItem("Here", "What ever", center);
item.setMarker(markerDrawable);
list.add(item);
DefaultResourceProxyImpl resProxy = new DefaultResourceProxyImpl(getApplicationContext());
ItemizedIconOverlay<OverlayItem> overyLay = new ItemizedIconOverlay<OverlayItem>(list,
new ItemizedIconOverlay.OnItemGestureListener<OverlayItem>() {
public boolean onItemSingleTapUp(final int index, final OverlayItem item) {
return true;
}
public boolean onItemLongPress(final int index, final OverlayItem item) {
return true;
}
}, resProxy);
mapView.getOverlays().add(overyLay);
mapView.getController().setCenter(center);
}
}
every time I run the program for testing, I've got this error message
Error Code : 1185
The call to native code is not available.
Can anyone tell what's that error message mean?
Thanks in advance.
mojeb
Report
0
0
Fabrice Harari
#2
Posted on June, 21 2016 - 1:25 PM
Hi
you are in test mode...
Test mode is a SIMULATION of the android system, but does NOT include a
JAVA engine (there is no java complation before the simulation starts)...
therefore, anything in java can be test only after compiling, on a real
android hardware
Best regards
--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting
More information on
http://www.fabriceharari.com
Report
0
0
BOLLER ADRIANO
#3
Registered member
3,659 messages
Popularité : +175 (223 votes)
Posted on June, 21 2016 - 4:15 PM
Hi
All these commands this function exist in the native language, use the help.windev.com site and type in the search field GPS, map and on my website that link has several examples with ready codes:
http://www.wxinformatica.com.br/p/indice.html
It has a ready example in the tool using GPS in search of examples type GPS and vera how simple their use. From what I read in your Java code you want the following features:
MyPosition is geoPosition
MyPosition..Latitude = Latitude
MyPosition..Longitude = Longitude
ok = MapDisplayPosition(ControleMapa, MyPosition)
http://forum.pcsoft.fr/fr-FR/pcsoft.us.windevmobile/739-gps-detect-position-detectar-posicao/read.awp
http://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/1266-gps-controlando-zoom/read.awp
http://forum.pcsoft.fr/fr-FR/pcsoft.us.windevmobile/621-gps-ponto-central/read.awp
:thank you:
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text