×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    121

    Question Start a exe with a application start up

    Hi All,

    As per the Midlet Native Services framework , we should have a daemon which will run on device start up using EZBoot and listen to all the MIDP requests through socket. And they have instructed to package everything into sis file. Now my question is this daemon will be always running behind, Even if MIDLet doesnt needs daemon. Will this have any performance issue? Any chance that socket server may go down because of some reasons? which will break all communication between MIDlet and Native Code.

    Is it possible to do this in reverse manner package application as JAR i.e JAR will include the exe of the daemon and when JAR is installed, exe will also be deployed.(Not sure we can include exe in JAR of mobile application)? I was just trying to understand as S60 has J2ME support so a application can be JAR installation also.

    In case of both the approaches, we have both MIDLet and exe on Phone. Now Can I make the daemon run on J2ME application start up instead of device start up and shut down on application exit?

    Please provide your opinion.

    Thanks in advance,
    Sandeep

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: Start a exe with a application start up

    [QUOTE=sandeepkumar03;533660]Now my question is this daemon will be always running behind, Even if MIDLet doesnt needs daemon. Will this have any performance issue?[/QOUTE]If your daemon process is coded properly, it is completely inactive when the midlet part does not run. Waiting for an incoming connection on a socket is pretty harmless.
    Any chance that socket server may go down because of some reasons? which will break all communication between MIDlet and Native Code.
    The Socket Server does not die often, and even if it dies, both sides will certainly get some notification.
    Is it possible to do this in reverse manner package application as JAR i.e JAR will include the exe of the daemon and when JAR is installed, exe will also be deployed.(Not sure we can include exe in JAR of mobile application)? I was just trying to understand as S60 has J2ME support so a application can be JAR installation also.
    You should ask that on the Java boards too. If the "File Connection" JSR also supports "executing" a file, you may happen to succeed in starting a .sisx file, thus installing it. But I do not know the details.
    Can I make the daemon run on J2ME application start up instead of device start up and shut down on application exit?
    I think you can not.

  3. #3
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    121

    Re: Start a exe with a application start up

    Thanks a lot wizard_hu_

    I have posted that on Java forum also as you suggested. As we can start up the application on boot by using Auto Startup. I am trying that. I have following doubts
    1. How to get the application signed? I am new to this. Do they provide UID for app or something else? Do we need application to be signed even to run on emulator?
    2. Can I try start up with emulator? As of now i dont have the S60, 3rd Ed, FP1 device. So i was thinking if i can test this in emulator? or i have to test this only on phone?

    May sound silly, but what i have done is followed all the steps and I am starting emulator as stand alone and expecting the application to start up, which is not happening.

    Please provide your opinion.

    Thanks in advance,
    Sandeep

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: Start a exe with a application start up

    The Startup List Management API is hard to test on the emulator, since the act of installation is important for it in order to work (so copying the [xy].rsc-s into the apparently proper location is simply not enough).
    About signing option you should visit http://www.symbiansigned.com, there you will find "The Guide", and you will also find the completely free Open-Signed Online variant. However it will not necessarily help you if you do not have a device (though you can experiment with http://wiki.forum.nokia.com/index.ph...ition_emulator if you really want).
    Anyway, for testing in the emulator it is far easier to provide an icon for your executable (if you do not have one, check http://wiki.forum.nokia.com/index.ph...ons_on_Devices).

  5. #5
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    121

    Re: Start a exe with a application start up

    Thanks Wizard_hu_

    I am finding a S60 3rd Edition device. During that time i was trying the option mentioned by you
    1. I was able to execute the console application by providing a icon. Here i have a question. As the requirement is to make the server running in back end. I should not see the console. I have not tested this with device startup but when i run that project from Carbide.c++ using emulator, sometimes the while console is shown and this is sporadic. Now i can select the menu option and go to Installed folder and run the MIDlet and now MIDlet can communicate with socket server. Can i eliminate the while console coming there?
    2. One more thing. When I get the unhandled exception I get warning "Unhandled Exception. Close Application?". If I say Yes then no issue but If Say No and try to access the MIDlet again and try to communicate to the Socket server but the problem is Socket Server gets closed. I know i have to handle all the exceptions here, but if by mistake i miss any exception and the Socket server goes down the total communication break will happen between MIDlet and socket server. I am not sure what should i do in that case?
    3. I was able to make little progress on installing a sis on S60 3rd Edition emulator using work around suggested by you. Previously i was getting "File Corrupt" error. Now when i install it goes to application info , then to location selection where you want to install. Then i get warning "Application Not Compatible with Phone. Continue Anyway?". When I select Next, I get error "Required application access not granted". I have used self signing option in carbide. I am not sure whats the problem.

    Probably 2nd point above was different, but excuse me i got this during trying other two points so mentioned here. Please guide.

    Best regards,
    Sandeep

  6. #6
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    121

    Re: Start a exe with a application start up

    Hi Wizard_hu_,

    1. I was able to execute the console application by providing a icon. Here i have a question. As the requirement is to make the server running in back end. I should not see the console. I have not tested this with device startup but when i run that project from Carbide.c++ using emulator, sometimes the while console is shown and this is sporadic. Now i can select the menu option and go to Installed folder and run the MIDlet and now MIDlet can communicate with socket server. Can i eliminate the while console coming there?
    2. One more thing. When I get the unhandled exception I get warning "Unhandled Exception. Close Application?". If I say Yes then no issue but If Say No and try to access the MIDlet again and try to communicate to the Socket server but the problem is Socket Server gets closed. I know i have to handle all the exceptions here, but if by mistake i miss any exception and the Socket server goes down the total communication break will happen between MIDlet and socket server. I am not sure what should i do in that case?
    3. I was able to make little progress on installing a sis on S60 3rd Edition emulator using work around suggested by you. Previously i was getting "File Corrupt" error. Now when i install it goes to application info , then to location selection where you want to install. Then i get warning "Application Not Compatible with Phone. Continue Anyway?". When I select Next, I get error "Required application access not granted". I have used self signing option in carbide. I am not sure whats the problem.

    Good news for me. I got S60 3rd Edition device and I am able to install a sis on that. I had missed following line in .pkg file

    Code:
    [0x101f7961], 0, 0, 0, {"Series60v3.0"}
    So 3rd point is resolved now. While searching on internet, I found some of the folks were able to install sis on emulator. May be if try some more i would be able. The sole purpose was i didnt had device (which i have borrowed from friend now )so i was looking for that way.

    Still i am not sure about the first two points. Please provide your inputs.

    I am a newbie and trying from my side. Please excuse if i have been putting so many basic questions.

    Best regards,
    Sandeep

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: Start a exe with a application start up

    #1: it is simple, if you do not need the console, do not create the console object. So remove/comment (or surround with #ifdef-s) references to your "CConsoleBase *console" (probably).

    #2: unfortunately I do not know, the unhandled exception message is certainly related to Java, and I am not experienced in mobile Java. However a thing you can probably try is catching the given exception

  8. #8
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    121

    Re: Start a exe with a application start up

    Thanks wizard_hu_,

    I will try that. I was thinking of another option also. Please verify if this is a good idea. But let me explain in little detail. I had some general doubts, Please guide. Following are the steps
    1. I have a application which will have J2ME UI and Symbian C++ Backend and the communication will happen through the socket.
    2. Provide a link on website where we can download application. It will be a single .sis file. Which should have J2ME JAR, Backend DLLs and Socket Server. I am able to pack JAR in sis, but it is not getting installed automatically by using FI, FR option in package file. Your thoughts on this? This one i tried to pack the JAR with socket server application. So this would need to start the socket server on device boot up. For this is third point can be a option?
    3. Calling Symbian from J2ME not possible but can i write a symbian application which will pack J2ME JAR, Socket Server (may be another sis, not sure), DLLs. So can i have a single icon, which on startup will call socket server exe, J2ME UI (Assuming i am able to install automatically in step 2 and also i am not sure we can call J2ME application from Symbian). Can this be a option or normal server running on start up is a better option?
    4. Once the application is ready, i can install on phone currently by using self signed option. So do i need to get application signed from Symbian Signed?

    Please guide.

    Thanks, best regards
    Sandeep
    Last edited by sandeepkumar03; 2009-02-02 at 11:09.

  9. #9
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    121

    Re: Start a exe with a application start up

    Hi,

    Resolved some of the issues.

    but it is not getting installed automatically by using FI, FR option in package file
    Got to know from Symbian Website that FR, RI options will not work with self signed applications. So thats is the issue here.

    Thanks a lot for your responses. I am always there to ask doubts in Nokia Forum. If i have any issue, I will search Nokia Forum and if required ask from experts here

    Best regards,
    Sandeep

Similar Threads

  1. Replies: 11
    Last Post: 2008-12-16, 10:37
  2. Replies: 5
    Last Post: 2008-11-11, 08:32
  3. Start a J2ME application by OTA
    By hbfornies in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2003-09-24, 17:14
  4. Replies: 1
    Last Post: 2003-04-02, 10:00
  5. Replies: 1
    Last Post: 2003-04-01, 11:37

Posting Permissions

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