четверг, 19 марта 2015 г.

How I built friendship between Delphi XE7 with Samsung devices


I’ve expressed my “indignation” here - http://18delphi.blogspot.ru/2015/03/to-be-honest-delphi-for-android-evokes.html


Now, let’s get to the point.

We were doing the project - MindStream. Table of contents, under FMX.

BUT we tested and launched it only under Windows.

The reason is – we “took on trust” the words of Embarcadero about the “single code base” and that “the code once written works on all devices”.

We had a strong belief in this “dream”.

And, finally, Samsung sent us pads to test - Offtopic. Samsung прислал планшеты для тестирования .

So, yesterday I decided to “launch our precious” on the devices we got.

I spent eight hours on it, may be even more.

So.

Step by step.

NUMBER ONE

We install the drivers for the device.

We check if the device is NOT CONNECTED to the computer.

We take the drivers from here:
http://androidxda.com/download-samsung-usb-drivers

Or directly from here:
https://bitbucket.org/ingword/mindstream/src/125e663326c754319dbfe8532b2f362c5d365691/TestApp/Drivers/?at=B-Samsung-Try

Why do I give these links? For I had no appropriate results from searching in Google and on Samsung website.

Perhaps, I have butterfingers.

NUMBER TWO

May be we’ll have to install Kies. Learn what it is from Samsung website.

The direct link:
https://bitbucket.org/ingword/mindstream/src/125e663326c754319dbfe8532b2f362c5d365691/TestApp/Drivers/Kies3Setup.exe?at=B-Samsung-Try

How can it be possible?

Well, that’s because I’ve installed Kies FIRST, but I have not SEEN the devices. Only after, I’ve installed the drivers.

One of these would possibly be enough.

NUMBER THREE.

May be, you will have to restart your computer.

NUMBER FOUR.

We launch Delphi and CREATE or open the project FireUI.

NUMBER FIVE.

We look at the Project Manager.
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOvQor4pLc7xI4AwsAC3xsCx42NzTNbQDa8UPBmSNth87FmvNH9VOn0n408NMd5a12r0PhS53BZDo8bAQpuEQydl91vuToRX-s8IEA6AegMzPnwE0Dht_Jm7OMfYam6goeiuLdqZjCM20/s1600/pm1.png


We press the right mouse button and select Refresh.

We’d have the following:
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHXVdeJA8iQDRrFndbUArBxqTkJr0MAv52jzl6QKtgFe7tMsHA5UNnyNeFTBvNKR96tn-sSuedav4GYR4236vCa35ywU-3mDF1abukDxHfmN6VU_xfeq9KRtCuAoW6mjebing7l2Pini0/s1600/pm2.png

If the devices do not show up, the icon with arrows would stick and you’d have to reset Delphi a couple of times, each time pressing Refresh.

In the end, the device will show up and Delphi will “memorize it somewhere”. Then, everything will be OK.

NUMBER SIX.

We select Target Android.

We press Build.

If Internal Error appear, as in my “indignant” post (http://18delphi.blogspot.ru/2015/03/to-be-honest-delphi-for-android-evokes.html), we divide the project in two and try to build.

We do it till the error disappears.

When the project is built, the Messages window will print Success.

Note. The build process can take about 20 minutes and eat up to 1.5 Gb of the memory.

NUMBER SEVEN.

We press Run.

Delploying is written here.

At this stage, I’ve been trapped by an error:
[PAClient Error] Error: E2820 Could not find program, 'C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\adt-bundle-windows-x86-20131030\sdk\tools\ZipAlign.exe'

There was not some utility from SDK - ZipAlign.exe

I don’t know why.

I found it in the previous Delphi XE6 installation and copied it to the specified directory.

This utility is put to the repository for you: https://bitbucket.org/ingword/mindstream/commits/fafb709a95b1352b82709e464659e4da9d5a9ac5?at=B-Samsung-Try
https://bitbucket.org/ingword/mindstream/src/fafb709a95b1352b82709e464659e4da9d5a9ac5/TestApp/Tools/zipalign.exe?at=B-Samsung-Try

NUMBER EIGHT.

We press Run again and wait for the end of Deploying.

At this point, again, it can fail to launch. The dialog about “finger print” begins on the device.

We HAVE to accept it.

I did not do it at once. But later I saw and did it.

YES!

One more note – the mode Debug via USB or USB Debug has to be enabled on the device.

For this, we open Options and About Device.

We search for the field Build (Number) and press it SEVEN times.

As a result, the group of Developer Options will appear.

THERE we select USB Debug.

Actually, that is all.

Have a nice DEBUGGING.

Комментариев нет:

Отправить комментарий