RSS
 

Sorry, we made a mistake

12 Oct

We have noticed recently that due to a small glitch in our FoxToPhone extension we broke a little functionality in Firefox by default.

Upon upgrade to a new version you’ll read this page just once so you can learn about the problem, the solution and our apologies for not noticing it at the correct time.

When you install FoxToPhone we automatically add the button to the toolbar at the right side of the Url bar, but placing any icon there means that Stop and Reload buttons are not embedded in the Url bar and that it’s not possible to resize the Url and Search bars.

To fix the problem you just have to customize the toolbar and move the Android head to some place at the end of the toolbar.

Step 1: right click and select customize

Now drag and drop the FoxToPhone button at the right of the Search bar

Then close the Customize pane and you’ll be able to resize the Url and Search bars (sometimes it seems that you might have to restart Firefox to work correctly)

Again, our apologies for not having noticed the problem before, and by the way, did you read our previous post explaining how to send files to your Android easily?

 
 

Introducing FoxToPhone 1.2 (still in beta)

13 Jul

Today we’ve uploaded the first beta of FoxToPhone 1.2(Updated link to beta2) to the Add-ons repository. We still plan to add an extra feature before releasing it as stable, but first of all this version requires lots of testing, so that’s why I’m writing this post to introduce you to the changes that we’ve done.

The most important part is that we have changed the authentication system to use OAuth like the Chrome extension, so we’re now using again the latest API. This will help us to implement any new feature that it’s added in the protocol, like a theorical PhoneToBrowser, but it has a real benefit right now: if someone tried to use FoxToPhone without the apk already installed and configured in his phone, currently the server was returning a generic “500 internal server error”, but now we get again the specific message that the device isn’t registered and can show you an instructions page.

But this change has one risk, several people have been claiming problems with ChromeToPhone since it changed to OAuth, and so we wouldn’t like to introduce such problems with FoxToPhone.

We’ve been testing FoxToPhone with several accounts, also with accounts that had the 2 steps verification enabled and they are working fine, but we can’t test every possible configuration, people might have strange things in their configuration, some hidden problem that isn’t obvious, and that’s why those OAuth problems (reported as “ChromeToPhone remains in a tab saying Connecting….” ) have surfaced just for some people.

So please, if you had problems with ChromeToPhone but FoxToPhone has been working fine so far, we would like you to please test this beta. If you have problems then please write back here so we can try to help you and find a fix that can help also other people. On the other hand if the new FoxToPhone works fine, then please also write back so we can know that we haven’t made any mistake and all our efforts have been worth.

That’s enough about OAuth, now the second change in this version: file transfers for everyone.

Previously we announced that there was a method in FoxToPhone to enable file transfers by setting a hidden preference. Due to time constrains (and also being tired after coding all the upload pane) we left that option hidden without a general option that can be easily used.

This past week I’ve resumed the work, ironed out some bugs and aesthetic issues with the upload pane and then searched for some public hosting, and found that min.us was the kind of service that we needed. It offers hosting of files without requiring to create first an account there, but you can register in order to get extra benefits, and their API was so simple that the most complex part of adding support in FoxToPhone was adjusting the preferences pane.

Of course, as the file transfer is using a 3rd party server we think that it’s better to stay disabled by default, but you can easily enable it in the preferences pane:

First open the Add-Ons pane and click on Options of Fox To Phone

In that dialog click on the “Server” dropdown and select Min.us, that’s all. You can keep using your own server if you put “Custom” and write the url in the textbox that appears below (if you already had set a custom server the dialog should show correctly that option).

After enabling that option you can right-click on the toolbar button and you’ll see these options:

When you select “Send files…” a file picker will open and you can select one or more files to transfer. They will be sent to the choosen server and then the link to get them back will be sent to your phone. A little issue with min.us right now is that the downloaded file doesn’t keep the original name, only the extension. Also if you are transfering pictures you’ll need to click once to view the original picture and then press long on the picture to use the Save option in the browser’s context menu.

If you select “Send folder…” in the context menu, then the selected folder will be zipped and that’s the file that will be sent to your phone, you can unzip it there with the app that you prefer to use.

Also, beside using the context menu, you can directly drag&drop files or folders onto the toolbar button and they will be transfered in the same way.

