Hi haXe list,

I need to implement a kind of http streaming on my haxe project.

It is something where the browser is always keeping a connection open to the
server, so the server can push data to the client.

Is there anybody here than have any experiences or advices on how to
implement that ?

thanks

Nico

Le 4 févr. 2010, 6:53 PM,
<[email protected]<android-developers%[email protected]>>
a
écrit :

  Today's Topic Summary

Group: http://groups.google.com/group/android-developers/topics

   - How to use a Live Wallpaper in an
Activity?<#1269a1de8b07b324_group_thread_0>[2 Updates]
   - How to show a message during incoming
call?<#1269a1de8b07b324_group_thread_1>[1 Update]
   - Textview with graphic (dynamically changing)
inside.<#1269a1de8b07b324_group_thread_2>[1 Update]
   - Preventing WakeLock Under-Locked
exception<#1269a1de8b07b324_group_thread_3>[2 Updates]
   - Add languages to arm-eabi-gcc <#1269a1de8b07b324_group_thread_4> [1
   Update]
   - drawing word-wrapped text at arbitrary position on a
canvas<#1269a1de8b07b324_group_thread_5>[1 Update]
   - how to stop accelerometer sensor running in
background?<#1269a1de8b07b324_group_thread_6>[4 Updates]
   - How to show a loading image or an
animation?<#1269a1de8b07b324_group_thread_7>[1 Update]
   - Bug report for 2.0.1. Click on
EditText.<#1269a1de8b07b324_group_thread_8>[1 Update]
   - try to see hprof dump from ddms <#1269a1de8b07b324_group_thread_9> [1
   Update]
   - ListView scrolling behavior and
performance<#1269a1de8b07b324_group_thread_10>[1 Update]
   - Draw clock like minute hand <#1269a1de8b07b324_group_thread_11> [1
   Update]
   - android and google docs <#1269a1de8b07b324_group_thread_12> [2 Updates]
   - Emma Code Coverage <#1269a1de8b07b324_group_thread_13> [1 Update]
   - how to load XML files dynamically
<#1269a1de8b07b324_group_thread_14>[1 Update]
   - Basic Emma code coverage tutorial
needed<#1269a1de8b07b324_group_thread_15>[1 Update]
   - ContentProvider's DB file access right problem when its
   android:multiprocess=true <#1269a1de8b07b324_group_thread_16> [1 Update]
   - howto extend LinearLayout? <#1269a1de8b07b324_group_thread_17> [1
   Update]
   - removing item from ListView <#1269a1de8b07b324_group_thread_18> [1
   Update]

  Topic: How to use a Live Wallpaper in an
Activity?<http://groups.google.com/group/android-developers/t/61e2f65edc0c39ee>

   Romain Guy <[email protected]> Feb 04 09:14AM -0800
^<#1269a1de8b07b324_digest_top>

   All you need to do is use the them Theme.Wallpaper and the wallpaper
   will show behind your Activity.


   --
   Romain Guy
   Android framework engineer
   [email protected]

   Note: please don't send private questions to me, as I don't have time
   to provide private support.  All such questions should be posted on
   public forums, where I and others can see and answer them




   Jon Taylor <[email protected]> Feb 04 09:51AM -0800
^<#1269a1de8b07b324_digest_top>

   I assume that means that there is one master live wallpaper, and you
   cannot have multiple wallpapers on a per-application basis? Is there
   any way to do that?




  Topic: How to show a message during incoming
call?<http://groups.google.com/group/android-developers/t/52c5cc8dc060d12c>

   Nymann <[email protected]> Feb 04 09:51AM -0800
^<#1269a1de8b07b324_digest_top>

   Hi I can just use the toast, just set the duraration to something
   else, like 1000 (1 sec)

   Hope this helps






  Topic: Textview with graphic (dynamically changing)
inside.<http://groups.google.com/group/android-developers/t/53db1cdc47cdd92e>

   skink <[email protected]> Feb 04 09:43AM -0800 ^<#1269a1de8b07b324_digest_top>


   > TextView tv=(TextView)this.findViewById(R.id.TextView01);
   > BitmapDrawable bmd=new BitmapDrawable(bm);

   bmd.setBounds(0, 0, 48, 48)




  Topic: Preventing WakeLock Under-Locked
exception<http://groups.google.com/group/android-developers/t/6583cd6c4e594ba6>

   nikhil <[email protected]> Feb 04 09:16AM -0800
^<#1269a1de8b07b324_digest_top>

   If you want to keep the screen on you can use the
   setKeepScreenOn(true) method as well...





   lipinski <[email protected]> Feb 04 09:42AM -0800
