Direct connection to Firebird with IBDac/UniDac from Android using Delphi - android

I'm trying to connect to a REMOTE Firebird Database from Android using Delphi and IBDac. It says that cannot find libfbclient.so.3.0.2 library. I put it in the deploy to all library paths and nothing. If I remove the library it doesn't connect neither. The android version is 7.0. Thanks in advance.

my solution:
in delphi (deploying): add file libfbclient.so.3.0.2
remote-path: assets\internal
in delphi (program):
no entry in IBCConnection ClientLibrary
source code:
IBCConnection1.Server:= *server-ip or name*;
IBCConnection1.ClientLibrary:= TPath.Combine(TPath.GetDocumentsPath, 'libfbclient.so.3.0.2');
IBCConnection1.DataBase:= *datebase name*;
IBCConnection1.Connect;

Related

Gesoservices provider is not supported on an Android using Mapbox with QT

I'm trying to run a simple example of Mapbox using the QT SDK.
On my mac it's ok but when the example run on my Android phone, I saw a blank map and if I call the function errorString on the Map object, I got this error message:
The geoservices provider is not supported.
Can anyone help me?
My Mapbox key is valid, I did the test as they suggest on the MapBox web site.
I am using QT 5.12 and my LG5 phone is on Android 8.0.
What I don't understand?
According to this GitHub ticket this is appears to be an issue with the Qt Location plugin and not with Mapbox GL. A quick sweep of existing tickets to see if this has already been reported comes up empty, so I'd recommend flagging it for the Qt engineering team here: https://bugreports.qt.io/
Apparently there is some kind of a dependency resolution bug and QT APK bundler does not add several shared libraries like
libplugins_geoservices_qtgeoservices_mapboxgl_armeabi-v7a.so
libQt5OpenGL_armeabi-v7a.so
libQt5Sql_armeabi-v7a.so
This is what fixes it (found it in mapviewer QT example). Add to your .pro file:
# Workaround for QTBUG-38735
QT_FOR_CONFIG += location-private
qtConfig(geoservices_mapboxgl): QT += sql opengl
qtConfig(geoservices_osm): QT += concurrent
In case you are using CMake builds adding Qt5::Sql and Qt5::OpenGL along with Qt5::Location also fixes the issue:
find_package(Qt5 REQUIRED Positioning Location Sql OpenGL)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
Qt5::Location
Qt5::Positioning
Qt5::Sql
Qt5::OpenGL
)

how to copy files from android to windows share using python?

Im trying to copy some files to and from a windows share. I am using python 2.7 and the pysmb library. This works fine with win7, but not with android. I build my connection over VPN with SMBConnection. listShares and listPath is working. Under win7 there is no problem using also os.path.isdir or shutil.copyfile. But that does not work with android. This is my code:
server_name = '192.168.168.12'
conn = SMBConnection(username=username, password=password, my_name='waldi2'
remote_name=server_name, domain=domain, use_ntlm_v2=True,
sign_options=SMBConnection.SIGN_WHEN_SUPPORTED, is_direct_tcp=True)
connected = conn.connect(server_name, 445)
# obtain a list of shares:
Response = conn.listShares(timeout=30) # !!!working, shows e.g.(' Share[', 20, '] =', u'JBW_in')
os.path.isdir('//192.168.168.12/JBW_in/') # is False with android, True with win7 !??
shutil.copyfile('/sdcard/waldi2_0/data/stop.txt', '//192.168.168.12/JBW_in/stop.txt')
This is no prob with win7, but with android it throws:
[Errno 2] No such file or directory: '//192.168.168.12/JBW_in/stop.txt'
Any clues? would be very very welcome ....
Or maybe alternative approaches to manage some python-based file-exchange between android and windows-server.
If I understund you correctly you are trying to connect to an android device via SMB. By my knowledge android doesnt have support for SMB server natively, but you could install a third-party app with a SMB server.

Android: Phonegap 3.1.x fail to load geolocation plugin

