How to detect message threads using JavaMail on Android? - java

I'm writing an email client for Android using the javamail-android library. I would like to detect Gmail threads to be able to display all messages from one thread together. I'd rather not download all messages in the inbox folder though. What I want is to display only recent messages/threads. How can I do it and do I have to use external libraries for this?
I managed to find java-gmail-imap which seems to be doing what I want. Does anyone have any experience with it and/or can suggest possible alternatives?

For Android, you can use my port here. I have used it for a project successfully, I just replaced the java dependencies with Harmony implementations and turn it in a Android library project to make sure one is not using anything that isn't supported. You can make a jar out of it (which I should :P ).

The latest JavaMail release includes support for all the Gmail IMAP protocol extensions, including the ThreadID, but I have no idea if it works on Android, which isn't real Java.

Related

Problems with accessing data from Google Calendar API

I want to get a users calendar events (entries) via the java google calendar API (V3.0). Unfortunately, I was unable to find any working example (tutorial) or successfully run anything. What I did so far:
I checked the APIs Explorer and successfully run some requests via the google website and my developer api key (conclusion: my API access works in theory).
I tried to follow the "Your first App"-guide. There are two ways to invoke the API: REST or client libraries. I want to use the java client library.
So I tried to set up the client library : downloaded the jars and added them to the build path (in eclipse) - as I usually do this with external jars. I now can import the classes without errors.
Here, the guide finishes abruptly if I want to use the java client library instead of directly accessing it via REST...
From here I have absolutely no idea what to do. I found a lot of examples in the web (usually for the v1.0 or v2.0 API), but was unable to run any of them. (On Google Developers I found several examples, but all for Android or AppEngine. Nothing worked...)
Does anyone of you know a very simple example to get a users events via Java library (Google Code API)?
solved it on my own. For all of you who want to start using the Google APIs in Eclipse. I highly recommend using Maven which immensely helps including the right jars (actually, it does it for you). Then try this example code (link) to start (OAuth2 authentication). You also will need a dev account and API key from google: link. Then you can start coding :) enjoy!

How to use Skype Java API inside android application?

I want to make one application that will monitor chat history of other IM in phone.
I couldn't find any Skype API for Android, although I found Skype4Java API from net. I wish to use this in an Android application. I have imported the .jar file of that API to my Java build path. When I run my code, I am getting errors for libskype.jnilib and libskype.so file.
I also can't delete that file also, because when I attempt to delete that I get an error. Please tell how to do that?
How can I use Skype's Java API inside an Android app?
As of the current writing of this answer, there is no Android implementation of Skype. There are numerous third-party chat APIs, although I personally can't name one since I haven't worked with any.
The reason why the Skype4Java API is throwing errors at you is because it was not designed for use with Android. To delete the .jar file, you must remove all references to it and remove it from your build path for attempting a delete.

Can an android application(client) communicate with a java web server using sockets?

I need an android application to communicate with a java web server using sockets, but can't seem to find any information regarding this. I have only been able to find information about java to java and android to android.
When I first tried doing this, I used the basic knock example taken from Lesson: All About Sockets, most likely written before the android OS existed, and adapted the server side to run on an android. That way I didn't have to make an user interface and could just focus on the communication. The code is here: EchoClient, KnockKnockServer, and KnockKnockClient.
The problems I initially ran into included:
Making sure that both sides knew which port to use.
Making sure I had set the permissions on the Android side to use the internet.
Making sure the client knew the ip of the server.
I posted my version of this code here. It worked one year, and then I had to fiddle with it again when I used it for my class this year. My students got it working, though. You'll get a security flag when you go to the site, since I don't want to pay for an officially registered certificate, but that is a rant for another day :-)
Here is an example how to use sockets in Android. With web server you should do the same. If you want to work with http protocol here is another link.

Where can I get to download Java comm api?

I want to write some programs using Java comm api. I am not able to find site/page from which I can download this API. Can anyone please tell me where can I get this API?
Basically I want to send SMS to mobile from PC. Mobile will connect to PC through USB cable. I would also like to know what are the possible ways to send SMS to mobile? (I am looking for option which wont incur me money)
Thanks in advance !
EDIT 1
I am not allowed to use third party APIs. It seems that Java comm API is dead now. So is there any other way to send messages to mobile from pc?
Download javax.comm api library from here : http://www.java2s.com/Code/Jar/c/Downloadcomm20jar.htm
In my opinion, the best alternative to javax.comm is rxtx.
Sending SMS over Serial Connection
For sending sms over serial connection you have to use AT command.
Here are some examples on other languages (but the concept is same).
http://linux-101.org/script/python-code-sending-sms-messages-usb-connected-mobile-phone
http://www.developershome.com/sms/howToSendSMSFromPC.asp
http://www.codeproject.com/KB/vb/AT_commands.aspx
I'd suggest you to test the commands on app like hyperterminal( alternative for win 7 : http://helpdeskgeek.com/windows-7/windows-7-hyperterminal/) first.
I would recommend RXTX. It doesn't use the javax.comm package, but it follows the same API, with a little extra.
If this is still relevant for you (maybe others, though);
Serialio.com are the true experts on serial communication. They have an excellent package (SerialPort) which I have used since 1997, and never given me any problems, and since then they have added support for Java Comm API as well as an endless number of platforms.
It might be an older version, but MIT hosts a copy of javaxcomm.zip here.
Try this source at oracle.com:
Misc. Java SE Tools and Libraries Downloads

Facebook API and Facebook Connect using Java?

New to Facebook API and Facebook Connect.
Found the Facebook Java API open source library on Google Code...
I am really excited that there's an API pre-written in Java for it!
Am interested in writing a server side Java layer which uses REST to be able to access a user’s Facebook Friends List, their wall, send them messages in-network, etc.
Downloaded the binary and unfortunately, I haven't found any sample or demo code when I unzipped it...
Question(s):
(1) Does this library support Facebook Connect?
(2) What is the best way to get start using Facebook Connect with server side Java?
(3) Since I am building middleware, do I still have to create a sample app on the online Facebook Developer page?
(4) What should I include in my (am a newbie in Maven) pom.xml in order to get started?
Use RestFB, that seems to be the inofficial FB Java Api:
http://restfb.com/
(There is no official FB Java Api anymore)
As far as I know, that library is broken. I couldn't get authentication to work with the latest version.
In my search for alternatives i found the "TinyFBTagLibrary" http://www.socialjava.com/ --
Yes, it requires just about a billion extra libraries to run, but it offers a simple way to execute facebook API calls in java that ISNT BROKEN (once again, as far as I know). My advice is to ignore all of the predefined tags for use in jsp and scroll down to the bottom to see how to use the TinyFBClient.call/getResponse when you need to get information.

Categories

Resources