^<#1269a1de8b07b324_digest_top>

   Thanks, but my intent is to prevent the system from dimming/locking
   the screen for a configurable amount of time - since there will likely
   be no user activity.

   setKeepScreenOn doesn't seem to indicate preventing screen lock.

   If I am wrong and there is a way to do this with setKeepScreenOn,
   please let me know.




  Topic: Add languages to
arm-eabi-gcc<http://groups.google.com/group/android-developers/t/2ffda06aa06906f1>

   David Turner <[email protected]> Feb 04 09:39AM -0800
^<#1269a1de8b07b324_digest_top>

   You can download the latest NDK release package, and look at the
   build/tools/build-toolchain.sh script there.
   It can be modified to rebuild a different toolchain if you want.




  Topic: drawing word-wrapped text at arbitrary position on a
canvas<http://groups.google.com/group/android-developers/t/820fb7ddbfd1ca99>

   skink <[email protected]> Feb 04 09:33AM -0800 ^<#1269a1de8b07b324_digest_top>


   > It doesn't wrap at all :(
   > Thanks
   > Julz

   yes, it shouldn't wrap
   Canvas#drawText() draws single line

   StaticLayout.draw() is what you want to draw wrapped lines

   pskink



  Topic: how to stop accelerometer sensor running in
background?<http://groups.google.com/group/android-developers/t/5c08a9c7ee47b20a>

   Abhi <[email protected]> Feb 04 06:14AM -0800
^<#1269a1de8b07b324_digest_top>

   I have an app where the accelerometer runs in the background and
   continues to read values from the sensor even after the activity
   exits.

   Here is how I am trying to stop it

   @Override
   protected void onStop()
   {
   mSensorManager.unregisterListener(mSensorListener, mySensor);
   super.onStop();

   }

   Am I doing it wrong?

   Abhi




   Abhi <[email protected]> Feb 04 06:32AM -0800
^<#1269a1de8b07b324_digest_top>

   Also, the app exits only when I press the back button.






   JP <[email protected]> Feb 04 07:12AM -0800
^<#1269a1de8b07b324_digest_top>

   There's more to it than onStop(). Check out onPause(), or better yet,
   revisit the documentation on the Activity model.
   So you get sense of the dynamic, override all activity methods, place
   logs in them and play around so you get a feel which method gets
   called when.







   JFrog <[email protected]> Feb 04 09:28AM -0800
^<#1269a1de8b07b324_digest_top>

   I believe when I had been running across handling sensor inputs there
   was always the
   finish( )
   functionality included in my onStop( ) in order to finalize the end of
   the Activity. Of course there will always be a provider for the
   Android sensors out there that the system is supplying. Not sure if
   you areOrCould disable the provided service at the system level.

   ~ JFrog
   "Debugging something is twice as hard as coding something the first
   time. Therefore, if we write something as cleverly as possible, then
   we are by definition not smart enough to debug it."




  Topic: How to show a loading image or an
animation?<http://groups.google.com/group/android-developers/t/29826b94247e5e78>

   Achanta <[email protected]> Feb 04 09:26AM -0800
^<#1269a1de8b07b324_digest_top>

   Hey Tope,

   thank you for posting it.

   I could not work on this till now but will start using your code. I
   hope it will do what I need.
   Thanks again for atleast getting me started on this thing.

   Achie.




  Topic: Bug report for 2.0.1. Click on
EditText.<http://groups.google.com/group/android-developers/t/ddbe8eb427a22365>

   Romain Guy <[email protected]> Feb 04 09:13AM -0800
^<#1269a1de8b07b324_digest_top>

   This is a known issue, thanks for reporting it though.


   --
   Romain Guy
   Android framework engineer
   [email protected]

   Note: please don't send private questions to me, as I don't have time
   to provide private support.  All such questions should be posted on
   public forums, where I and others can see and answer them



  Topic: try to see hprof dump from
ddms<http://groups.google.com/group/android-developers/t/1bc9da45cec3448e>

   fadden <[email protected]> Feb 04 07:55AM -0800
^<#1269a1de8b07b324_digest_top>

   > so i would like to ask what's the difference here and
   > what should i do if i want to see hprof when my app is built
   > in mydroid

   My guess would be that it's trying to write the hprof dump to a
   temporary file on /sdcard, and your app doesn't have
   WRITE_EXTERNAL_STORAGE permission.

   See also dalvik/docs/heap-profiling.html:


   
http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/heap-profiling.html;hb=HEAD



  Topic: ListView scrolling behavior and
performance<http://groups.google.com/group/android-developers/t/7dc261a6b382ea74>

   GDroid <[email protected]> Feb 04 07:46AM -0800
