Active Topics

 



Notices


Reply
Thread Tools
Posts: 23 | Thanked: 15 times | Joined on Mar 2010 @ Moscow
#1
Just seen the feature of pushing a page from chrome to Nexus and while it's not implemented very well, the whole idea I think is great.

It would be a major usecase for me if I could send page links between n900 and my PC. n900->PC is actually as important as PC->n900 for me.
I understand there is nothing like C2DM API in Maemo, but I guess something like this is quite easy to implement:
1) Click a button on your PC browser ("send to device") - gets current page's url and stores it somewhere on the web
2) Click a button on n900/launch an app/type something in console to retrieve the stored link and open it
3) Web browser on N900 opens the page you sent from PC

So the hardest thing I see here is to find something that can store a web link and can be easily accessed.
You can always email yourself this link or send it to some fake contact on facebook, but these solutions are not very usable. The better option I see is to find something like tinyurl that allows you to change redirect address of your personal link from a browser's toolbar and just have a bookmark on n900, however, don't know if such service actually exists.

Any suggestions?

EDIT: here's the solution I implemented myself

Last edited by little_beat; 2010-06-05 at 14:40. Reason: implemented!
 
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#2
I agree with this. I saw the push to android function, and was jealous. I have tried to send links between my computer and n900 before, and I always ended up either emailing them, manually typing them in, or trying to IM them to myself.

One other way to push links to the device would be using a ssh command, but I am not sure how to make a link open on the remote device using this. I haven't done any programming for maemo, but I may take a stab at making a program like this once finals are over.
 
Posts: 23 | Thanked: 15 times | Joined on Mar 2010 @ Moscow
#3
I'm investigating an approach I mentioned above and found service called snipurl that allows you to update short urls destinations using post requests. Simple bookmarklet should do the trick, so hopefully I will have some working solution tomorrow. Will share it in this topic.
 
Posts: 4,556 | Thanked: 1,624 times | Joined on Dec 2007
#4
I don't know if it's what your looking for..

But using Weave in Firefox (desktop/laptop) and connecting it to Fennec (with the Weave addon) allows you to have the same bookmarks and tabs open when you switch between the two.
__________________
Originally Posted by ysss View Post
They're maemo and MeeGo...

"Meamo!" sounds like what Zorro would say to catherine zeta jones... after she slaps him for looking at her dirtily...
 

The Following User Says Thank You to Laughing Man For This Useful Post:
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#5
I was playing around with this, and it looks like you could make an icon on the desktop that would open:
browser --url=http://www.url.com

to open the url. Then you just need to make a shortcut in the desktop browser that submits the correct url to snipurl.

The only issue is that the bookmarks windows also opens with the browser.
 
Posts: 23 | Thanked: 15 times | Joined on Mar 2010 @ Moscow
#6
Yes, Weave seems to take the aproach and implement it in a good way. The only issue is the browsers that are involved - I use chrome on PC and MicroB on N900.
As for the desktop icon - I'm not much concerned on this, a bookmark works pretty well.

Last edited by little_beat; 2010-06-04 at 09:21.
 
Posts: 23 | Thanked: 15 times | Joined on Mar 2010 @ Moscow
#7
This thread doesn't seem to gain much attention, but I'll post my solution to send-to-device feature anyway. Maybe someone finds this useful.

1) Go to snipurl.com and get an account. Remember your username (example "myUname")
2) Go to your account settings and find api key in the right settings pane. (example "blahblahblah")
3) Create a new snip with any destination and nick and passcode of your choice. (example nick "c2dmwannabe", passcode "123")
4) Create a bookmark on your n900 (or any other device) that points to http://cl.lk/c2dmwannabe-123 (pick any base url you like, then add snip nick, "-" symbol and your passcode. Verify that this bookmark takes you where it should.
5) if step 4 succeeded, go to http://subsimple.com/bookmarklets/jsbuilder.htm and fill in the following code:
Code:
javascript:
var uname = 'myUname';
var apikey = 'blahblahblah';
var snipnick = 'c2dmwannabe';
var snipPasscode = '123';
snipnick = encodeURIComponent(snipnick );
var httpReq;
if (typeof XMLHttpRequest != "undefined") {
  httpReq = new XMLHttpRequest();
}
else{
  try {
    httpReq = new ActiveXObject("Msxml2.XMLHTTP");
  }
  catch (e) {
    try {
      httpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch (E) {
      throw new Error("This browser does not support XMLHttpRequest.");
    }
  }
}
var posttext;
posttext = '';
posttext += 'sniplink=' + encodeURIComponent(document.URL) + '&';
posttext += 'snipnick='+ snipnick +'&';
posttext += 'snipuser='+ uname +'&';
posttext += 'snipapi='+ apikey +'&';
posttext += 'sniptitle=C2DMwannabe&';
posttext += 'snipowner=&';
posttext += 'snipformat=simple&';
posttext += 'snipaction=UPDATE&';
posttext += 'snipcurrentnick='+ snipnick +'&';
posttext += 'snipresetcount=&';
posttext += 'snippk='+ snipPasscode;
httpReq.open("POST", "http://snipurl.com/site/getsnip", false);
httpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpReq.send( posttext );
httpReq = null;
6) Change first 4 lines of code with your actual details
7) Press "Format" button and bookmark the link that you get below.
8) Now every time you click the bookmark you get while being on some page, it's url is sent to snurl, so the bookmark on n900 starts pointing to the very same page.

Enjoy!

Last edited by little_beat; 2010-06-05 at 14:56.
 
Posts: 11 | Thanked: 1 time | Joined on Oct 2009
#8
I've always used this web page for quick copy pasting: http://www.cl1p.net
Easy to use and add to favorites. eg. http://www.cl1p.net/maemo
 
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#9
The bookmark link is not updating the snipurl for me. Do I need to enable the api access in my settings or anything?
 
Posts: 23 | Thanked: 15 times | Joined on Mar 2010 @ Moscow
#10
Originally Posted by xur17 View Post
The bookmark link is not updating the snipurl for me. Do I need to enable the api access in my settings or anything?
Well, the instruction I provided seems quite detailed, don't know what might go wrong. Which browser are you using?

To troubleshoot, verify:
1) That you've got existing snurl in your account and that you can modify its destination manually
2) That destination modified manually is updated and can be retrieved on your mobile
3) That you filled all the details right in 4 strings here:
var uname = 'myUname';
var apikey = 'blahblahblah';
var snipnick = 'c2dmwannabe';
var snipPasscode = '123';

If that won't help, PM me your account details (may create a fake one if too much concerned of its safety) and bookmarklet url you're recieving from bookmarklet editor after following my instructions.
Unfortunately I didn't manage to get any code executed after the request is sent to snurl, so couldn't add response analysis, which makes troubleshooting somewhat complicated.
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:47.