Is good to use custom server app? - Java for Android App Development

I have planned to develop a app like PushBullet.
On server side,i planned to use custom server app written in java to accept connection from client using socket.
About server app,im going to upload it to VPS and run it.
Is this good idea?

Related

directpush protocol questions (exchange replacement possible?)

I am using mail2web free service to have my mail pushed to my WM5 device, but I don't like the idea of forwarding my private email to a company I don't know and I don't trust.
Normally I have my email at a home mail server running linux, and I was wondering if there's any open/free solution compatible with directpush technology to replace the need for an exchange 2003 server.
If it does not exist (i have been searching and couldn't find it), what is preventing someone of writing a free replacement? patent issues? authentication issues? I haven't sniffed the protocol yet, but I think it's impossible that no one has thought about it before... wouldn't you like to have your home imap server pushing your inbox to your PocketPC phone? If the protocol is not very obscure it should be easy to write a daemon that does it...
any thoughts or experiences?
Kerio Mail Server has the push compatibility.
Not free though, but it is an alternative to Exchange.
Their latest beta supports it. I reported a bug to them re: contacts getting corrupted but they say they fixed that in the latest build.
Can't retest now since that server is at another site I won't be visiting for a while.
Hmm the directpush "protocol" is pretty trivial it shouldn't be impossible to implement an open alternative.
I installed the latest Kerio MailServer yesterday. It works great!
Especially nice is that it runs on XP as well as Linux. Too bad about the price!
pof, have you had the chance to sniff the protocol?
not yet ivorh, been too busy with many other things, but this is still on the queue
sniffed
Heh, got bored so I setup an exchange account and sniffed the packets.
I'll go through them and post some details when I get a chance.
great ivorh!
Can you attach a capture in pcap format?
update and thoughts
Pof,
Hmm, ok a bit more thinking and digging and I'm not sure implementing an open alternative directly is that useful. Let me explain why:
The direct push only works with the outlook exchange active sync. When the device gets a "direct push" byte, it triggers a sync with exchange - the functionality is tightly bound together, and as far as I can tell you cant dip in and get it to do something else. So to get it working you would need a server providing the exchange http interface. This wouldn't be impossible but would need a lot of effort for little benefit.
I took a look at the open-exchange but that doesn't seem like an ideal solution since it would require a completely different server installed rather than IMAP or POP and as far as I can tell the Outlook connector isn't one of the open-source components anyway.
Now what I'm currently thinking would be a neat workaround would be to implement a custom "direct-push" to basically do exactly the same, have a client app on the device open an http connection to a server running, er, "OpenPush" if you like... use exactly the same technique of a keep-alive connection and occasional heartbeats, but on a message notification on the client get the client to trigger an IMAP pull.
Now this is where I need some advice.... I haven't done any Windows Mobile development yet, so can anyone tell me what sort of API is available to the messaging app? Can you/how do you trigger a mail pull? (oh someone please tell me it's not the same horrible old MAPI interface??).
PS I've just been capturing the data using a simple http proxy actually, I'll make some samples and upload them with descriptions.
Cheers,
Ivor.
http://www.ivor.it
Hi pof,
try funambol. It was formerly known as Sync4j. I once found it when I searched a complete sync solution that I could implement in the mailserver of my company. We are using kolab so I only tried the old Sync4j cause there is a kolab connector available for v2.3.
v3.0 implements (real) Push-Mail. Microsoft Active Push works with a http connection that is opened by the client. Funambol Push-Mail connects to a port the client opens. I didn't want to test any further cause I'm using a Wapflat and thus only get an internal IP and have to use a proxy.
http://www.funambol.com/opensource/
Perhaps this is what you are searching for
What I forgot to say: For funambol you install a java program on your phone wich will insert the received mails in your Pocket Outlook
Yay!
Pof,
Ha! Ok I've whipped up a version 0.0.0 of OpenPush. and it works rather nicely!
Basically it consists of two parts one is an app that runs on the mobile and operates in the same manner as DirectPush. It opens up a socket connection to the server and waits for a notification byte. If it recieves a byte it kicks off a mail retrieval.
The other is a daemon that runs on the server and watches for a change in the users mailbox if it changes (i.e. a mail has arrived) then it pops a byte down the socket.
It just needs finishing now...
Currently the daemon is just an app that listens on a dedicated socket. I plan on turning it into a mod_perl module and using http keep-alive in the same fashion as directpush.
Regards,
Ivor
ivorh, that sounds cool!!
I had a look at funambol but seems too 'bloated' for my needs, I think your OpenPush will be more tight to what I was looking for, so if you want a beta tester just send a link to it
Is there any specific server configuration? I am running a Gentoo server with courier-imap, sendmail and apache2.
Any chance you could extend the daemon so other programs can tie into your new-item notification? It would be cool to write a program that can keep files synchronized over-the-air with a desktop machine using push sychronization.
Pof,
Yeah it's just a prototype at the moment. So I need to write it properly next. At the moment the requirements are simply "perl". It's independent of mail system, it simply monitors a directory/file you give it for changes.
I'm going to write it to be a mod_perl module for various reasons, so the requirements will be just apache and mod_perl.
I'll hack some more tonight and try and get a 0.0.1 ready.
aatreya,
Well I'll keep it simple for now and just doing one job well.
Sound interesting to me.
I am new to this. Pardon me for some questions.
Do I need to buy a server at home?
This server can be any OS?
I am really happy to see some people trying to do just about the same I intended to. Today I started experimenting with Open-Xchange. I also have a Gentoo server that provides an ebuild for Open-Xchange, but after a bit of browsing it just seems like the thing MS Exchange and OX have in common is the similarity of their names. So installing OX and doing all the Exchange stuff with it does not seem to be an option.
So I looked into Funambol - sort of again. About a year ago I already tried to get Sync4J running to sync my SyncML phone. I did not succeed, but that just makes me eager to try it harder this time.
I also have to use a Proxy-Server for my GPRS connection but I want to have it working via WLAN, too, hence without proxy and the whole tunneling disco.
PS: Ivor, I am glad to meet You once again. When our roads crossed the last time, You just figured out how to get the CLE266 MPEG2 stuff working, respect!
A very rough pre-alpha version should be ready this weekend. I can only apologise in advance for the quality of my WM5 app!
But it's "working for me".
CWKJ,
At the moment the "server" is a simply perl app that watches for changes to a directory or file so its pretty portable. I run it on linux since that's what my mailserver is on.
As for needing a server at home... well its entirely up to you, really you want the server running wherever your mail is retrieved from.
If the app/system gets a bit more polished and advanced you might even find independent ISP's willing to add it as a service.
rabinath,
Heh! Small world.
I'd also like to be considered for Beta testing when available,
I run Ubuntu 5.10 Server at home, hosting 5 domains for myself, and would Love to not have to forward them through mail2web anymore as I don't like to reply because it will go through Mail2Web. I know I can create a separate "account" in Pocket Outlook but you can only have 5. I need more than that...
with direct push over the o2 wap proxy all https conections are closed after 2 min. this is becausse all 2 minutes a new sync is needed. This eats much battery. So why is it nnot possible to mak e a ppc client that just sends the current ip adsress to the client on the server. and the server just push the email to the known ip adress. The client on ppc just has to send a new ip in case it changes. this wouldt be much better for battery life.
Thats the reason Exchange-Activesync works the way that it does. The server sends out a text message that is handled at the system level on the PPC, and this is basically an instruction to sync with the server. No unneeded traffic just to check if there is anything new.
Most Celllar service providers are using NAT technology so reporting your IP address to a server and telling it to make a connection to that IP, would just be telling the server to connect to the "gateway" back into the Cellular network. A text message sent to what is called the "SMTP Gateway" for each service provider will get to the phone no matter if the phones IP changes.

vpn compatible apps

the remote desktop client on my vario ii connects to my work desktop perfectly using our office vpn but it is rubbish! the screen doesn't scale well at all or provide any kind of zoom out function.
I have a vnc client which performs much better but it won't connect over the vpn it only works when connected directly to the office network.
forwarding ports is out of the question. so my question is this.
is there a vnc client for pocket pc which will work over vpn or is there a way to make the remote desktop client less rubbish
also are there any apps out there that will let me browse my work network over the vpn. resco doesn't seem to be able to do it even the ftp client won't work.
am I missing something about vpn connections as it seems the only two apps that work over one are activesync and the remote desktop client.
Did you tried to acces domain controler throught the VPN? If yes it is normal that it doesn't work; Domain controler require security enhancement in auth that pocket devices cannot deliver yet. The only way I know is to reduce the security enhancement by using the GPO on the concerned servers; but this is far of being a clean fix.
Just trying to use connect to a vnc server on my workstation. btw our domain controller is the exchange server and active sync works fine
Active sync & exchange do not use the integrate authentification & kerberos; it uses a plain text auth (crypted with the SSL certs), that's why it works. Even if you are on the LAN you will not be able to access your domain's controller shares because of security enhancement.
This is far from solving your issue; but I just wanted to make it clear. Concerning your issue I can't help you at the moment, I still didnt tried the VPN & advanced networking.
btw, good luck
I have set up a vpn on my home computer, no domain, and can't access shares or a vnc server on that either.
Hi Stemill, I seen your other post about the vpn issues with Resco also, I have heard in the past about vpn issues using the [email protected], are you using [email protected] or [email protected]?
I use the terminal/remote client on a daily basis, and it does blow, vj on the board here has made an app that allows fullscreen with the terminal client, and theres a Mocha remote desktop client that supports scaling but no fullscreen, both of which have their own quirks. The scaling makes the text impossible to read when its even at 25%
I have been working on connecting to the remote desktop on mac with vnc, and I've gotten as far as an error on authentification, so I know its possible outside of a home network, but I don't have a clue about buisness situations..exchange or vpn's.
I not even 100% positive about the wap issue, I just seem to remember reading something about it in the past.
Sorry I wasn't of much help, also I kind of have a question for you, I see you mention activesync, you're not activesyncing over an internet connection are you?, I'm working on installing apps that I don't have a .cab for over an internet connection, but the best route I had figured out was to install to a ftp share and then grab the .cab from there with Resco.
Best of luck to you.
Hi there.
I'm on t-mob in the uk. They have a 3g network with full internet access so i'm not using wap at all.
Thanks for the tips about the remote client tweaks. Do you have a link?
I'm using activesync to connect to my works exchange server to sync email and calendar. Pretty sure its not possible to sync over the air to a pc without using exchange. You certainly won't be able to grab remote files via activesync.
If we could figure out how to get apps to work over vpn you could set one up on your pc and (theoretically at least) browse its contents using resco without having to bother with ftp.
If it's not possible to get stuff working over the vpn then you've probably found the best solution already. use ftp or setup a webserver on your pc and host the cab files on that. pocket ie seems to let you install cab files directly from a link.
btw which vnc client are you using on your phone?
Hi, I forget a lot of the time that people here have so many different carriers, sorry.
Here's the link to vj's terminal addon app
http://www.vijay555.com/?Releases:VJFullscreenTSC
And here's the link to the Mocha remote client app
http://www.mochasoft.dk/rd.htm
I used .Net vnc when I was able to get the authentification error
http://www.freewareppc.com/docs/netvncviewer.shtml
I think my problem on the authentification was with the apple remote desktop itself, I read about somethin in the authentification being non standard and sometimes the free vnc viewers don't work..but that was also pc to pc related, the same makers of the Mocha remote desktop also make a vnc client..that was gonna be my next try, I just haven't gotten there yet.
I inistally set up my pc to be able to remote to it from my phone and access aol chatrooms..well mainly one I have hung out in for years, then realized if I set up a server, I could install apps that I couldn't find in .cab form over the net with it, I used to have windows server 2003 set up with IIS(webserver) and the streaming media services, I'm wondering now if the windows streaming media really works with the pocket windows media, and if I could even use it with my gprs/edge connection, I'm still waiting on 3G, suprisingly the remote desktop isn't too bad on gprs/edge.
I'm currently waiting to get a new hard drive before I can really get to work, I'm testing on an old messed up xp install, and half the time I can't even access "my computer" or open folders without it crashin explorer.