^<#1269a1de8b07b324_digest_top>

   Hi,

   I have a listview showing contacts.

   When I'm scrolling the list the scroll works pretty smooth however
   when/if I'm trying to continue the scroll in the middle of the last
   scrolling the scroll just stops and sometimes the item I clicked on is
   selected (I have registered an OnClickListener to the item view).

   I would like to get smooth scrolling just as in the device native
   contact list.

   My implementation builds each contact a view containing:
   1. Big picture for the contact image.
   2. Small picture for the type of the contact.
   3. TextView with the Contact name
   4. TextView with some extra text about that contact.

   My current layout for every item looks like:
   <LinearLayout >
   <ImageView />
   <LinearLayout/>
   <LinearLayout/>
   <ImageView />
   <TextView/>
   </LinearLayout>
   <TextView/>
   </LinearLayout>
   </LinearLayout>

   I've tried changing the LinearLayouts to relative ones but saw no
   improvement in performance.

   I've created my own "Selector" in code (to eliminate the time it takes
   to load the resource) so that odd rows will have different background
   color. The code looks like:

   StateListDrawable draw = new StateListDrawable();
   draw.addState(new int[] {android.R.attr.state_selected},
   mSelectedRowDrawable);
   draw.addState(new int[] {-99},mOddRowBG);
   draw.addState(new int[] {},mRowBG);
   view.setBackgroundDrawable(draw);


   I'll be glad to give more details if needed.

   Thanks for the help.



  Topic: Draw clock like minute
hand<http://groups.google.com/group/android-developers/t/7d767372f9f340a4>

   Sonic <[email protected]> Feb 04 07:37AM -0800
^<#1269a1de8b07b324_digest_top>

   Hi all.

   Just a quick question, how would i go about implementing a clock like
   hand that rotates around a centre point to different positions
   depending on a value.

   e.g. I send it a value of 3, and it points to the 3'o'clock position
   of a circle.

   protected void onDraw(Canvas canvas)
   {
   Paint line = new Paint();
   line.setStrokeWidth(3);
   line.setColor(Color.BLUE);
   line.setStyle(Paint.Style.STROKE);
   canvas.drawLine(55, 155, 125, 15, line);

   }

   I have the following fully working so it draws the line, but i dont
   understand how i could get one end of the line to always rotate around
   the centre fixed position.

   Do you have any ideas?

   Thanks.



  Topic: android and google
docs<http://groups.google.com/group/android-developers/t/76ee48dd6af947bf>

   David Toledo <[email protected]> Feb 04 09:56AM -0500
^<#1269a1de8b07b324_digest_top>

   Hi All

   How to read spreadsheets from google docs in android app ?

   Thanks
   David




   Greg Donald <[email protected]> Feb 04 09:33AM -0600
^<#1269a1de8b07b324_digest_top>

   > How to read spreadsheets from google docs in android app ?

   Have you tried a WebView?


   http://developer.android.com/intl/fr/reference/android/webkit/WebView.html


   --
   Greg Donald
   destiney.com | gregdonald.com



  Topic: Emma Code
Coverage<http://groups.google.com/group/android-developers/t/c7325bc8681b28d4>

   Chander Pechetty <[email protected]> Feb 04 07:14AM -0800
^<#1269a1de8b07b324_digest_top>

   A few more notes to make it clear.

   1. The default built.xml can be copied to the tests folder and change
   the name of the project in build.xml to your test project's name.
   2. You also need the build.properties
   application.package=your_test_package_name ( This has to be different
   than your tested project for obvious reasons)
   tested.project.dir=..
   tested.project.absolute.dir=..
   The remaining two properties are the location of your actual project
   you are testing

   All this is evident if you read the build.xml file and the template
   rules. (and I stand corrected on my previous post, the documentation
   is in the build.xml file and not in the template files ).


   Cheers,
   Chander




  Topic: how to load XML files
dynamically<http://groups.google.com/group/android-developers/t/e5171d81ea620a5f>

   TreKing <[email protected]> Feb 04 09:07AM -0600
^<#1269a1de8b07b324_digest_top>


   > I need a sample program where i can see
   > the usuage of inflate method so that it will be easy for me to
   > understand

   No, you need to put some time and effort into doing your own work and
   then
   posting back here if you get stuck on specifics.
   MrChaz already pointed you to the class and function you need to use.
   Reading the documentation on the function and playing with it for about 5
   minutes should be all you need to get going.


   
-------------------------------------------------------------------------------------------------
   TreKing - Chicago transit tracking app for Android-powered devices
   http://sites.google.com/site/rezmobileapps/treking



  Topic: Basic Emma code coverage tutorial
needed<http://groups.google.com/group/android-developers/t/3243be1537f0417e>

   Chander Pechetty <[email protected]> Feb 04 07:07AM -0800
