×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    28

    Unhappy downloads files from the web to my phone hard drive

    I got some problems here...
    I tried to add a function to my application, a function which downloads files from the web by using wireless internet connection.

    So if I intend to do this what kind of mathematical function should I use? or how?

    Thanks a million guys.....you guys are the best!

  2. #2
    Regular Contributor
    Join Date
    Dec 2004
    Posts
    50

    Re: downloads files from the web to my phone hard drive

    Make a Recogniser for your application and use OpenFileL or any function of CDocumentHandler to save downloaded file to memory card. As soon as you download file your recogniser open the your application and calls OpenFileL and you got the whole control of that file in that function.
    try it
    Vikas

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: downloads files from the web to my phone hard drive

    You might consider getting an example from http://www.forum.nokia.com/main/reso...etworking.html
    If you have an S60 3rd edition SDK, you can also find a WebClient example in the S60Ex directory.

  4. #4
    Regular Contributor
    Join Date
    Feb 2004
    Location
    Budapest, Hungary, Europe
    Posts
    168

    Re: downloads files from the web to my phone hard drive

    I suggest you using Download Manager for downloading and launching content from web.

  5. #5
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    217

    Re: downloads files from the web to my phone hard drive

    Hi to everybody,

    The Download Manager ask to the user for the APN to connect to internet and this is a problem for me, so there is any way to solve this problem and connect automatically to the network?

    Thanks in advance.

  6. #6
    Regular Contributor
    Join Date
    Feb 2004
    Location
    Budapest, Hungary, Europe
    Posts
    168

    Re: downloads files from the web to my phone hard drive

    Did you try to make a connection (silently) first and then use Download Manager API? Perhaps it'll notice that there's an active connection.

    Tote

  7. #7
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    217

    Re: downloads files from the web to my phone hard drive

    Quote Originally Posted by tote_b5 View Post
    Did you try to make a connection (silently) first and then use Download Manager API? Perhaps it'll notice that there's an active connection.

    Tote
    I tried it but it doesn't work. There is a way I suppose it could be work, using the method CreateClientSideDownloadL but it returns a null pointer exception. And in this way, the download is not as easy as it should be.

    Has anybody try to use the method CreateClientSideDownloadL?

    Thanks.

  8. #8
    Regular Contributor
    Join Date
    Feb 2004
    Location
    Budapest, Hungary, Europe
    Posts
    168

    Re: downloads files from the web to my phone hard drive

    Quote Originally Posted by er_benji View Post
    I tried it but it doesn't work. There is a way I suppose it could be work, using the method CreateClientSideDownloadL but it returns a null pointer exception. And in this way, the download is not as easy as it should be.

    Has anybody try to use the method CreateClientSideDownloadL?

    Thanks.
    I don't think that is the right method for you: a client-side download means that HTTP transactions are not on Download Manager server-side, but the client-side. It means that you must hand over a HTTP transaction handle that Download Manager tries to use: that is, it rather uses your HTTP transaction than its own.

    Tote

  9. #9
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    217

    Re: downloads files from the web to my phone hard drive

    Quote Originally Posted by tote_b5 View Post
    I don't think that is the right method for you: a client-side download means that HTTP transactions are not on Download Manager server-side, but the client-side. It means that you must hand over a HTTP transaction handle that Download Manager tries to use: that is, it rather uses your HTTP transaction than its own.

    Tote
    You are right, it has no sense to use that method.

    I have found a property to configure the APN to use. You can use this code:


    TUint32 iapId(0);
    CCommsDatabase* cdb = CCommsDatabase::NewL(EDatabaseTypeIAP);
    CleanupStack::PushL(cdb);
    CCommsDbConnectionPrefTableView* commDBView = cdb->OpenConnectionPrefTableInRankOrderLC(ECommDbConnectionDirectionOutgoing);
    if(commDBView->GotoFirstRecord() == KErrNone)
    {
    CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref;
    commDBView->ReadConnectionPreferenceL(pref);
    iapId = pref.iBearer.iIapId;
    TBuf<20> diap;
    diap.Num(iapId);
    }

    CleanupStack::PopAndDestroy(commDBView);
    CleanupStack::PopAndDestroy(cdb);

    User::LeaveIfError( iDMgr.SetIntAttribute( EDlMgrIap, (TInt32)iapId ) );


    Thanks to everybody.
    Cheers.

  10. #10
    Registered User
    Join Date
    Jan 2009
    Posts
    21

    Re: downloads files from the web to my phone hard drive

    Hi Guys,

    In my application, i need to provide a facility, where use can connect to web and download some file(say .pdf, .doc) from the server basically and should be able to view them in phone....... Can any1 suggest the different good technical ways to approch this..............

    Also, im working on J2ME phone, most of them.. Is there any specific way to do so for J2ME phones ???

    Pleae reply back immediately, i have a very less time...

    Many thnks & regardss

  11. #11
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: downloads files from the web to my phone hard drive

    Quote Originally Posted by vivek.mandya
    In my application, i need to provide a facility, where use can connect to web and download some file(say .pdf, .doc) from the server basically
    You can use Download Manager API, for example. See Download Manager API: Using the Download Manager API.

  12. #12
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    217

    Re: downloads files from the web to my phone hard drive

    You should post your message in the J2ME forum. This one is only for native C/C++ applications.

    Cheers.

  13. #13
    Registered User
    Join Date
    Jan 2009
    Posts
    21

    Re: downloads files from the web to my phone hard drive

    Sure, i will paste in the J2ME Forum, also im unable to find link to J2ME forum in forum.nokia.. can anyone embed the link for me plss..

    Regards,

  14. #14
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: downloads files from the web to my phone hard drive

    Quote Originally Posted by vivek.mandya View Post
    Sure, i will paste in the J2ME Forum, also im unable to find link to J2ME forum in forum.nokia.. can anyone embed the link for me plss..

    Regards,
    Check this:
    - Discussion Boards > Programming Languages > Mobile Java - http://discussion.forum.nokia.com/fo...isplay.php?f=3
    - Discussion Boards > Programming Languages > Mobile Java > Mobile Java Networking & Messaging & Security - http://discussion.forum.nokia.com/fo...splay.php?f=56

Similar Threads

  1. phone camera as a web camera
    By tdaniel10 in forum Streaming and Video
    Replies: 5
    Last Post: 2010-10-04, 15:33
  2. How can I start to develop applications that can transfer files between PC and phone?
    By jiaoxkxk in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2006-08-02, 11:47
  3. Replies: 5
    Last Post: 2006-04-26, 07:08
  4. Rsc files in memory phone problem
    By iulian_moldovan in forum Symbian
    Replies: 2
    Last Post: 2006-04-21, 08:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×