First Application_Connecting Time

by hanysderhans » Thu, 29 Oct 2009 14:42:41 GMT


Sponsored Links
 Hi guys,

I wanna program an application in Eclipse/Android SDK with following
features:

1. Three G1 mobile phones (mobile A, B, and C) should clearly indicate
how long (in hours, minutes or seconds) they were next to eachother or
together in a room.
Mobile "A" belongs to me (the programmer), "B" belongs to my
girlfriend and "C" to a colleague at my job.
With this application you can see if you have spend more time with
your girl-friend or with your colleague at your job.

2. When I`m at home with my girlfriend, my mobile "A" saves the time
(the "connection" time is here meant) in SQLite how long it was in the
near of my girlfriends mobile "B".
At my job it saves the time how long it was in the near of my
colleagues mobile "C".

3. When I leave home, my mobile "A" saves the connection time with "B"
and stops. When Im back at home it starts to continue to save the
connection time with "B" again.

4. After 1 month the mobile should be able to show the minimum,
average and maximum connection time to "B" and "C".

Is it possible to program such an application in Android?
Can a G1 recognize automatically that another G1 is around? If not,
what is the best way to let them communicate automatically
(bluetooth?) and how can you implement it in android?
I`m thankful for every theoretical or practical hints.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. ArrayIndexOutOfBoundsException in maps API

Hi,

I'm realy frustrated to see this error without being able to see
what's happening in sources. It happens sometimes I don't know in
which conditions and politely shoots off my app.

When will google release the maps API sources? Or am I doing sth wrong
(I downloaded the cupcake image to avoid debugging in code that's
potentially not accurate, are the maps api sources available in newer
images?).

08-10 16:30:44.318: ERROR/AndroidRuntime(1053):
java.lang.ArrayIndexOutOfBoundsException
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.google.android.maps.ItemizedOverlay.maskHelper
(ItemizedOverlay.java:562)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.google.android.maps.ItemizedOverlay.setFocus(ItemizedOverlay.java:
365)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.google.android.maps.ItemizedOverlay.focus(ItemizedOverlay.java:
539)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.google.android.maps.ItemizedOverlay.onTap(ItemizedOverlay.java:
455)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.google.android.maps.OverlayBundle.onTap(OverlayBundle.java:83)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.google.android.maps.MapView$1.onSingleTapUp(MapView.java:346)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.view.GestureDetector.onTouchEvent(GestureDetector.java:503)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.google.android.maps.MapView.onTouchEvent(MapView.java:623)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.view.View.dispatchTouchEvent(View.java:3368)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:831)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1707)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1197)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.app.Activity.dispatchTouchEvent(Activity.java:1993)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.os.Handler.dispatchMessage(Handler.java:99)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.os.Looper.loop(Looper.java:123)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
java.lang.reflect.Method.invokeNative(Native Method)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
java.lang.reflect.Method.invoke(Method.java:521)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
08-10 16:30:44.318: ERROR/AndroidRuntime(1053):     at
dalvik.system.NativeStart.main(Native Method)

Best Regards,
Zied Hamdi
http://nextstreet.eu
--~--~---------~--~----~------------~-------~--~----~

2. Specifying relative positions in Layout?

Hi All,

I need to implement a screen containing a list of blocks one below the
other. Each block will contain mutiple superimpose elements (Images,
text) for which the relative position needs to be specified with
respect to the top left corner of the block.

For creating the list of blocks  i have used listview. For each  block
i tried to use relative layout.This works ok when the phone is in
landscape mode and absolute position is specified relative to left
edge of the phone. But when the phone is put in the portrait mode the
layout gets distorted.

1) What layout can be used for this scenario?

2) Can relative positions be specified in terms of percentage of
screen width/height instead of pixels?
--~--~---------~--~----~------------~-------~--~----~

3. Can we put inner layout in center of the screen.

4. Android 1.6 Maps Application

5. Image scaling by BitmapFactory.decodeResource()

6. How to put TextView in same position in landscape and portrait mode in Android

7. App upgrade (with zipalign) causes force closes/disappearing of app icon