^<#1269a1de8b07b324_digest_top>

   I just replied a gentleman on this forum at http://bit.ly/cikIiz.
   Basically you go the command line to your tests folder and run "ant
   coverage"






  Topic: ContentProvider's DB file access right problem when its
android:multiprocess=true<http://groups.google.com/group/android-developers/t/563e4b6131136207>

   soccercheng <[email protected]> Feb 04 07:02AM -0800
^<#1269a1de8b07b324_digest_top>

   According to Android Dev Guide (http://developer.android.com/intl/zh-
   TW/guide/topics/manifest/provider-element.html), it says that if
   android:multiprocess is set to "true", the system can create an
   instance in every process where there's a client that wants to
   interact with it, thus avoiding the overhead of interprocess
   communication.

   But... since the multiple ContentProvider instances are running in
   different process space, how do they access the DB file that was
   created in different process space or user ID?

   I've checked browser & in its packages/apps/Browser/
   AndroidManifest.xml: android:multiprocess="true"
   /data/data/com.android.browser/databases
   -rw-r--r-- app_12 app_12 512 1903-02-27 13:29 webviewCache.db-
   journal
   -rw-rw---- app_12 app_12 5120 1903-02-27 13:29 browser.db
   -rw-rw---- app_12 app_12 6144 1903-02-27 13:29 webviewCache.db
   -rw-rw---- app_12 app_12 14336 1903-02-27 13:29 webview.db

   Does any one know why???



  Topic: howto extend
LinearLayout?<http://groups.google.com/group/android-developers/t/bb55dd3e59de6e00>

   Holger <[email protected]> Feb 04 07:00AM -0800
^<#1269a1de8b07b324_digest_top>

   Hi there,

   I'm am trying to learn how to create LayoutGroups. For a start, I
   created MyLinearLayout which is supposed to force all children into
   same width (yes, there is layout_weight, but that's beside the
   point :-)

   However, the children won't show up. What am I missing here?

   public class MyLinearLayout extends LinearLayout {

   public MyLinearLayout(Context context) {
   super(context);
   }

   public MyLinearLayout(Context context, AttributeSet attrs) {
   super(context, attrs);
   }

   private final static int PADDING = 2;

   @Override
   protected void onLayout( boolean changed, int l, int t, int r, int
   b ) {
   //super.onLayout( changed, l, t, r, b );
   //if( !changed ) return;
   int len = getChildCount();
   int w = ((r-l)-(len-1)*PADDING)/len;
   int pos = l;
   for( int i=0; i<len; i++ ) {
   View c = getChildAt(i);
   c.layout( pos, t, pos+w, b );
   pos += w + PADDING;
   }
   }

   @Override
   protected void onMeasure( int wSpec, int hSpec ) {
   int ws = MeasureSpec.getMode( wSpec );
   int w = MeasureSpec.getSize(wSpec);
   int hs = MeasureSpec.getMode( hSpec );
   int h = MeasureSpec.getSize(hSpec);
   setMeasuredDimension(wSpec,hSpec);
   int len = getChildCount();
   int w1 = (w-(len-1)*PADDING)/len;
   for( int i=0; i<len; i++ ) {
   View c = getChildAt(i);
   c.measure(
   MeasureSpec.makeMeasureSpec(w1,ws),
   MeasureSpec.makeMeasureSpec(h, hs)
   );
   }
   //super.onMeasure( wSpec, hSpec );
   }

   }



  Topic: removing item from
ListView<http://groups.google.com/group/android-developers/t/7efaf2af6ea4162d>

   Stefan <[email protected]> Feb 04 06:35AM -0800
^<#1269a1de8b07b324_digest_top>

   Hello again,

   now all works fine with the ListView. I create my own class called
   "ListHelper" and add all relevant information for one row in a
   List<ListHelper> object:

   for(int i=0; i<description.size(); i++)
   {
   list.add(new ListHelper("text", "string for image", "second text");
   }

   and in the viewwrapper class, i set the image resource depending on
   the "string for image".


   if(getModel(position).getSymbol().equals("right"))
   {
   wrapper.getIcon().setImageResource(R.drawable.right);
   }
   else if //

   And the error with my adapter:

   i dont handle:

   if(getModel(position).getSymbol().equals("left"))
   {
   wrapper.getIcon().setImageResource(R.drawable.left);
   }
   else if....

   because i thought, that this is covered with the
   ImageView getIcon ()
   {
   if (icon==null)
   icon = (ImageView)base.findViewById(R.id.left);
   return icon;
   }


   Thanks for your help again,
   Stefan



 --
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]<android-developers%[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to