Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
subhalaxmi
Level 7

How to detect the channel is getting uninstalled

Hi

Can you please reply my question as soon as possible.

I am new to roku developement.I am storing a key-value pair in registry.
I want to clear the registry whenever I remove/uninstall the channel(whether it is in devloping mode/any other).

But I observed that roregistry is only cleared when rebooting is done.Please give me some idea.
0 Kudos
6 Replies
EnTerr
Level 8

Re: How to detect the channel is getting uninstalled

See http://stackoverflow.com/questions/32733484

I suspect the need to reboot after deleting dev/side-loaded channel to delete registry is unaddressed bug. It would be happening if on app start registry is unzipped to and used at tmp:/<subdir>, then on exit is zipped back - with the glitch being that neither before unzip or after zip the subdirectory is cleaned
0 Kudos
subhalaxmi
Level 7

Re: How to detect the channel is getting uninstalled

Thanks for response

I got it.

I need one more information.How can i know that my channel is going to be uninstalled or deleted.Is there any method to know(I want to detect it programmatically).Simply I want to clean the registry explicitly when my channel is uninstalled.
0 Kudos
EnTerr
Level 8

Re: How to detect the channel is getting uninstalled

"subhalaxmi" wrote:
How can i know that my channel is going to be uninstalled or deleted. Is there any method to know(I want to detect it programmatically).

Nope, you can't.
Just like on the mobile platforms (iPhone etc), the app gets deleted with no notification of the event.

0 Kudos
subhalaxmi
Level 7

Re: How to detect the channel is getting uninstalled

Ok Again thanks a lot.you are solving my problem.

Then can you suggest me what should i do.

My problem is

I want to store one data when login.
And when my channel is removed the stored data should be removed.

What should i do.

I stored that in registry.But it seems that it is not cleared when i delete my side loaded channel.It is not convenient that i should restart or reboot my roku player.

I have also tried to store that data in tmp:/config.txt file.But when channel goes to background it is delted.So its also not working.

So please give me idea.
0 Kudos
TheEndless
Level 7

Re: How to detect the channel is getting uninstalled

I don't think you can test that with a sideloaded channel. You should publish it as a private channel to test it. The registry is supposed to be cleared when the channel is uninstalled. You won't see that behavior with sideloaded channels.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
subhalaxmi
Level 7

Re: How to detect the channel is getting uninstalled

Ok

Thanks a lot
I will try it.
0 Kudos