Develop your own Magento mobile application

Do you want to develop your own Magento mobile application?

Great! I’ll give you some pointers on how to get a grasp onMagento’s XMLConnect, an extension that servesMagento Mobile application.

Keep in mind that XMLConnect extension comes ‘preinstalled’ inMagento CE 1.5 and later, but you can get it from MagentoConnect.

The Big Picture

Awhile ago, Magento Mobile was released for iPhone, iPad andAndroid devices. It consists of two parts: a Magento web store withan XMLConnect extension installed and configured, and a nativeapplication itself.

XMLConnect extension’s purpose here is to serve your applicationwith requested data (category listing, product information, etc.)and execute desired actions (buy, log in, checkout, etc.).
Basically, application sends a request (plain HTTP GET/POST) toyour Magento store (XMLConnect) and it responds with an XMLresult.

The best way to get familiar with XMLConnect is to see it inaction:

1) Set up a Magento store on your web server with some sampledata
2) In Magentoadmin->Mobile->Manage Appsadd a new mobile application
3) Install Magento Mobile on your device
4) Start Magento Mobile on your device with your Magento store urland the app code of the application you just created inMagento admin->Mobile

While exploring Magento Mobile, keep an eye on (Apache) activitylog file to see exactly what the application is requesting from theserver.
For instance, the first request would probably be the applicationconfiguration request.

/xmlconnect/configuration/index/app_code/defand1/screen_size/480×800

We recognize in this request an app code (in this example it is“defand1″) and your device’s screen size (here it’s“480×800″).
Let’s check out what is the result of this request. In your browsernavigate to:

http://magentoivica.loc/xmlconnect/configuration/index/app_code/defand1/screen_size/480×800
(obviously, replace “magentoivica.loc” with your web server name.Recognize the rest of the url?)

Voilá, what you should get is an entire configuration of yourapp (as it is set in your Magento admin) in an XML format.

Using this practice, you can easily explore most of thecapabilities of XMLConnect. Also, it may be necessary to get intothe code of XMLConnect if you want to master some of the moreadvanced actions (such as the checkout process).

Ok, now you know basics of using XMLConnect, how to make arequest and what to expect as a result. But, how to use thisinformation in an Android (Java) environment?

You probably already know something about parsing XMLdata. I will show you a better way (probably) which willallow you to have more modularity andsustainability in an Android applicationdevelopment.

So, stay tuned :)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值