Sure to cause wrath: Reverse Engineering ActiveSync with Exchange server

Hello everyone!
As you can see by my profile, I'm a rather new member of the XDA-Dev community, and also a new owner of an HTC Tytn. I love it.
I also love open sourced or at least free software.
My problem is: I'd love to have push based e-mail feeding off of my plain old IMAP and/or POP account hosted wherever.
Of the two IMAP IDLE capable clients on WM6 (I'm using LVSW) both feel like a piece of **** along with an attached price tag. One of them was also last updated in early 2006.
I've been looking at WM Outlook and Exchange syncing. I'm thinking about implementing some sort of an interface that would provide Outlook style ActiveSync front end (hey, it's just WebDAV) to a simple IMAP/POP3 account in the background.
I'll probably start working on this just for the kicks anyway, but... would anyone else be interested in seeing/using something like this?
ivanstojic said:
Hello everyone!
As you can see by my profile, I'm a rather new member of the XDA-Dev community, and also a new owner of an HTC Tytn. I love it.
............
I'll probably start working on this just for the kicks anyway, but... would anyone else be interested in seeing/using something like this?
Click to expand...
Click to collapse
There is software called emoze. This relies on your desktop & outlook downloading the email then Emoze sends the data to you PDA over the cell network.
The way i think that would be good is you would need a software client running on your desktop that polls your POP3 server for new headers. When it gets one it sends your PDA a token telling it to go and d/l its pop.
Im thinking of writing one cause i want it to detect if its cradled. I only want my e-mails forwarded to my phone when its not cradeled.
Just some thoughts. But if its in c# ill be happy to try help where i can.
Shaun33 said:
There is software called emoze. This relies on your desktop & outlook downloading the email then Emoze sends the data to you PDA over the cell network.
Click to expand...
Click to collapse
First off, I'd like to avoid the whole using-the-desktop thing. The mails are accessible on the server, and can stay there until your desktop client picks them up. Ideally, you would use IMAP and just leave the mail on the server as long as you need it, thus having it both accessible from your desktop and your mobile client.
The approach I'm thinking of would emulate an Exchange server. You would configure this server the same way you configure outlook syncing with a real Exchange server on your phone - thus eliminating any need for development or hacking on the client side. Everyone would just be using their default messaging client installed on WM.
ivanstojic said:
First off, I'd like to avoid the whole using-the-desktop thing. The mails are accessible on the server, and can stay there until your desktop client picks them up. Ideally, you would use IMAP and just leave the mail on the server as long as you need it, thus having it both accessible from your desktop and your mobile client.
The approach I'm thinking of would emulate an Exchange server. You would configure this server the same way you configure outlook syncing with a real Exchange server on your phone - thus eliminating any need for development or hacking on the client side. Everyone would just be using their default messaging client installed on WM.
Click to expand...
Click to collapse
So from My understanding this is what we got.
Code:
~ Project ~
CLIENT | HACK'D | <-----> IMAP
A/Sync <---> | Server |
WM6 | APP We Write | <-----> POP3
That should be possible but the reason that your able to recieve it in two places is because the exchnage server is the mailbox essintally. And your desktop account is also attached to the exchange server(someone jump in if im wrong) this means that it knows when something is deleted on your desktop.
So we would have to emulate both the Device and Desktop exchange server functions.
Other way is to just put a wrapper around a popserver. So it will only send the emails to the desktop once, then keep the e-mails for the device.
eg
Code:
****Check POP3/IMAP server every x mins
New Email
D/L and Store
Ping PPC Client
PPC Downloads
Flaged as PPC received
Desktop POP3 checks pop wrapper
Because the exchange server has the builtin pop client you will never be able to get true e-mail unless you create a pop3/imap server that has the PPC ping functionality built into it, you will always have the **** step.
Just some thoughts ...
ivanstojic said:
First off, I'd like to avoid the whole using-the-desktop thing. The mails are accessible on the server, and can stay there until your desktop client picks them up. Ideally, you would use IMAP and just leave the mail on the server as long as you need it, thus having it both accessible from your desktop and your mobile client.
The approach I'm thinking of would emulate an Exchange server. You would configure this server the same way you configure outlook syncing with a real Exchange server on your phone - thus eliminating any need for development or hacking on the client side. Everyone would just be using their default messaging client installed on WM.
Click to expand...
Click to collapse
you dont need to 'hack' anything... is you look at the Microsoft Exchange 2007 SDK you can write your own libraries that get called on incoming mail etc... no hacking required... how do you think Blackberry Enterirpse Server and Goodlink Server work??
The whole idea is that I want nothing to do with Exchange in the software, except to emulate it's ActiveSync features and push e-mail. No SDK, no libraries, nada.
I don't have any problems polling the POP3 server every few minutes. With IMAP it's much easier considering that a lot of IMAP servers support IDLE.
Basically, the architecture would be exactly what Shaun33 described/drew in his post.
ivanstojic said:
The whole idea is that I want nothing to do with Exchange in the software, except to emulate it's ActiveSync features and push e-mail. No SDK, no libraries, nada.
I don't have any problems polling the POP3 server every few minutes. With IMAP it's much easier considering that a lot of IMAP servers support IDLE.
Basically, the architecture would be exactly what Shaun33 described/drew in his post.
Click to expand...
Click to collapse
Ok best idea is if you have the time.
1. Install Exxhange server and pair your PPC to it.
2. User packet monitoring software such as ethereal to monitor the data going back between the server and the client the best fun is going to be the fact that is SSL. But there is an option to disable the SSL then you monitor port 80.
If you post a capture file i would be willing to look into helping you develop it.
Shaun33 said:
Ok best idea is if you have the time.
1. Install Exxhange server and pair your PPC to it.
2. User packet monitoring software such as ethereal to monitor the data going back between the server and the client the best fun is going to be the fact that is SSL. But there is an option to disable the SSL then you monitor port 80.
If you post a capture file i would be willing to look into helping you develop it.
Click to expand...
Click to collapse
Ethereal isn't called Ethereal any more, you do know that? It's been known as Wireshark for a while now. Anyway, the protocol is (almost) standard WebDAV protocol with some strange extensions.
I'm working on getting clean dumps of various bits of functionality. Will report soon!
hi guys,
i got to know about one website which is provide push mail for pop3 account for free, i tested it on JASJAR and its working fine, you can try it here www.consilient.com may be it would be helpfull...
This certainly sounds interesting to me! Do you still think it is doable?
Sounds cool - like you said, it's all webdav oriented, and from IIS logs, getting the content is fairly easy to construct. You won't have to worry about matching up device IDs, etc, so you can ignore that and concentrate on the username with what verbs are being used (foldersync, sync, getestimate, etc)
One thing may get you is the initial connection - after configuring, it will check to see if theres a policy to set on the device after checking the user, not sure how activesync on the device will handle it if it can't get to that.
I always think its funny that MS decided to call this "push" technology, when its just the device constantly polling (probably just an xml change file, i seem to remember something like that)
Anyway, good luck

[Q] Setting up a VPN that my xoom can access.

I want to set up a VPN at home that my xoom can access. I tried a simple PPTP with dd-wrt but I can't seem to access or ping anything, even though it connects. I want to do this so I don't have to forward SSH, RDP, and other ports that expose my stuff to the outside world.
At home I am running a DD-WRT gateway with a linux server as well as a Windows Server 2008 VM behind the gateway, any could host the VPN service.
I don't need instructions on how to set up the VPN, but advice on what is compatible with android's built in VPN support.
Thanks in advance for any input.
Sent from my Xoom using XDA Premium App
The windows vpn service works fine for me
I was under the impression I needed to set up a domain to use the included windows VPN service, and I wasn't looking to set up a domain.
Is this an incorrect assumption?
Sent from my Xoom using XDA Premium App
Here's a link to getting OpenVPN working. Must admit it looks like it's not for everyone.
Salpula said:
I was under the impression I needed to set up a domain to use the included windows VPN service, and I wasn't looking to set up a domain.
Is this an incorrect assumption?
Sent from my Xoom using XDA Premium App
Click to expand...
Click to collapse
That was not necessary for me. If it is a requirement, it is specific to Windows Server edition
I have a Windows PPTP VPN that my Xoom can connect to. You do not need to set up a domain.
Unfortunately there is a bug in Android that makes it lose connection to the VPN after a few minutes/seconds.
See here:
http://code.google.com/p/android/issues/detail?id=4706
I just bypass androids native VPN and use Neo Router free. Available in the market. You just set up a Neo server on the computer you want to control and use the android app to open an encrypted connection to that computer. You can set up the app to forward any ports to the computer running the server. Works well. Right now im running splashtop remote and plex using it so i dont have to port forward the ports for those apps in my router.
Thanks for all the input. I am working on OpenVPN. I almost have it working (I already have my router set up for OpenVPN, just didn't know I could use it).

SSL

Hi, Regards!
I have the next scenario. I am working in a solution that envolve several development tools. We have two web services, the first of them was developed on Visual Studio 2008 using SOAP and the other was developed on Java using Restfull. To communicate my Android App wih SOAP web services i am using KSOAP packages, while to communicate with Restfull I am using the packages java.net.URL and java.net.URLConnection.
Both web servers that host web services will be converted to SSL servers using trust digital certificates issued by CAs. On NO SSL server I can use HTTP protocol while on SSL Server I must use HTTPS protocol. My question is: I must change my program to allow it to communicate with SSL web servers that host web services?
I thank yours commnts.
Regards!
As far as I know, with restfull and java.net.URL, you just have to change HTTP to HTTPS in url. I don't know about soap.
Sent from my LG-P760 using Tapatalk 4

Categories

Resources