Welcome! Log In Create A New Profile

Advanced

WD23 HF Classic on Android

Posted by cabinetman 
WD23 HF Classic on Android
September 28, 2018 05:29PM
Hello All,

Does HF Classic work on all versions of Android or is it from version XXX and above?

DW
Re: WD23 HF Classic on Android
September 28, 2018 05:40PM
Hi Dennis,

AFAIK, it works on all version you will find out there these days, but it probably wont work on a very old phone with an android 2 on it... :-)

I have personally tested an application a few month ago on phones hosting android v4 to 7 and there was no problem on that part.

best regards

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]
Re: WD23 HF Classic on Android
September 28, 2018 06:57PM
That is strange,

I just tried it on 5.1 device and it crashed with error that HOpenConnection failed but with no other info. I tried to error trap but HErrorInfo(hErrFullDetails)is empty.

I switched it over to sqllite and it worked fine.

It currently is working on 6.0 and 7.0

bResult is boolean
MyConnection is Connection

//Set Connection
MyConnection..User = "Admin"
MyConnection..Password = ""
MyConnection..Database = ""
MyConnection..Provider = hAccessHF7
MyConnection..Access = hOReadWrite
MyConnection..ExtendedInfo = "HF Classic"
MyConnection..CryptMethod = hCryptStandard
MyConnection..Source = FM_DataPath

WHEN EXCEPTION IN
	//Open the Connection
	IF not HOpenConnection(MyConnection) THEN //Fails HERE
		Error("HOpenConnection: ","Unable to connect to HF Classic-Dir: "+FM_DataPath,HErrorInfo(hErrComplet))
		bResult = False
	ELSE
		bResult = True
	END
	
	gsConnectionName = MyConnection..Name
	
	IF bResult THEN
		//Change connection.
		IF not HChangeConnection("*",MyConnection) THEN
			Error("Could not execute HChangeConnection!",HErrorInfo(hErrFullDetails))
			bResult = False
		ELSE
			IF not HCreationIfNotFound("*") THEN
			Error("Could not Create or Open the Files !",HErrorInfo(hErrFullDetails))
		END
			bResult=True
		END
	END
	
DO
	Error("Error while opening data files!",HErrorInfo(hErrFullDetails))	//This code runs after fails
END

RESULT bResult



Edited 1 time(s). Last edit at 09/28/2018 06:58PM by cabinetman.
Re: WD23 HF Classic on Android
September 28, 2018 10:27PM
hi, look at [help.windev.com]

Limitations

Android and Android Widget Only the hNativeAccessSQLite constant is available for Android.

I've been using HF on Android for a while now without a problem. In Android 4.4 to 8.1 without problems. But my connection is defined in the Analysis. Why do you need to define the connection by code if that connection is going to be in the same device?


Rubén
Re: WD23 HF Classic on Android
September 28, 2018 10:56PM
Hello Ruben,

That is because I change the connection to a client server to import data then change back.

DW
Re: WD23 HF Classic on Android
September 29, 2018 02:55PM
Hi Dennis;

I cannot help you with your code, as Im' using a webservice to work on the server level (that is much more secure) but I can give you a method that WILL work...

Instead fo changing the connection for your file, use hAliad to declare aliases of the files you need to reach on the server.

Theses different names will be connected to you C/S connection, but your main files will always be local/hf classic, without a connection

Best regards

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]
Re: WD23 HF Classic on Android
September 29, 2018 03:17PM
Hello Fabrice,

After pondering it for a while that is what I am going to do. I will use hDeclareExternal and use SQL queries as I have done this in other apps.
I do plan on writing a web service for the transfer of data but this will come later.

DW
Re: WD23 HF Classic on Android
September 29, 2018 04:01PM
Hi Dennis

The solution you chose will work but is WAY more complicated than just doing a halias...

Your choice...

Best regards

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: