Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Android
OpenYMSG API on android
Reza Mochamad Diannagara
Greenhorn
Posts: 11
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi,
is there anyone who have used OpenYMSG API on android.
i've tried to use that on a simple app, but when i run it, it'll show a dialog to "force close".
this is the code:
package com.simple.yahoo; import java.io.IOException; import org.openymsg.network.AccountLockedException; import org.openymsg.network.LoginRefusedException; import org.openymsg.network.Session; import org.openymsg.network.SessionState; import android.app.Activity; import android.os.Bundle; public class SimpleYahoo extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.login_screen); Session session = new Session(); try { session.login("anyuser","anypassword" ); } catch (AccountLockedException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (LoginRefusedException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } if (session!=null && session.getSessionStatus()== SessionState.LOGGED_ON) { try { session.sendBuzz("other"); session.sendMessage("other", "test"); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { session.logout(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }
is there any special treatment to this API?
thanks...
Michael Rivera
Ranch Hand
Posts: 140
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Try to check the DDMS and see the Logcat to find out what is happening
So many things to do so little time !!!
@greenrobotguy
myLinkedIn
Reza Mochamad Diannagara
Greenhorn
Posts: 11
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
this is the what i've got from the logcat:
06-22 10:00:11.073: DEBUG/AndroidRuntime(254): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 06-22 10:00:11.083: DEBUG/AndroidRuntime(254): CheckJNI is ON 06-22 10:00:11.214: DEBUG/AndroidRuntime(254): --- registering native functions --- 06-22 10:00:11.223: INFO/jdwp(254): received file descriptor 19 from ADB 06-22 10:00:11.904: DEBUG/PackageParser(52): Scanning package: /data/app/vmdl10083.tmp 06-22 10:00:12.303: DEBUG/dalvikvm(52): GC freed 11243 objects / 603096 bytes in 104ms 06-22 10:00:12.644: WARN/PackageManager(52): Attempt to re-install com.simple.yahoo without first uninstalling. 06-22 10:00:12.644: INFO/installd(27): unlink /data/dalvik-cache/data@app@vmdl10083.tmp@classes.dex 06-22 10:00:12.673: DEBUG/AndroidRuntime(254): Shutting down VM 06-22 10:00:12.673: DEBUG/dalvikvm(254): DestroyJavaVM waiting for non-daemon threads to exit 06-22 10:00:12.685: INFO/dalvikvm(254): DestroyJavaVM shutting VM down 06-22 10:00:12.685: DEBUG/dalvikvm(254): HeapWorker thread shutting down 06-22 10:00:12.703: DEBUG/dalvikvm(254): HeapWorker thread has shut down 06-22 10:00:12.703: DEBUG/jdwp(254): JDWP shutting down net... 06-22 10:00:12.703: DEBUG/jdwp(254): Got wake-up signal, bailing out of select 06-22 10:00:12.703: INFO/dalvikvm(254): Debugger has detached; object registry had 1 entries 06-22 10:00:12.703: DEBUG/dalvikvm(254): VM cleaning up 06-22 10:00:12.715: DEBUG/dalvikvm(254): LinearAlloc 0x0 used 529708 of 4194304 (12%) 06-22 10:00:12.734: ERROR/dalvikvm(254): pthread_setspecific failed, err=22 06-22 10:00:12.963: DEBUG/dalvikvm(52): GC freed 7550 objects / 289904 bytes in 298ms 06-22 10:00:13.023: DEBUG/AndroidRuntime(262): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 06-22 10:00:13.023: DEBUG/AndroidRuntime(262): CheckJNI is ON 06-22 10:00:13.164: DEBUG/AndroidRuntime(262): --- registering native functions --- 06-22 10:00:13.174: INFO/jdwp(262): received file descriptor 19 from ADB 06-22 10:00:13.864: DEBUG/PackageParser(52): Scanning package: /data/app/vmdl10084.tmp 06-22 10:00:14.454: DEBUG/PackageManager(52): Removing package com.simple.yahoo 06-22 10:00:14.454: DEBUG/PackageManager(52): Activities: com.simple.yahoo.SimpleYahoo 06-22 10:00:14.463: DEBUG/PackageManager(52): Scanning package com.simple.yahoo 06-22 10:00:14.463: INFO/PackageManager(52): /data/app/vmdl10084.tmp changed; unpacking 06-22 10:00:14.523: DEBUG/installd(27): DexInv: --- BEGIN '/data/app/vmdl10084.tmp' --- 06-22 10:00:14.904: DEBUG/dalvikvm(268): DexOpt: load 38ms, verify 187ms, opt 5ms 06-22 10:00:14.914: DEBUG/installd(27): DexInv: --- END '/data/app/vmdl10084.tmp' (success) --- 06-22 10:00:15.034: DEBUG/dalvikvm(52): GC freed 13776 objects / 634832 bytes in 104ms 06-22 10:00:15.034: DEBUG/PackageManager(52): Activities: com.simple.yahoo.SimpleYahoo 06-22 10:00:15.123: INFO/installd(27): move /data/dalvik-cache/data@app@vmdl10084.tmp@classes.dex -> /data/dalvik-cache/data@app@com.simple.yahoo.apk@classes.dex 06-22 10:00:15.133: DEBUG/PackageManager(52): New package installed in /data/app/com.simple.yahoo.apk 06-22 10:00:15.294: DEBUG/AndroidRuntime(262): Shutting down VM 06-22 10:00:15.294: DEBUG/dalvikvm(262): DestroyJavaVM waiting for non-daemon threads to exit 06-22 10:00:15.303: DEBUG/ActivityManager(52): Uninstalling process com.simple.yahoo 06-22 10:00:15.303: INFO/dalvikvm(262): DestroyJavaVM shutting VM down 06-22 10:00:15.314: DEBUG/dalvikvm(262): HeapWorker thread shutting down 06-22 10:00:15.314: DEBUG/dalvikvm(262): HeapWorker thread has shut down 06-22 10:00:15.314: DEBUG/jdwp(262): JDWP shutting down net... 06-22 10:00:15.337: DEBUG/jdwp(262): +++ peer disconnected 06-22 10:00:15.337: INFO/dalvikvm(262): Debugger has detached; object registry had 1 entries 06-22 10:00:15.363: DEBUG/dalvikvm(262): VM cleaning up 06-22 10:00:15.404: DEBUG/dalvikvm(262): LinearAlloc 0x0 used 529708 of 4194304 (12%) 06-22 10:00:15.574: DEBUG/dalvikvm(94): GC freed 163 objects / 7584 bytes in 227ms 06-22 10:00:15.784: DEBUG/dalvikvm(52): GC freed 4473 objects / 197552 bytes in 281ms 06-22 10:00:15.844: DEBUG/AndroidRuntime(273): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 06-22 10:00:15.844: DEBUG/AndroidRuntime(273): CheckJNI is ON 06-22 10:00:16.053: DEBUG/AndroidRuntime(273): --- registering native functions --- 06-22 10:00:16.063: INFO/jdwp(273): received file descriptor 19 from ADB 06-22 10:00:16.883: INFO/ActivityManager(52): Starting activity: Intent { flags=0x10000000 comp={com.simple.yahoo/com.simple.yahoo.SimpleYahoo} } 06-22 10:00:16.904: DEBUG/AndroidRuntime(273): Shutting down VM 06-22 10:00:16.904: DEBUG/dalvikvm(273): DestroyJavaVM waiting for non-daemon threads to exit 06-22 10:00:16.914: INFO/dalvikvm(273): DestroyJavaVM shutting VM down 06-22 10:00:16.914: DEBUG/dalvikvm(273): HeapWorker thread shutting down 06-22 10:00:16.914: DEBUG/dalvikvm(273): HeapWorker thread has shut down 06-22 10:00:16.914: DEBUG/jdwp(273): JDWP shutting down net... 06-22 10:00:16.914: DEBUG/jdwp(273): +++ peer disconnected 06-22 10:00:16.924: INFO/dalvikvm(273): Debugger has detached; object registry had 1 entries 06-22 10:00:16.953: DEBUG/dalvikvm(273): VM cleaning up 06-22 10:00:16.953: DEBUG/dalvikvm(273): LinearAlloc 0x0 used 541500 of 4194304 (12%) 06-22 10:00:16.963: ERROR/dalvikvm(273): pthread_setspecific failed, err=22 06-22 10:00:16.983: INFO/ActivityManager(52): Start proc com.simple.yahoo for activity com.simple.yahoo/.SimpleYahoo: pid=282 uid=10032 gids={3003} 06-22 10:00:17.073: INFO/jdwp(282): received file descriptor 20 from ADB 06-22 10:00:17.323: WARN/dalvikvm(282): Unable to resolve superclass of Lymsg/network/Session$TypingNotifier; (23) 06-22 10:00:17.323: WARN/dalvikvm(282): Link of class 'Lymsg/network/Session$TypingNotifier;' failed 06-22 10:00:17.323: WARN/dalvikvm(282): VFY: unable to resolve check-cast 136 (Lymsg/network/Session$TypingNotifier;) in Lymsg/network/Session; 06-22 10:00:17.323: WARN/dalvikvm(282): VFY: rejecting opcode 0x1f at 0x001b 06-22 10:00:17.323: WARN/dalvikvm(282): VFY: rejected Lymsg/network/Session;.clearTypingNotifiers ()V 06-22 10:00:17.323: WARN/dalvikvm(282): Verifier rejected class Lymsg/network/Session; 06-22 10:00:17.333: DEBUG/AndroidRuntime(282): Shutting down VM 06-22 10:00:17.333: WARN/dalvikvm(282): threadid=3: thread exiting with uncaught exception (group=0x4000fe68) 06-22 10:00:17.333: ERROR/AndroidRuntime(282): Uncaught handler: thread main exiting due to uncaught exception 06-22 10:00:17.354: ERROR/AndroidRuntime(282): java.lang.VerifyError: ymsg.network.Session 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at com.simple.yahoo.SimpleYahoo.onCreate(SimpleYahoo.java:33) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2104) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2157) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at android.os.Handler.dispatchMessage(Handler.java:88) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at android.os.Looper.loop(Looper.java:123) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at android.app.ActivityThread.main(ActivityThread.java:3739) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at java.lang.reflect.Method.invokeNative(Native Method) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at java.lang.reflect.Method.invoke(Method.java:515) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 06-22 10:00:17.354: ERROR/AndroidRuntime(282): at dalvik.system.NativeStart.main(Native Method) 06-22 10:00:17.364: INFO/Process(52): Sending signal. PID: 282 SIG: 3 06-22 10:00:17.393: INFO/dalvikvm(282): threadid=7: reacting to signal 3 06-22 10:00:17.424: INFO/dalvikvm(282): Wrote stack trace to '/data/anr/traces.txt' 06-22 10:00:26.889: WARN/ActivityManager(52): Launch timeout has expired, giving up wake lock! 06-22 10:00:27.165: WARN/ActivityManager(52): Activity idle timeout for HistoryRecord{4353a4c0 {com.simple.yahoo/com.simple.yahoo.SimpleYahoo}} 06-22 10:00:32.253: DEBUG/dalvikvm(246): GC freed 2651 objects / 141360 bytes in 86ms
FYI, OpenYMSG API is an j2se api. is it possible to use it on android?
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Is there any problem with this code?
readObject() eat memory !!!
it doesn't shows location details
shows me blank with blinking arrow
Problem facing with send email program
More...