简体   繁体   English

如何使我的Android应用程序能够使用3G(Firemonkey / RAD Studio XE6)

[英]How to make my android app to be able using 3G (Firemonkey/RAD Studio XE6)

I am developing an app in Rad Studio XE6 (Delphi) which access an Oracle DB in a server. 我正在Rad Studio XE6(Delphi)中开发一个可访问服务器中Oracle DB的应用程序。 So far I have tested it using my personal laptop as a server which hosts the DB. 到目前为止,我已经使用个人笔记本电脑作为承载数据库的服务器对其进行了测试。 The client is being created in Delphi and I installed it on my android phone. 客户端是在Delphi中创建的,我已将其安装在Android手机上。 Both are in the same wifi network (Laptop and android device). 两者都在同一个wifi网络中(笔记本电脑和android设备)。

Up to here, everything works perfectly. 到这里为止,一切都运行良好。

But, I tried to get connected to my laptop and get the data base using 3G connection... this did not work. 但是,我试图连接到我的笔记本电脑并使用3G连接获取数据库...这不起作用。

Looks like my android device never reaches the server (my laptop). 看来我的android设备从未到达服务器(我的笔记本电脑)。

Do somebody know what do I need to do in order to make my app working through 3G to reach the database server? 有人知道我需要做什么才能使我的应用程序通过3G到达数据库服务器吗?

It's a networking error, not a programming error. 这是网络错误,而不是编程错误。 You have a firewall, possibly at the ISP level, blocking you from the db. 您有可能位于ISP级别的防火墙,阻止您进入数据库。 You also probably have at least one layer of NAT in there. 您可能还在那里至少有一层NAT。

As an aside- you should NEVER connect directly to a db, for 2 reasons. 顺便说一句,出于两个原因,您永远不要直接连接到数据库。 First off, it requires your db server to be publicly accessible and thus more open to hackers. 首先,它要求您的数据库服务器可公开访问,因此对黑客更开放。 Secondly, it requires you to put the password in the app, which means anyone can decompile the app and get the password. 其次,它要求您将密码放入应用程序中,这意味着任何人都可以反编译应用程序并获取密码。 Instead you should put a web service between them, so only the web server needs to connect to the db. 相反,您应该在它们之间放置一个Web服务,因此只有Web服务器需要连接到数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用我自己的服务器在带有RAD Studio XE6的Android上进行远程推送通知 - Remote push notifications on Android with RAD Studio XE6 using my own server 如何使用C ++在RAD Studio XE6中存储Android应用程序数据/设置? - How to store Android application data/settings in RAD Studio XE6 using C++? Firemonkey XE6:如何在我的adroiddevice上使用全分辨率? - Firemonkey XE6:How to use the full resolution on my adroiddevice? Rad Studio XE6是否可以生成Dalvik字节码 - Is it possible to generate Dalvik Bytecode by Rad Studio XE6 如何在Delphi XE6中为Android应用创建调试映射文件? - How to create debug map file for Android app in Delphi XE6? Delphi XE6 Firemonkey Mobile - 如何禁用虚拟键盘? - Delphi XE6 Firemonkey Mobile - How to disable Virtual Keyboard? 如何使用REST或IdHTTP Firemonkey在Dropbox上删除文件/文件夹(Rad Studio 10 Seattle)– Android / iOS - How to delete file/folder on Dropbox using REST or IdHTTP Firemonkey (Rad Studio 10 Seattle) – Android/iOS 如何使用Android的3G数据在家中访问路由器? - How to acess my router on home, using 3G data of Android? 如何在我的应用程序中检查3G状态: - How to check the state of 3G in my app: 如何在Delphi-XE5 Firemonkey应用程序中关闭Android应用程序? - How to close android app in Delphi-XE5 Firemonkey application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM