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

Web and WebWorks Development

Reply
New Developer
washinl
Posts: 5
Registered: ‎09-11-2008
My Device: Not Specified

Clear Browser Cache when data is pushed via ECL

I have created a database based on the ECL sample provided by RIM.  I have updated the expiration date so that data sent to users Blackberry does not automatically expire for 30 days.  However, now I want to remove the persistent cached data that was sent to a user.   I tried using perl but it only works if the data was initially pushed using perl.

 

Does anyone know a way to remotely remove the data / icon from a users Blackberry when it was initially pushed there using the ECL push?

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Clear Browser Cache when data is pushed via ECL

Assuming you are using a browser channel push to get the data to the BlackBerry handheld, you can use a browser channel delete push to remove it.  Have a look at the article below for more informaiton.

 

Pushing Web Content to BlackBerry Wireless Devices

http://na.blackberry.com/eng/devjournals/resources/journals/jan_2005/push_me.jsp

 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
washinl
Posts: 5
Registered: ‎09-11-2008
My Device: Not Specified

Re: Clear Browser Cache when data is pushed via ECL

I have used a browser channel push to send HTML in a persistent cache to my users Blackberries, based on the ECL template from RIM.  I have read the suggested material and am having trouble getting started.  I have used perl in the past to push other channels to existing Lotus Notes applications. I have tried to modify this code to use as a delete.  Perhaps you can give some me some assistance?

 

Here is the code:

 

use strict;
use LWP::UserAgent;
use HTTP::Request;
my $MDS = "<<my BES server path>>";
my $PORT = "8080";
my $EMAIL = "<<myemailaddress>>;
my $url = "<< the URL to my notes database>>";
my %headers_to_send = (
 'Content-Location' => $url,
 'Content-Type'  => "text/html",
 'X-RIM-Push-Title' => "ECL",
 'X-RIM-Push-Type' => "Browser-Channel-Delete",
 'X-RIM-Push-Channel-ID'=> "ECL",

'Content-length=> "0",

'Connection'  => "Close",
);

my $browser = LWP::UserAgent->new;
my $get_response = $browser->get($url);
my $content = $get_response->content;

my $mds_url = "http://$MDS:$PORT/push?DESTINATION=$EMAIL&PORT=7874&REQUESTURI=/";

my $request = HTTP::Request->new;
$request->method('GET');
$request->uri($mds_url);

foreach my $header (keys %headers_to_send) {
 my $value = $headers_to_send{$header};
 $request->header($header,$value);
}

$request->content($content);

my $response = $browser->request($request);

if  ($response->is_success) {
  print "Push Was Successful. Sent to $EMAIL.\n";
} else {
  print "There Was A Problem. Code was: ",$response->code,"\n";
}
 

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Clear Browser Cache when data is pushed via ECL

Can you describe the behaviour you are seeing?  What is the respons from the MDS Connection Service?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker