xSellize: Gmail + push on iPhone w/ Prowl - xSellize

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Gmail + push on iPhone w/ Prowl

#1 User is offline   crimsontwo 

  • Jailbroken
  • PipPipPipPipPip
  • Group: Members
  • Posts: 87
  • Joined: 14-August 08

Posted 22 July 2009 - 10:50 PM

Since Gmail does not support push (yet), I came with the following workaround:

1) Get Prowl from App Store and register with http://prowl.weks.net/

2) Once you register and log in, go to SETTINGS on the web site and generate your unique API code

3) Install Python, Mobile Terminal and Screen from Cydia

4) Download the necessary Python scripts: http://www.sendspace.com/file/naomvg

(alternatively, you can follow instructions from http://forums.cocoaf...hp?f=45&t=20355 and get all the scripts from there. I am just providing my assembled collection for ease of use)

5) Edit the "main.py" script and specify your API code + Gmail username/password

6) Copy those scripts to your iPhone

7) Run Mobile Terminal from iPhone, run "screen" (just so that you can run the script in the background when you exit Mobile Terminal) and type "python scriptname".

8) That's it. You can now detach from Screen (CTRL+A+D) and exit Mobile Terminal. To go back and reload your Screen session, type "screen -r"

Your iphone is now constantly connected to Gmail. It does not use any bandwidth and simply idles until new mail is received. It then sends a message to the Prowl server which pushes it to your iPhone. You get a nice notification from the Prowl client.

If you have a dedicated linux server running somewhere, you can just execute those scripts from there instead of your iPhone.

It usually notifies me within 3-7 seconds of receiving a new message.

Cheers!

P.S. There is one caveat: if your connection changes from one network to another (say, you were on 3G and are now on Edge or Wi-Fi, the script will lose connection to Gmail and you will have to re-run it again. perhaps those who know python can fix it)

P.S.S. Sending notification to Prowl to be pushed to your iPhone is rather, uhm, odd way of doing it (but is much better than forwarding your Gmail to a web-based servers that support push, such as Yahoo). Now that there is a Grip client for iPhone, perhaps someone can make it so that messages are sent to Grip instead of Prowl.

This post has been edited by crimsontwo: 23 July 2009 - 01:50 AM
Reason for edit: Updated instructions

4

#2 User is offline   evantheking 

  • Senior Member
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 182
  • Joined: 11-March 09

Posted 22 July 2009 - 11:22 PM

is this too complicated ? or its just me
0

#3 User is offline   dimmi1975 

  • Donator
  • PipPip
  • Group: Contributor
  • Posts: 14
  • Joined: 16-November 08

Posted 23 July 2009 - 12:30 AM

Could you explain a bit more the part with the scripts and do you need to be on line in order to work?
0

#4 User is offline   crimsontwo 

  • Jailbroken
  • PipPipPipPipPip
  • Group: Members
  • Posts: 87
  • Joined: 14-August 08

Posted 23 July 2009 - 01:42 AM

dimmi1975 said:

Could you explain a bit more the part with the scripts and do you need to be on line in order to work?


Well, you need to be connected through Edge/3G or Wi-Fi. I've updated my instructions and you can now download my set of scripts. This whole method is very simple.

This post has been edited by crimsontwo: 23 July 2009 - 01:48 AM

0

#5 User is offline   fusen 

  • Magic
  • PipPipPipPipPipPipPip
  • Group: Contributor
  • Posts: 492
  • Joined: 27-November 08

Posted 23 July 2009 - 01:59 AM

much wiser to run the script on a proper server than the phone itself.

Also, if you install grip then the notification won't be the retarded blue center popup. You can't currently actually use grip to receive a notification tho from an outside source.

nice workaround though.
0

#6 User is offline   jendol 

  • Senior Member
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 268
  • Joined: 29-January 09

Posted 23 July 2009 - 06:40 AM

seem like this one is for the techie, I better wait for GPush which is already in the appstore approval process for now
0

#7 User is offline   IvoP123 

  • Whats an iPhone
  • PipPip
  • Group: Members
  • Posts: 18
  • Joined: 05-March 09

Posted 23 July 2009 - 12:51 PM

i believe msgpush is much better :

http://www.xsellize....highlight=gpush
0

#8 User is offline   crimsontwo 

  • Jailbroken
  • PipPipPipPipPip
  • Group: Members
  • Posts: 87
  • Joined: 14-August 08

Posted 23 July 2009 - 02:20 PM

IvoP123 said:

i believe msgpush is much better :

http://www.xsellize....highlight=gpush


It is much better if you totally don't care about security. I, for instance, will not trust any third-party service with my Gmail account password, nor will I forward my e-mails to another service provider. These are ABCs of basic security/privacy measures.

---------- Post added at 02:20 PM ---------- Previous post was at 02:11 PM ----------

jendol said:

seem like this one is for the techie, I better wait for GPush which is already in the appstore approval process for now


GPush is not made by Google. Here is the company's web site: http://www.tiveriasapps.com/

Basically, it uses the same IMAP IDLE method that is described in my tutorial but they execute it on their servers. Would trust them with your Google mail password? I wouldn't :) Until Google comes up with Push, you will always have to rely on a third-party provider.

One way to safeguard yourself against the theft of your Google account is by creating another Gmail account and forwarding your mail to it. Then you can use GPush and similar applications to access that particular account without worrying that your main account will be compromised. Obviously, everyone will be able to gain access to your e-mails if they wanted to, but if you erase them once a week (or whenever), it will reduce the chances of your mail ending up in others' hands.

This is the method that I use when traveling. How do you know that in some Internet Cafe they don't have a keylogger installed or that their network is not sniffed? You don't, and you shouldn't rely on one's honesty.
0

#9 User is offline   supershick 

  • Whats an iPhone
  • PipPipPip
  • Group: Members
  • Posts: 48
  • Joined: 12-October 08

Posted 27 July 2009 - 07:17 PM

which folder do you copy the files to on the phone? any folder will do and just execute the script?

---------- Post added at 12:17 PM ---------- Previous post was at 11:53 AM ----------

ok i just tried this and it works =) you don't actually get the red notifications over your email icon (obviously) but prowl does push notifications over to you letting you know you have new messages. once you get pushed, you just go fetch it yourself.

i put the "gmail_and_prowl" folder in "/var/mobile" and just ran the script from there. For those who got confused, the code is "main.py". That's the "scriptname" that crimsontwo was talking about. I had a brain fart for a sec and actually typed "python scriptname" haha.

overall it works well. the fact that you gotta replay your screen session if you switch connections is kinda cumbersome. if you're leaving work and driving on the road, you might forget or something and then you won't get notifications.
0

#10 User is offline   Nintendotoad 

  • TO
  • PipPipPipPipPipPipPip
  • Group: Contributor
  • Posts: 399
  • Joined: 24-March 09

Posted 27 July 2009 - 10:54 PM

I would just find the elert debian and update it using RockApp
0

#11 User is offline   TxRx 

  • Whats an iPhone
  • PipPipPip
  • Group: Members
  • Posts: 41
  • Joined: 04-December 08

Posted 27 July 2009 - 11:28 PM

I might be missing something major here, but there is a MUCH easier way to set up push Gmail with Prowl. Lifehacker covered it here.

Basically, you set up Growl and Prowl, then just get the Gmail Growl plugin. Done! I can't speak for the Mac version, but the Windows version doesn't store any of your login information, so it is safe and secure. Best of all, you don't have to figure out scripts to get it working.

Anyway, sorry if there was more to the conversation than that. I am tired and may have misunderstood.:oops:
0

#12 User is offline   crimsontwo 

  • Jailbroken
  • PipPipPipPipPip
  • Group: Members
  • Posts: 87
  • Joined: 14-August 08

Posted 28 July 2009 - 12:51 AM

TxRx said:

I might be missing something major here, but there is a MUCH easier way to set up push Gmail with Prowl. Lifehacker covered it here.

Basically, you set up Growl and Prowl, then just get the Gmail Growl plugin. Done! I can't speak for the Mac version, but the Windows version doesn't store any of your login information, so it is safe and secure. Best of all, you don't have to figure out scripts to get it working.

Anyway, sorry if there was more to the conversation than that. I am tired and may have misunderstood.:oops:


Deskop client requires you to have your desktop computer connected 24/7.
0

#13 User is offline   TxRx 

  • Whats an iPhone
  • PipPipPip
  • Group: Members
  • Posts: 41
  • Joined: 04-December 08

Posted 28 July 2009 - 12:58 AM

crimsontwo said:

Deskop client requires you to have your desktop computer connected 24/7.

I knew there must be something. I'll give it a try now.
0

#14 User is online   CannibalKidd 

  • Senior Member
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 140
  • Joined: 31-July 08

Posted 28 July 2009 - 01:18 AM

For the time being this seems like a good option. Dont know why google is taking so long to initiate push for iphones
Posted Image
0

#15 User is offline   TxRx 

  • Whats an iPhone
  • PipPipPip
  • Group: Members
  • Posts: 41
  • Joined: 04-December 08

Posted 28 July 2009 - 01:32 AM

"8) That's it. You can now detach from Screen (CTRL+A+D) and exit Mobile Terminal. To go back and reload your Screen session, type "screen -r""

Okay, I need a bit of explanation on how to do a CTRL+A+D from Mobile Terminal. Would I literally type "CTRL+A+D" or would I do "^AD" or what? Sorry for the n00b question, but I haven't used mobile terminal much.

---------- Post added at 07:32 PM ---------- Previous post was at 07:29 PM ----------

CannibalKidd said:

For the time being this seems like a good option. Dont know why google is taking so long to initiate push for iphones

I swear on everything holy that Apple purposely holds back features just so that it can consistently roll out new stuff to keep the fanboys drooling. There is not a single good reason to keep Gmail push from working (or from approving Gpush). They really piss me off that way.:~

So I got it working and I love it. The desktop client had been acting up anyway, so this is perfect. I'm still not sure I've got the whole Screen part of it down, so I may run into problems when I leave my home wifi network.
0

#16 User is offline   borealiszio 

  • Zio
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 577
  • Joined: 13-May 09

Posted 28 July 2009 - 04:30 AM

txrx to ur question ctrl A=D means press control and a+d(on they keyboard) at the same time
Posted Image
Thanks My wife for the Signature that she did for me Muackzzz :hugs:
Hit the thanks button if u find my reply/thread useful. Thanks too :hooray:
0

#17 User is offline   TxRx 

  • Whats an iPhone
  • PipPipPip
  • Group: Members
  • Posts: 41
  • Joined: 04-December 08

Posted 28 July 2009 - 06:50 AM

borealiszio said:

txrx to ur question ctrl A=D means press control and a+d(on they keyboard) at the same time


There's a ctrl button on the iPhone keyboard? Damn, I really am missing something!

Anyway, I figured it out. Google is my friend. I had no idea there was so much to mobile terminal. Did you all know that it has 4 bash instances available simultaneously right out of the box? I haven't even needed to use Screen.

I do need to get a server, though. Would make my life so much better.
0

#18 User is offline   crimsontwo 

  • Jailbroken
  • PipPipPipPipPip
  • Group: Members
  • Posts: 87
  • Joined: 14-August 08

Posted 28 July 2009 - 01:37 PM

TxRx said:

There's a ctrl button on the iPhone keyboard? Damn, I really am missing something!

Anyway, I figured it out. Google is my friend. I had no idea there was so much to mobile terminal. Did you all know that it has 4 bash instances available simultaneously right out of the box? I haven't even needed to use Screen.

I do need to get a server, though. Would make my life so much better.


As much as I hate reading help/manuals, for some apps like Mobile Terminal, it's worth it :) Yes, there are a couple of instances of terminal sessions. You can also configure your own shortcuts/etc.

CTRL is a swipe from center to bottom right corner ("\" move). The cursor changes red. You then press A, the cursor changes yellow, and you press D. By now though you've figured this out already.

Running this on a dedicated server is what I do since I switch from 3G to Edge to Wi-Fi quite frequently and it's a pain to have to re-run the script my phone.
0

#19 User is offline   bernardlychan 

  • BANNED
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 319
  • Joined: 07-July 09

Posted 04 August 2009 - 07:51 AM

an alternative is Grip push notifications.
Posted Image
0

#20 User is offline   mountaindew 

  • Whats an iPhone
  • PipPip
  • Group: Members
  • Posts: 14
  • Joined: 28-July 09

Posted 04 August 2009 - 02:27 PM

so do you have to do the terminal command everytime you reboot your iPhone?
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users