Jump to content
  • Advertisement
Sign in to follow this  
Woody FX

Can a MIDlet delete itself?

This topic is 5390 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it possible to make a MIDlet delete itself? I didnt think this was possbile? I cant find anything about it either but I have a client who insists its possible and wants it implemented!

Share this post


Link to post
Share on other sites
Advertisement
There's only one file deletion method available in MIDP1 and that's RecordStore.deleteRecordStore (String name). I've never tried passing the name of the JAR file to that function. Might work, then again, it could all go horribly wrong. And it's probably dependant on the phone's implementation.

Skizz

Share this post


Link to post
Share on other sites
I can easily think of a reason: you have a 30-day demo and you want to delete it after the trial period is up.

I have seen MIDlets deleting themselves on 3's (3 the network provider, not the number) phones. It was a demo version of the Dwindle game. After awhile it prompted that the trial period was up, and later it disappeared from the phone. I imagine your client has seen this happen too and that's why he's insisting on it.

But the J2ME specs don't have any method to do this, so I guess they are using some sort of proprietary API.

shmoove

Share this post


Link to post
Share on other sites
"The deleting midlet thing is to stop people nicking the games i.e.
increaseing security. I also dont want people to keep the app without the
api's inserted as i makes it difficult for them to update the app at a later
date."

That is exactly how my client put it!

I am developing a skill based game for him! Later on i will have to add an API that hooks it up to an online arcade where you compete with others for prizes!

I will have to come up with some sort of solution.
Maybe have the appliaction only work until a certain date in the future. Once this date is reached prompt the user to delete the application and reinstall the newer version.


Share this post


Link to post
Share on other sites
Quote:
Original post by shmoove
I have seen MIDlets deleting themselves on 3's (3 the network provider, not the number) phones.
shmoove


So it must be some sort of service command then?

I know I should be doing my essay right now but I found these for you :). I know one is MIDP2.0 but it might shed some light. Google search for "MIDP1.0 AMS" seemed to give results.

http://www-106.ibm.com/developerworks/library/wi-amspalm/index.html?ca=drs-wi2604

http://www.awprofessional.com/articles/printerfriendly.asp?p=99984




Share this post


Link to post
Share on other sites
Quote:
Original post by Woody FX
"The deleting midlet thing is to stop people nicking the games i.e.
increaseing security. I also dont want people to keep the app without the
api's inserted as i makes it difficult for them to update the app at a later
date."

That is exactly how my client put it!

I am developing a skill based game for him! Later on i will have to add an API that hooks it up to an online arcade where you compete with others for prizes!

I will have to come up with some sort of solution.
Maybe have the appliaction only work until a certain date in the future. Once this date is reached prompt the user to delete the application and reinstall the newer version.


I don't understand how someone would nick a java game less if it deleted itself after a while, it shouldn't even be possible to get java games from the phones. That does not increase security in any way.

I really don't get this. And the user could allways change the data of his phone.

/MindWipe

Share this post


Link to post
Share on other sites
Following on from what MindWipe said if you can delete the game that isnt going to stop them from sending it to anyone else or being able to upload it to their computer before you delete it. The security for what (i think) you're talking about is reliant on the phone there is nothing you can do about it.

What you're saying about API's makes no sense.

Share this post


Link to post
Share on other sites
As i said this is not decision.

I think he will be giving the game away as a trial and wants the users to update to a new version once i have imlemented the API for the arcade feature.

He(the client) mentions security himself! I am not sure if he means security in the way we as developers immediatly think of security! More security to his investment!!!

Possibly..

Anyways so there is no self deletion of MIDlets as i suspected! Great!

Thanks
Brain

Share this post


Link to post
Share on other sites
A Midlet cannot delete itself.

It can however store something in the RecordStore to say that it should no longer operate, and check for that on load.

If this bit exists in the record store, isntead of running the game, you just display a message saying "This application will no longer run. You should delete it from your phone to save memory"

If you wanted to make a 30day timeout, you could just record the install date (i.e. when your midlet was run with no recordstore present) and check that on startup and refuse to run thereafter.

The user could easily defeat it by changing the system time / date (of course you could check for the date going backwards and lock them out if that happened).

Mark

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!