One last minor feature added in this release is that URLs that are too long and previously failed to be sent now are automatically shortened with goo.gl

As I said previously we haven’t finished with this 1.2 version, we want to add at least one extra option in the Server options, but as the current tests seem to be good we want you to test this beta version so you can give us your feedback about it. We’ll be glad to hear your comments, don’t be afraid to test this version it’s working fine for us and you can easily uninstall it and return back to the stable version available in the Add-ons site.

 
 

Testers required for the new update

06 Feb

Today we have added a new test version to the beta channel of FoxToPhone. You can install this beta 3 by scrolling down to the “Beta channel” section, or using this direct link for beta 3.

There are no new functions added in the 1.1.2 version, just some updated URLs and translations, and although they seem like simple changes we don’t want to have to rush with a new update like happened with the 1.1.1 due to a bug in the German files. So please, install this beta version to verify that it works correctly in your language.

BTW, if some artist would like to help us to update the icon for Firefox 4 that would be nice. The requirements aren’t still 100% clear but it seems that for the extension manager a 48×48 and 64×64 icon is required, and the toolbar button will be just 16×16, although a 24×24 might be used also in Linux.

 
 

RESOLVED – Issue with v1.1 auf Deutsch

25 Aug

UPDATE: The nice guys & gals at Mozilla were kind enough to quickly approve the fixed version. Users who were experiencing issues should go to “Tools > Addons > Find Updates” (or to be more correct, the German equivalent) or visit Mozilla.org to download directly.

We have recieved reports that users with their browser language set to German (locale DE), have had issues with FoxToPhone v1.1. A fix has now been released.

Firstly, thanks to all the users who who brought this issue to our attention.

My sincere apologies about the issues you have encountered, a fix has been applied and tested to resolve the issue you experienced.
Mozilla will take about a week to roll this fix out automatically. Until then feel free to remain using version 1.0 or you can upgrade directly to version 1.1.1 using this link:
https://addons.mozilla.org/en-us/firefox/downloads/file/97411/fox_to_phone-1.1.1-fx.xpi?src=version-history&confirmed=1

In other news, v1.1 has been released to the masses, bringing with it QR Code detection and the technical preview of file uploads. (See previous post)

 
 

What’s the Easter Egg in 1.1?

19 Aug

As we stated in our last blog post about V1.1, there’s an extra feature that requires its own post to explain what it’s all about,  due to its current state it is for medium to advanced users only.

Sending links to the phone is nice, and sending texts can make it easier to write something on your computer or grab some notes and then you’ll have it quickly in the clipboard of your phone.

But there is another feature that can make things easier sometimes…

What about sending files?

Yep, don’t you wish sometimes to being able to quickly send a file or an .apk to your phone without the need to plugin the USB cable or swap out the MicroSD card?

Of course there are other options available, the nice thing is trying to provide alternatives because some people might not want to register with a new company, or you don’t want to use a closed source app, or whatever. We think sending files is a natural progression by integrating this option with FoxToPhone, so this version includes a first experimental version.

How does it work?

First of all: this is disabled by default.
Secondly you just need three things to enable sending files.
- The latest version of FoxToPhone (V1.1)
- Write access to a web server.
- The PHP script below.

You have to set up your own web hosting server and adjust the configuration of the extension before being able to send any file, you can find the full steps a little further down.

The system is quite simple:
You setup a hosting server, accessible to both your computer and your phone (any web hosting service should be suitable), then you can drag&drop a file or folder into the toolbar button, or right click on it and pick the files that you want to send.

The server sends back a url to retrieve the upload, and that url is sent to the phone using the same method FoxToPhone normally sends links.

When the url arrives at the phone, it launches the browser with that URL, detects that it’s a file and starts the download.

Why isn’t it enabled?

Quite simply, Bandwith and Privacy.

There are already lots of people (over 20,000) using this extension, if just a few of them try to send a few hundred Kb or some Mb files, then our servers will go over quota with our hosting provider, so we need to find a proper hosting before everybody can use it. As we have built this extension as our hobby, we cannot afford the potentially massive bandwidth.

And privacy: even if the files are automatically deleted, they are sent through an external server, so people might expect some privacy about the data that they send so we are not going to enable it until we can be sure that everything is OK in that aspect.

Let me enable it for myself!

