Nenad Nikolic

Greenhorn
+ Follow
since Mar 20, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nenad Nikolic

Hallo Anton,

Is it possible to add custom JRebel-aware behaviour in my app allowing me implement custom functionality when classes inside of the JVM are updated by JRebel? One usage of such hooks would be telling some external server/service to reinitialize/restart whenever the developed application is being modified (and updated in the JVM).

JRebel plugins are mentioned in the JRebel FAQ and that might be the answer, but that page currently shows a sad 404 dog.

Cheers!
Shonzilla

Martin Koelowitz wrote:For everybody that is interested in applying Google Protocol Buffers (a compact and fast communication method) check out this article, which features a client/server example which compares JSON, XML and Protocol buffers:

http://www.ibm.com/developerworks/opensource/library/x-dataAndroid/index.html



Thanks for your feedback and linking to this interesting developerworks article.

I'm curious, have you tried:
  • gzipping XML-RPC data and ungzipping it on the Android device?
  • setting up and using Google Protocol Buffers in the end?


  • Cheers!
    Shonzilla
    13 years ago

    Jonas X. Yuan wrote:
    Go there and download portlet WAR, where you can get all detailed info.



    I was actually hoping for answers since. Theoretically I could explore the opensocial-portlet source but at this point I'm not sure it's worth the effort.

    Thank you anyway.

    Cheers!
    Shonzilla
    13 years ago

    Jonas X. Yuan wrote:yes, details are here

    http://www.liferay.com/web/michael.young/blog/-/blogs/liferay-6%3A-opensocial-gadgets



    Hi Jonas,

    Thank you for reply. However, you linked the very article I have linked above. :-)
    Any chance of answering my questions above?

    Thanks!
    Shonzilla
    13 years ago
    Hi Jonas,

    I'm curious about the OpenSocial support in Liferay 6 nd I have several questions. :-)

    I've read already it's based on Apache Shindig but I'm not aware what version of OpenSocial is it.
    Are there any OpenSocial features that are specific to Liferay?
    Are you supporting OpenSocial groups already (which are part of OpenSocial 0.9 spec and beyond.
    Is it possible to use any (OpenSocial) gadget merely by entering the gadget XML?

    Last but not least, I believe that OpenSocial gadgets provide faster penetration of new functionality compared to portlets. Do you agree?

    Cheers!
    Shonzilla
    13 years ago
    Hi there,
    I'm curious in what ways can Flex 4 be used to generate UIs for mobile devices?
    I'm aware that Flash support is yet to come for iPhone and Android ahd that's (allegedly) just around the corner), so I believe my question makes sense.

    Cheers!
    Shonzilla
    14 years ago
    Thank you all!
    I'm looking forward to reading the book through, gaining further insight into the Android platform and contributing to community here and elsewhere.

    Cheers!
    Shonzilla
    15 years ago

    Michael Rivera wrote:Jetty on Android is cool



    Could you please elaborate how does you reply help Martin or anyone else interested in client-server communication in relation to Android platform?

    Cheers!
    Shonzilla
    15 years ago

    Ryan Waggoner wrote:Hey guys,
    This post might be too much about the G1 but...

    I still get excited when I find out the phone can still do cool things. For example the compass works with real magnetic fields. I was wondering where i could find information to see how this works, and how to harness the data...

    Just to play with it really

    Thanks!



    Hi Ryan,

    You would need to use android.hardware.SensorManager class and android.hardware.SensorListener interface to read magnetic values.

    Start with the Compass example (via this link copy-pasted here for your convenience):

    You would need to change this particular example (line 69) to read magnetic field data instead of orientation data:

    Continue experimenting from there in the vicinity of sources of magnetic fields in your house - other mobile phones, TV, microwave (but don't put your Android inside!) etc.

    I hope that helps.

    BTW, did you know Android SDK developers even made it easier for you to develop a Star Wars games.
    There's a constant is in SDK: android.hardware.SensorManager.GRAVITY_DEATH_STAR_I :-)

    Cheers!
    Shonzilla
    15 years ago

    Rogerio Kioshi wrote:Hi,

    I'd like to know if it is true that Android only works in Google devices, like G1.
    If so, isn't against Java WORA concept (write once runs everywhere)?


    Thank you.



    Absolutely not.... Android can run on any device on which you can compile Android OS source code and there are device drivers for the hardware you want to use and Android SDK supports (screen, keyboard, WiFi, Bluetooth, mobile network layer, etc.).

    Android is not exactly Java, therefore WORA concept does not apply. Have in mind that Android applications are written in Java using Android SDK which run on Dalvik VM (Virtual Machine) and not on ubiquitious JVM (Java Virtual Machine), which has been supported on many operating systems and hardware platforms. Also, Android SDK is not identical to Java 5 SDK. Rather some parts have been ported.

    All in all, you can use Java skills to write Android applications and there's some (substantial) effort required to port existing Java (SE/ME) applications to make them run on Android devices.

    Cheers!
    Shonzilla
    15 years ago

    Martin Koel wrote:Many of the most interesting Android applications rely heavily on communication with a server back-end.

    I was wondering what would be a good design for client-server communication.


    This is a broad question. It really depends on the requirements.

    There're numerous options out there:
  • RESTful web services (can be fairly lightweight and allow for different client types, incl. mobile devices) - I recommend using JAX-RS API and particularly its reference implementation Jersey. Also, there're several APIs that introduce specific semantics on top of RESTful design. XMPP and APP (Atom Publishing Protocol) are examples of RESTful API design.
  • SOAP web services (much more robust, interesting for enterprise applications which might involves complex policies) - there's a variety of Java libraries for supporting SOAP-based web services
  • socket-based communication (can be implemented to involve less message-processing overhead; many message encodings are possible, I recommend Google Protocol Buffers -

  • Furthermore, Client-server communication can be wrapped inside a library which abstracts out the actual network communication and makes it easier to connect different kinds of clients.

    For development of client-server communication with Android OS on client side, I would recommend Google Data APIs where you can access Google cloud to read their data and store (some of) your data.

    I hope this helps.

    Cheers!
    Shonzilla
    15 years ago

    Fred Grott wrote:would be problematic as Android has a policy of not supporting AWT on Android ie you would have AWt on desktop but not on Android


    Pardon my ignorance, why would AWT be a prerequisite for running JavaFX?

    Cheers!
    Shonzilla
    15 years ago
    Hello JavaRanchers,

    I'm curious how Bluetooth can be programmed using Android 1.0 and later.
    Until SDK v0.9 one could use the BluetoothDevice class and general Bluetooth API was available until Android team decided to remove it from 1.0 release because of API immaturity. Unfortunately, I haven't had time to invest in investigating alternative solutions, e.g. using 3rd party libraries or to look for open-source Android applications using Bluetooth interface. I'm hoping someone else has.

    Has anyone managed to (elegantly) program Bluetooth on Android 1.0+ ?

    Thank you very much for any hints...

    Cheers!
    Shonzilla
    15 years ago