简体   繁体   English

如何将我自己的android应用程序项目导入IBM Bluemix?

[英]How to import my own android application project into IBM Bluemix?

Can someone help me use the new PaaS - IBM Bluemix? 有人可以帮助我使用新的PaaS-IBM Bluemix吗?

I faced a dilemma that I want to import my android application project which was developed on my local computer into the IBM Bluemix and run on the platform ,but I didn't know how to use it. 我面临一个难题,我想将在本地计算机上开发的android应用程序项目导入到IBM Bluemix中并在平台上运行,但是我不知道如何使用它。

I have search on Internet about this ,I still cannot find the solution. 我在Internet上对此进行搜索,但仍然找不到解决方案。

Does IBM Bluemix support this kind of service? IBM Bluemix是否支持这种服务?

I just want to debug or test on this cloud platform. 我只想在此云平台上进行调试或测试。

You don't deploy an android application to bluemix as the android application exists on the actual mobile device (or emulator) and not in the cloud. 您不会将android应用程序部署到bluemix,因为android应用程序存在于实际的移动设备(或仿真器)上,而不存在于云中。 What Bluemix offers you is the ability to have services running on the cloud that can work with your android application on the mobile device. Bluemix为您提供的功能是能够在云上运行可以与移动设备上的android应用程序一起使用的服务。 This is called MBaaS (Mobile Backend as a Service). 这称为MBaaS(移动后端即服务)。

For example you can have a MobileData service that allows you to store data in the cloud that your mobile device(s) (iOS, android or web) can access (think of having a game save that can then be picked up by another user device to resume playing at the same point). 例如,您可以拥有一个MobileData服务,该服务可让您将数据存储在移动设备(iOS,Android或Web)可以访问的云中(例如保存游戏然后可以被另一个用户设备提取)。在同一点继续播放)。 Bluemix provides an SDK to access these services on Bluemix from your android application source code. Bluemix提供了一个SDK,可以从您的android应用程序源代码访问Bluemix上的这些服务。

IBM Bluemix is a cloud platform where you can build web applications / mobile back end services utilizing a wide range of services. IBM Bluemix是一个云平台,您可以在其中使用各种服务来构建Web应用程序/移动后端服务。

Lets say you are building a weather app. 可以说您正在构建一个天气应用程序。 This app will require two components 1. a server side web application 2. a mobile application (lets say android) 此应用程序将需要两个组件1.服务器端Web应用程序2.移动应用程序(比如android)

The server side component does only one thing, it constantly collects weather forecast from multiple data sources (eg www.data.gov, forecast.io etc). 服务器端组件仅做一件事,它不断从多个数据源(例如www.data.gov,Forecast.io等)收集天气预报。 This app has restful apis exposed to internet which can be invoked by mobile app to request weather forecast for a particular geo cordinates (Eg http://weatherapp.mybluemix.net/getForcast/122.20,-100.20 ). 此应用程序具有公开的互联网api,移动应用程序可以调用该API,以请求特定地理坐标的天气预报(例如http://weatherapp.mybluemix.net/getForcast/122.20,-100.20 )。 The server app responds to get requests in JSON format. 服务器应用程序响应以JSON格式获取请求。

The Mobile app, detects current location's geo co-ordinate using mobile phone's GPS and request weather forecast of the location from server component using a HTTP get (GET: http://weatherapp.mybluemix.net/getForcast/122.20,-100.20 ) . 移动应用程序使用手机的GPS检测当前位置的地理坐标,并使用HTTP get(GET: http : //weatherapp.mybluemix.net/getForcast/122.20,-100.20 )向服务器组件请求该位置的天气预报。 The mobile app then parse the response JSON data and display information on a neat elegant screen. 然后,移动应用程序解析响应JSON数据,并在简洁的屏幕上显示信息。

If you want to port this app onto IBM bluemix, you can build the server component using, NOde.js or JSP or PHP etc, use mMongoDB,mySQL DB or Postgresql databases, use twillio for text messaging/mms or voice call, use IBM Push for notifying user about weather forecast etc. 如果要将此应用程序移植到IBM bluemix上,则可以使用NOde.js或JSP或PHP等来构建服务器组件,使用mMongoDB,mySQL DB或Postgresql数据库,使用twillio进行文本消息传递/彩信或语音呼叫,使用IBM推送通知用户天气预报等信息

Using Android SDK, IBM Cloud services SDk (Mobile data, push notification etc) and sell it on Google play. IBM Cloud使用Android SDK服务SDk(移动数据,推送通知等)并在Google Play上出售。

Hope this helps -Keep coding- 希望这对您有所帮助-继续编码-

We have sample applications for Bluemix which can be deployed on Android. 我们有可用于Android的Bluemix的示例应用程序。 See the "boilerplate" app in the Bluemix catalog named "Mobile Cloud". 请参阅Bluemix目录中名为“ Mobile Cloud”的“样板”应用程序。 Head to the Bluemix console [1], click on "CATALOG" at the top. 转到Bluemix控制台[1],单击顶部的“ CATALOG”。 The Mobile Cloud docs [2] reference several applications for iOS, Android, etc with server-side pieces can be deployed on Bluemix. Mobile Cloud docs [2]引用了可在Bluemix上部署的具有服务器端组件的多个iOS,Android等应用程序。

[1] https://bluemix.net/ [1] https://bluemix.net/

[2] https://www.ng.bluemix.net/docs/#starters/mobile/index.html [2] https://www.ng.bluemix.net/docs/#starters/mobile/index.html

您可以参考developerwork文章 ,开始为您的andriod应用程序使用Bluemix服务。

First ,you need to login to bluemix and create a new account in ther, There u have create an application in ur dashboard,where the runtimes in node.js,and add the following services namely,push,mobile data and mobile security application. 首先,您需要登录到bluemix并在其中创建一个新帐户,您已经在您的仪表板中创建了一个应用程序,其中运行时在node.js中,并添加了以下服务,即推送,移动数据和移动安全应用程序。 Then u need to download the android SDK available in it and add to ur android app all the jar files in the libs folder. 然后,您需要下载其中提供的android SDK,并将libs文件夹中的所有jar文件添加到您的android应用中。 U need to save the app id,secret id and the link in order to connect it from local android app to bluemix. U需要保存应用程序ID,秘密ID和链接,以便将其从本地android应用程序连接到bluemix。

Hope this was useful,if any doubt further,let me know 希望这是有用的,如有任何疑问,请告诉我

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM