Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
ddev1702
Posts: 64
Registered: ‎04-25-2012
My Device: 9000
Accepted Solution

How to add data to remote database in mobile application?

hi!

i am developing online photoalbum ,using Adobe flex.but stuck with an issue .....

My issue is:

i want to create a database in such a way that each individual user can sign up/login to upload thair albums and can add new friends from existing users.so i dnt have any idea how should i create such a database so that users from their different device can get access to database..

 

plz help me out...:

d.dev
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How to add data to remote database in mobile application?

You're going to have to create a website that has a database and write the interface to the database to manage that information in something like PHP. Then call those functions from your mobile app. The server side has nothing to do with the AIR side. There might be some opensource photo album server code out there and/or interface with existing photo album services.
Please use plain text.
Developer
ddev1702
Posts: 64
Registered: ‎04-25-2012
My Device: 9000

Re: How to add data to remote database in mobile application?

cant getting you.can you please elaborate?

can you give an example?

d.dev
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How to add data to remote database in mobile application?

You need to:
create a website
add a database (e.g. MySQL)
create interface code to the database (eg. PHP)
create business logic and database tables for users, access, images, meta data, etc
create AS3 code to access the PHP code on your server

There are several ways this all can be done. It will come down to the skills available to you. Some people like Postgres, some people like .NET, some people like Ruby. It is a personal choice.

If none of this is clear to you, you may need to get someone who understands server development and client/server architecture.

If you just want to interface to an existing album service, a quick Google search found a few that have an API. For example:
http://jalbum.net/en/developer

So you can either create your own, interface to an existing service, or find server code that you can serve on your own servers.
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How to add data to remote database in mobile application?

Here is a possible source code for the server that might be a good start point. Like anything, you need to define your requirements and see what is the best path to get there.

http://gallery.menalto.com/
Please use plain text.
Developer
ddev1702
Posts: 64
Registered: ‎04-25-2012
My Device: 9000

Re: How to add data to remote database in mobile application?

using PHP i have created a database named "aslogtec_album" and created 4 different table image_details,album_details,user_details ,friends_details.

but cant  understand  what to do now? i am using Http

 


        <s:HTTPService id="_httpService" url="http://www.aslogtech.biz/design/project/Album" result="_httpService_resultHandler(event)" fault="_httpService_faultHandler(event)" useProxy="false"  method="POST">
            <s:request xmlns="">
                <usr>design@aslogtech.com</usr>     //username
                <pass>wv[CqwE!m}.(vtS1P4</pass>    //password
              
            </s:request>
        </s:HTTPService>

 

plz tell me what to do now?

 

d.dev
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How to add data to remote database in mobile application?

You have to create an intermediate layer on the server (in PHP or like) to accept the HTTP request. This PHP script file, would accept the request, validate/authenticate the request, process the request and then return data to the client in JSON or XML (or other).
Please use plain text.