apk with TD Mobile evaluation version: Is it possible?

Discussion forum about all things TD Mobile.
fatih
Turkey
Posts: 52
Joined: 12 Oct 2018, 06:39
Location: Turkey

apk with TD Mobile evaluation version: Is it possible?

Post by fatih » 30 Aug 2019, 07:38

Hi all,

Is itpossible to generate an apk with TD Mobile evaluation version? Anyone experienced this?

I managed to run the project on a server, on IIS, as web project. I was also able to make an apk file. But when I run my apk, in my login page, when I enter user id and password and press login button, I get an error telling that it cannot find the server.

Do we need to make a specific configuration for apk on the IIS server part? Or is there anything special to apk that I miss?

PS: OpenText sales say that I cannot deploy with an evaluation version. But the interesting thing is that I can deploy to web with evaluation version.

Thank you very much for your help.

My best

a_sivababu
India
Posts: 524
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Re: apk with TD Mobile evaluation version: Is it possible?

Post by a_sivababu » 30 Aug 2019, 10:27

Hi
Hope it should work till trial period ends but i suggest to get original version as trial version will have more problem and your source code will be in encrypted state.

just my two cents on this...

I think you are running this Android Package (apk) from Mobile with connected to USB Port with Developer option. if so, just type this URL chrome://inspect in the Chrome Browser and check the details in the network tab for URL traffic. If the IIS URL is not correct then please check APPURL in app.config.js under JS folder. Please post here if you get any other issues.

you may need to open the Port if you provide other than 80 (http) or 443 (https)

If you are not connecting through USB Port but working through static IP Address with Web Hosting Domain then you may need to check domain url in APPURL.

I have tested this in Windows 10 UWP, iPhone, Android and Electron for desktop including uploading to App stores and all are working very nicely.

FRBhote
India
Posts: 2215
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: apk with TD Mobile evaluation version: Is it possible?

Post by FRBhote » 30 Aug 2019, 11:46

Yes, you can. But the apk stops as soon as the eval period is over.

fatih
Turkey
Posts: 52
Joined: 12 Oct 2018, 06:39
Location: Turkey

Re: apk with TD Mobile evaluation version: Is it possible?

Post by fatih » 30 Aug 2019, 20:10

Thank you very much for your replies. I connect to my Android phone through USB or sometimes I use Android emulator.
Here is my app.config.js file:
Td.Config.init({
AppUrl: 'http://localhost/page1',
TargetDisplay: 'Phone',
Pages:
{
"page1": { hasPhoneDisplay: true, hasTabletDisplay: false, isSecure: false },
},
});

I also opened Chrome browser/Inspect/Network tab. I saw that it couldn't find cordova.js and cordova-plugin.js (They were red and status code was 404). After copying these files to root folder , these errors disappeared.

But I still get the error: "An error occurred communicating with the server. Internal server error. Please contact support."

I use localhost to deploy backend, but I tried to use a server with static IP and I get the same error. So I think localhost is not a problem source.

My best,
Fatih
You do not have the required permissions to view the files attached to this post.

a_sivababu
India
Posts: 524
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Re: apk with TD Mobile evaluation version: Is it possible?

Post by a_sivababu » 31 Aug 2019, 04:27

I think there is something went wrong as you were saying that you were copying the cordova files to Root folder.

hope your device is connected to the same machine where you also installed your IIS and deployed in your application as your app.config.js uses http://localhost/page1

One more thing, I am not sure whether you deployed the application with folder name as Page1 as your APPURL is having this. Can you please check the folder in C:\inetpub\wwwroot. If it is different then provide the folder name and run it. for Eg, if you deployed under folder Toplam then you have to have http://localhost/Toplam

if all are ok and still having issues, let us go with manual way of doing adding the platform to copy all the files.

Keep your mobile device connected to system and complete this steps.

1. Open the DOS Command in administrator mode.
2. Change it to your TDMobile application folder and do not do any manual changes over there.
3. Type this command to remove the platform. cordova remove platform android
4. Type this command to add the platform. cordova add platform android
5. Type this command to build the platform. cordova build android
6. verify the device name by typing this command. adb devices
7. Provide device name and run this command to push the app to your mobile device cordova run android --device=deviceName

Let me know if you are facing problem.

-Siva A

fatih
Turkey
Posts: 52
Joined: 12 Oct 2018, 06:39
Location: Turkey

Re: apk with TD Mobile evaluation version: Is it possible?

Post by fatih » 31 Aug 2019, 11:02

Siva, thank you very much.

You made me saw my mistake. http://localhost/page1 URL was wrong of course. Since my project is under Toplam folder.

Although I still have the problem, atleast I corrected this major misake. I'm attaching screenshots to show my setting.
Can you please have a look at them. Perhaps I'm still missing something.

Fatih.
You do not have the required permissions to view the files attached to this post.

ozmenbetul
Turkey
Posts: 36
Joined: 28 Aug 2019, 08:57
Location: Turkey

Re: apk with TD Mobile evaluation version: Is it possible?

Post by ozmenbetul » 31 Aug 2019, 13:34

Hi, Fatih

I'm facing the same problem.

Really curious about what is wrong :roll:

Betül

ozmenbetul
Turkey
Posts: 36
Joined: 28 Aug 2019, 08:57
Location: Turkey

Re: apk with TD Mobile evaluation version: Is it possible?

Post by ozmenbetul » 31 Aug 2019, 14:00

Hi, Siva

I followed the steps you recommended. Thanks a lot for your help.

Let me make two corrections:
* cordova platform remove android (instead of cordova remove platform android)
* cordova platform add android (instead of cordova add platform android)


