[英]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.