We are using Phonegap 3.1.0-0.15.0 and the application chocked when trying to access location information.
Works fine in iOS however the App chock on Android
We are using:
navigator.geolocation.getCurrentPosition(app.location.onSuccess, app.location.onError);
and we also tried:
var geo = cordova.require('cordova/plugin/geolocation');
geo.getCurrentPosition(app.location.onSuccess, app.location.onError);
The logcat mentioned the following:
Could not find cordova.js script tag. Plugin loading may fail. at file:///android_asset/www/phonegap.js:1511
Uncaught module cordova/plugin/geolocation not found at file:///android_asset/www/phonegap.js:56
The plugin was added using:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git
Are we doing something wrong ?
Thank you in advance
/Edwardo.
Just to answer my own questions. I removed all the plugins manually and then add them (including the problematic geolocation plugin) using the following command:
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git
That solved my issue.
Edward.

app won't recognize function in non-android jar

I am writing an app to connect to a database on a server (AS400 server using SQL to talk to the database). IBM supplies a java toolbox to access the server in a jar called jt400android.
I have a test function:
protected void ConnectionTest()
{
AS400 system = new AS400("jc400");
try
{
system.connectService(AS400.RECORDACCESS);
}
catch(Exception e)
{
e.printStackTrace();
System.exit(0);
}
}
AS400 is a function included in the jt400android.jar in com.ibm.as400.access.* that handles socket protocol, connections, and authentication to an AS400 machine. (I've resorted to this method as JDBC is apparently not a good way to go).
The code compiles just fine, no errors or warnings, but when I run the apk on my AVD, I get this error
03-12 22:44:30.300: E/dalvikvm(484): Could not find class 'com.ibm.as400.access.AS400', referenced from method jcpaper.android.jc400droid.MainActivity.ConnectionTest
I've searched the forums and tried the following suggestions:
added the jar to Java Build Path > Libraries (did this to make the code compile)
checked jar on Java Build Path > Order and Export
included a copy of the jar in [project folder]/libs
Each time I end up with the same could not find class error.
I'm running Eclipse for mobile (Juno v1) on Windows XP, building for Android 2.3.3.
Any suggestions on what's happening here?
The JTOpen Lite/JTLite libraries might provide a better way of connecting to your server. These libraries are new from IBM and are designed for specific use on Android devices.
JTOpen Lite - IBM Developer Works
JTOpen Lite Javadoc
Make sure that you add the .jar to the build path and export the libraries properly.
The record level access method that you are trying to use is an older method for connecting applications to DB2 databases, so you will probably have a harder time finding information about it.

Pusher not working on Phonegap for Android

I'm facing a problem and would really appreciate your help...
Android SDK: 4.0
Phonegap: 1.8.1
Pusher: 1.12
I have created an Android project using Phonegap that needs to receive server notifications through Pusher.
I'm running it in Eclipse and AVD emulator, but the problem is that every time I try to establish a connection to pusher, I get an Unavailable state from the bind to state_change.
I have tested the connection to Internet in the emulator browser and it works fine. I have also tested that the server is responding and that the Pusher key is the right one by testing my code on Firefox.
This are the steps I have followed:
I have included the WebSocket.java and WebSocketFactory.java files in the src folder.
I have included websocket.js file in my js folder and included a reference in the index.html file.
I have included a reference to http://js.pusher.com/1.12/pusher.js in the index file.
I have included the following line in my Android App.java file: this.appView.addJavascriptInterface(new WebSocketFactory(this), "WebSocketFactory");
This is the code I'm using to connect to Pusher:
// Connect
var pusher = new Pusher(CONFIG.PUSHER.APP_KEY);
pusher.connection.bind('state_change', connectionStateChange);
function connectionStateChange(state) {
alert(state.current);
}
Is there something I'm missing? Any ideas on why the connection is not working or about where to check?
Thanks for your help.
Chadid
For version 2.x of pusher-js and above the library will work within PhoneGap without any additional requirements or setup. Simply include the library and use it - no need for WebSocket.java or WebSocketFactory.java.
For version 1.x this blog post and associated code demonstrates how to get Pusher working on PhoneGap:
http://blog.pusher.com/2012/7/5/pusher-on-phonegap-for-android

Categories

Resources