12-17-2008 11:43 AM
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?
12-18-2008 07:49 PM
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
01-06-2009 04:16 PM
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=787
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";
}
01-15-2009 12:36 PM