cordova build android failed for me , until I edited the build.gradle file under the android platform folder:

dependencies {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

classpath 'com.android.tools.build:gradle:3.0.1'
}

I changed classpath 'com.android.tools.build:gradle:3.3.0' to classpath 'com.android.tools.build:gradle:3.0.1'



But,
These manual steps didn't help, either.
It looks like an APPURL problem.


Regards,
Betül

ozmenbetul
Turkey
Posts: 36
Joined: 28 Aug 2019, 08:57
Location: Turkey

Re: apk with TD Mobile evaluation version: Is it possible?

Post by ozmenbetul » 31 Aug 2019, 14:21

I noticed something.

When my Android device is connected, chrome inspect shows that I have some problem.

I'm attaching the screenshot.

Fatih, is yours the same?

Betül
You do not have the required permissions to view the files attached to this post.

fatih
Turkey
Posts: 52
Joined: 12 Oct 2018, 06:39
Location: Turkey

Re: apk with TD Mobile evaluation version: Is it possible?

Post by fatih » 31 Aug 2019, 18:23

Hi, Betül

You're right. I get the same error.

I added the screenshots.

This is my folder where that icon stays:

D:\TDMOBILE_PROJELERI\TDMOBILE-2.3\ServerTest\APK\platforms\android\assets\www

But it seems that it's looking for this address: Request URL: file:///android_asset/www/apple-touch-icon.png

I dont have such an address.

I'm confused really.

Fatih
You do not have the required permissions to view the files attached to this post.

ozmenbetul
Turkey
Posts: 36
Joined: 28 Aug 2019, 08:57
Location: Turkey

Re: apk with TD Mobile evaluation version: Is it possible?

Post by ozmenbetul » 02 Sep 2019, 11:26

Hi, Fatih

Perhaps there's some sort of configuration to tell the app to search the png at a specific folder.

I'll try to discover.

Betül

a_sivababu
India
Posts: 524
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Re: apk with TD Mobile evaluation version: Is it possible?

Post by a_sivababu » 02 Sep 2019, 12:51

Hi,
I am unable to figure out this issue (can the rar be changed to zip). It should not generally provide any issues. I have faced problems only during Windows 10 deployment.

All your front end (html,css and js etc) assets files will be stored in your Android and it refers only from your mobile device . And, the IIS deployment is only used to deal with your server business logic (for all .asmx only and session variables).

you can please send private message for me to connect over remote (for eg, Team Viewer) and check your system.

This .png are standard one and you start looking to this when you develop the design for multiple resolutions.

-Siva A

fatih
Turkey
Posts: 52
Joined: 12 Oct 2018, 06:39
Location: Turkey

Re: apk with TD Mobile evaluation version: Is it possible?

Post by fatih » 02 Sep 2019, 13:09

Hi, Siva

These are the files in zip format.

Thank you
You do not have the required permissions to view the files attached to this post.

a_sivababu
India
Posts: 524
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Re: apk with TD Mobile evaluation version: Is it possible?

Post by a_sivababu » 02 Sep 2019, 14:08

Thanks for sharing. there is a error says target device is missing. Hope you have provided the device name as I mentioned.

I can see WEB , APK and other files in wwwroot folder which should not be ideally copied while publishing. I think you have done something manually here.

you TDMobile .apx files folder and Coroda directory should not be same. if it is same then it will copy all the files including APK and everything.

Hope other settings are fine as i am not figuring out any new issues.

Thanks
Siva A

ozmenbetul
Turkey
Posts: 36
Joined: 28 Aug 2019, 08:57
Location: Turkey

Re: apk with TD Mobile evaluation version: Is it possible?

Post by ozmenbetul » 08 Sep 2019, 19:31

Hi, all.

I had some progress. Here's what happened:

After changing my system language from Turkish to English, I managed to build the android project with Cordova. All the Gradle problems were gone. This is good news.


Then,
After running the command "cordova run android" and the application was launched on my Android device, I ran the command "chrome://inspect" in my browser.

I see that there's a communication problem with the IIS server. The inspect shows that request url and request headers are different for the web application and the android application. Web application is working fine.

Request headers for the Android app seems to be missing. Response headers section is completely missing. Also request url confuses my mind.


I'm attaching the screenshots showing my settings and the web and android app request info.

Any help will be appreciated.

Thanks,
Betül


Notes:
*******
Request info for android app:

Request URL: http://localhost/Calculator/pageCalculator.asmx/SUM
Referrer Policy: no-referrer-when-downgrade

(Response Headers is missing)

Request headers:
Provisional headers are shown
Accept: application/json, text/javascript, */*; q=0.01
Content-Type: application/json
Origin: file://
Sec-Fetch-Mode: cors
User-Agent: Mozilla/5.0 (Linux; Android 7.0; G3311 Build/43.0.A.7.106; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.132 Mobile Safari/537.36

Request info for web app:
Request URL: http://localhost/pageCalculator.asmx/SUM
Request Method: POST
Status Code: 200 OK
Remote Address: [::1]:80
Referrer Policy: no-referrer-when-downgrade

Response Headers:
Cache-Control: private, max-age=0
Content-Length: 82
Content-Type: application/json; charset=utf-8
Date: Sun, 08 Sep 2019 19:24:20 GMT
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET

Request headers:
Accept: application/json, text/javascript, */*; q=0.01
Accept-Encoding: gzip, deflate, br
Accept-Language: tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7
Connection: keep-alive
Content-Length: 77
Content-Type: application/json
Host: localhost
Origin: http://localhost
Referer: http://localhost/pageCalculator
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
X-Requested-With: XMLHttpRequest
You do not have the required permissions to view the files attached to this post.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests