Hello,

I'm building an android application which will perform action based on 
various device movement eg. If user move device left, I need to scroll list 
to left same for top, bottom and right movement and plus some other 
movements.
There are plenty of other component in the application and these movement 
are like an additional feature.
The application is having around 7 screens and only on some of the screen I 
need to implement the sensor event and each screen will use different 
movement event to perform action.

This is the overview of what I'm trying to implement. To achieve this I'v a 
simple design in my mind which is:

   - Create a dedicated class X to collect sensor data.
   - Create another class Y to compute movement based on sensor readings.
   - Add an Interface to class Y to send events.
   - Create an instance of class Y in each activity/fragment and register 
   listener to get movement event.

This is what I thought with my very limited understanding of java and 
design patterns. 

But I feel this is not the standard approach and there must be a better 
approach using standard design patterns. 
Can you guys suggest me a better approach or design pattern for my problem. 
I really want to create my application according to industry standards but 
because my lack of Java and design pattern knowledge I need the right path 
from you guys.

Thanks 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/ba4b60e3-566a-47f9-b0a8-293ea39ab6e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to