Ok, here we go. You can use any kind of server, the example script is done in PHP, but you can easily adjust it to any other server language. Remember this is an open source project, and if you do implement a version of this script in another language we only ask that you reference us. However it would be great if you choose to provide it back to the community too.

Save this code as foxtophone.php on your webserver:

<?php
// Folder to store the files
// Adjust it to your server
$filesFolder =  '/home/ ... /files/';

if ($_SERVER['REQUEST_METHOD'] == 'GET'){
 if (isset($_GET['name']) && isset($_GET['type']) && isset($_GET['data']) )
 {
 $fileName = $_GET['name'];
 $mime =  $_GET['type'];
 $data =  $_GET['data'];
 // Safety check
 $data = preg_replace('/[^\dA-F]/i', '', $data);
 }
 else
 {
 echo 'Invalid request';
 exit(1);
 }

 $file = $filesFolder.$data;
//echo $file;

 if (!file_exists($file) || !is_file($file))
 {
 echo 'Invalid file';
 exit(1);
 }

ob_end_clean();
header('Connection: close');
header('Content-Encoding: none');
ob_start();

 header('Content-Type: '.$mime);
 header('Content-Length: '.filesize($file));
 header('Content-Disposition: attachment; filename="'.str_replace('"', '', $fileName).'"');
 // Flush buffers
 while (@ob_end_flush());

 // Send the file
 $fp = fopen($file,'r') ;
 while (! feof($fp)) {
 $buff = fread($fp,4096);
 print $buff;
 }
 fclose($fp);

 // Send the data and flush buffers
 while (@ob_end_flush());
flush();
ob_end_clean();    

 // Delete it and exit
 // The phone makes two requests with GET, they both seem identical, and if we delete the file
 // on the first access then the real download will fail if it's a small file
 // Have to file a bug about this.
 // Let's wait a little so the second request starts and the file is sent there
 sleep(30);

 unlink($file);

 exit();
}

if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
 if (isset($_FILES['upload']))
 {
 $file = $_FILES['upload'];

 // Be careful about all the data that it's sent!!!
 // Check that the user is authenticated, that the file isn't too big,
 // that it matches the kind of allowed resources...
 $name = $file['name'];
 $mime = $file['type'];

 // create a unique filename based on IP and real filename
 $data = md5($_SERVER['REMOTE_ADDR'] . $name . date('H:i:s'));

 $sFilePath = $filesFolder.$data;

 move_uploaded_file( $file['tmp_name'], $sFilePath ) ;

 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes"?>';

 echo '<result>';
 echo '<upload>';
 // Url to retrieve the uploaded file.
 echo curPageURL().'?data='.$data.'&amp;type='.urlencode($mime).'&amp;name='.urlencode($name);
 echo '</upload>';
 echo '</result>';
 }
 else
 die('No file has been sent');
}

// Get the current page url
function curPageURL() {
 $pageURL = 'http';
 if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
 $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
 $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}

?>

You have to put a proper path in  $filesFolder to a folder in the server where you have set write permissions in order to store the files.

