Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi-BCB/FireMonkey/Components    [ Add a report in this area ]  
Report #:  119585   Status: Closed
[Android] TIdHttp.Get fails when installing apk from Google Play.
Project:  Delphi Build #:  19.0.13476.4176
Version:    19.0 Submitted By:   László Mlnvszky
Report Type:  Feature Specification issue Date Reported:  10/7/2013 11:51:55 PM
Severity:    Serious / Highly visible problem Last Updated: 10/8/2013 9:43:58 PM
Platform:    Google mobile OS Internal Tracking #:  
Resolution: Test Case Error (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
On Android devices, I want to download a simple .txt or .csv file from my server.
On Win32, it works fine.
When I Debug it on my Android device, it works fine.

But when I upload the .apk to the Google Play, and later download the app to my phone (or update-it), the TIdHttp.Get function fails.
Socket Error +13
Access Denied.

The code is simple:
Steps to Reproduce:
The problem is when you upload an app, it gets approved, and then downloaded.

Tomohiro Takahashi at 10/8/2013 1:13:29 AM -
Could you please attach sample project to check Permissions for Release mode in the project options?

and, if possible, could you include the apk file to the attachements?

Tomohiro Takahashi at 10/8/2013 5:52:11 AM -
If you install the .apk file via SD card or so instead of Google Play, does your issue still occur?

Tomohiro Takahashi at 10/8/2013 6:03:01 AM -
Please make sure 'Internet' permission is turned on in your project option for Release mode.

László Mlnvszky at 10/8/2013 6:25:16 AM -
It is turned on at the project options,
but in the androidmanifest.xml, it is not seen:

    <!-- This is the platform API where NativeActivity was introduced. -->
    <uses-sdk android:minSdkVersion="9" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Should I manually add it?

Tomohiro Takahashi at 10/8/2013 6:36:18 AM -
ok, could you please attach sample Delphi project(removing generated files) to this report?

> When I Debug it on my Android device ...
If you build .apk file with Debug configuration, internet permission is included in manifest file in apk?

László Mlnvszky at 10/8/2013 6:44:14 AM -
OK, so the problem is the permission!

The IDE does not generate the AndroidManifest.xml file when I click the OK button. It doesn't generate it when I DEPLOY the Project, but i Have to manually add the

    <uses-permission android:name="android.permission.INTERNET" />

Line to the XML file!

It does not generate it "normally".
I had the sam issue with the Version numbers, I had to generate it couple of times.

Tomohiro Takahashi at 10/8/2013 7:31:30 AM -
> The IDE does not generate the AndroidManifest.xml file when I click the OK button. It doesn't generate it when I DEPLOY the Project,
ok, so could you put new QC report about the issue?

Tomohiro Takahashi at 10/10/2013 9:52:35 PM -
As a possible workaround, please open template file
with editor, and add the permission like this, and save it.
... "%minSdkVersion%" /><%uses-permission%><uses-permission android:name="android.permission.INTERNET" /><application...
Then, rebuild your project. The persmission will be added into AndroidManifest.xml for the application package.

John Williams at 11/20/2013 3:26:24 PM -
Having the same issue with error 13.

The above template change does not work for me.  Tried several rebuilds, deployments, etc.  No luck.  This would be a fine work around if it could be made to work.  Thanks for providing this info.

Adding the INTERNET permission to the deployed xml file does work for me.

Server Response from: ETNACODE01