Now in Firefox type “about:config” into the address bar and press enter. Edit the preference “extensions.sendtophone.fileServerUrl”, putting there the url (something like http://192.168.0.5/foxtophone.php or http://yourdomain.com/foxtophone.php, remember that if you try to use “localhost” the phone will look at itself and not your server).

And you’re ready to go.

Open the context menu of the toolbar and you’ll find two new entries to send files or folder, pick something and it will be sent to your phone.

Please, don’t be harsh on the PHP coding style, I can count with the fingers of my hands the number of PHP pages that I’ve ever written and remember that this is just experimental stuff that isn’t enabled by default.

If you want to repost something about this feature, please keep in mind that this is not meant for the average user, they don’t have a web server at hand so publishing this as an announcement for everyone can lead to confusion because they can’t make it work. We will try to find  a simple and secure file hosting solution for everyone and we would love to hear your suggestions about it.

 
 

FoxToPhone 1.1 now is pending approval

17 Aug

The new version of FoxToPhone has been sent to the Mozilla Add-Ons (AMO) site for approval, this means that about a week from now the Mozilla admins will review it and hopefully it will be approved without further delay and about three days after that, around 80% of the user base will be using it.

Summary

This version makes official the name change from SendToPhone to FoxToPhone as well as the new logo with the fox in the background.

Besides some bugfixes around little problems reported by the users, and other ones detected in our test through all the days since the last release, there are a few changes worth mentioning:

Detection of QR images

Most of the QR images on the internet are generated using the Google Charts API, and sometimes you might not have the phone at hand, or worst, its camera is broken (a common issue with early Froyo ROM’s on older handsets).

With this new feature you can right click on any such image and you’ll have the option to send the decoded data directly to your phone. What’s more, if there’s only one such image in the page and you click the toolbar button, the image will be detected and you can send it that way.

Many Android app review sites already provide QR images, now those that don’t have an extra reason to do so. Coupled with FoxToPhone’s handling of market:// links, its easier than ever for site’s to bridge the gap between their site’s on the desktop and their readers handsets simply by placing a single QR image in their page that links to the app in the market and so the user just has to click the toolbar button to perform the market search in his phone.

Drag & Drop

Now it’s possible to Drag&Drop text or links directly to the toolbar button and they will be sent to your phone. It should work even while dragging from other applications as long as they provide the data in one of the supported formats (plain text or urls)

From clipboard to clipboard

The context menu of the toolbar button now includes a new entry to send the content of your PC clipboard. Hint: if you want to send any text to the clipboard in your phone you can type it in the Firefox Search field, copy that and then use this option to send it.

Bye to mms:

In the 1.0 version we added support for detecting several protocols related to Android and phones like market://, tel:, smsto:, mms:  but just before releasing we realized that although some people did indeed suggest to use mms: for linking to the MMS system in phones, the reality is that mms: is already in use by the Microsoft Media Server protocol, so it isn’t realistic to expect it being used for mobile use.

Then we decided to disable it by default, but after a little more thought we have decided that even disabling it by default might not be enough because some users might want to experiment and enable it, then forget about that setting and latter will become angry when they find that a radio station has stopped working and blame it on us.

So in this version we have removed altogether the preference and related code, the reality is that I haven’t ever seen a mms: or mmsto: link pointing to a mobile number.

What’s next

That’s all for today. There’s one extra feature but it requires its own post with full explanation about how it works, what we have in mind and how you can enable it, but we will talk about it another day.

Meanwhile you can download and try the new version by upgrading manually to FoxToPhone 1.1 , and please report any problem that you find (let’s hope that there aren’t any :-)

Also, you might be interested in helping us with the translations at BabelZilla.

 
 

FoxToPhone, the new name for SendToPhone

12 Aug

The popular Firefox extension that enables users to take advantage of Google Android’s ChromeToPhone feature has renamed itself.

The extension formerly know as SendToPhone, will now be known as FoxToPhone.

After months of development, the community build extension, Send To Phone has been re-branded Fox To Phone. The developers have worked closely with the Google sponsored Chrome To Phone project, to build an extension that is 100% compatible with ChromeToPhone app available from today from the Android Market.

ChromeToPhone is a service for Google Chrome that takes the current page being viewed on a desktop and sends it to the users paired Android device. It was first demoed at he the Google I/O confrence in San Fransisco in May 2010, as part of the presentation announcing Android 2.2 (a.k.a. Froyo). The service comes in two parts, firstly an extension for Google Chrome to send the link, and secondly an app for the Android device to open the link once received. FoxToPhone works with the same Android app and enables users to use the service with Firefox, just like they can with Chrome. As over 30% of users worldwide user Firefox, it has been downloaded over 35,000 times and has proven very popular with users who favor the Android & Firefox combination.

FoxToPhone takes advantage of the Mozilla platform’s API’s to deliver additional features:
- Send current page with address bar button
- Right-click on any link/image/page to send it.
- Highlight any text and right click to send to the clipboard in your phone
- Automatically send market://, sms://, tel:// links to the Android device where the launch the relevant app

The open source project started in May after of two developers, one Spanish and the other Irish, joined two competing implementations of ChromeToPhone for the Mozilla platform. With further enhancements currently under development, ChromeToPhone and FoxToPhone are set to a must have feature for smartphone users.

FoxToPhone is available for Firefox 3.0+ on all platforms (including GNU/Linux, BSD, Solaris, Mac and Windows) from http://addons.mozilla.org or http://www.foxtophone.com
ChromeToPhone for Android is available from the Android Market