[android-developers] cannot run sqlite3 commands using ADB

2012-01-25 Thread ramkumar pinninti
Hi,
I hava a rooted Samsung Galaxy Y mobile.I system/xbin folder sqlite3
is there.But when i run sqlite3 command using ADB following error is
occuring

# sqlite3
sqlite3
link_image[1963]:  2761 could not load needed library 'libncurses.so'
for 'sqlit
e3' (load_library[1105]: Library 'libncurses.so' not found)CANNOT LINK
EXECUTABL
E

Please kindly help me.
Thanks and regards
P.Ramkumar.

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


[android-developers] [Android]How to identify on which marker user had taped

2012-01-25 Thread ripal hiral
I want that on taping particular marker I want to show Balloon Like in
Google map we have
When User tap on Particular marker Balloon containing Info related to
that Geo point is display ..

I am new in Android can any one Help me

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


[android-developers] siri like ui

2012-01-25 Thread cindy
Hi All,

In Siri application, people's talk has been put into a nice shape(not
rectangle). How could android achieve that effect?

Thanks!

Cindy

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


[android-developers] My first Android App: "Audio Clipboard" - Please help me improve it.

2012-01-25 Thread Jatin D Patel
Hi all,

Hope you are doing well.
First of all, *Happy republic day 2012*.

I would like to inform that today, i have launched one small simple android
app .
It will help android phone users with short texting / tweeting / messaging
etc.

Please download, give it a try and please



> *help me with improving this android app with feedback / suggestions*.



> Android application name: "*AUDIO 
> CLIPBOARD
> *"


What it does



1. Records our sentence.

2. Converts into editable text.

3. You can copy that text and use it for Tweets, fb chat, messaging etc.



Please let me know if you have any trouble finding / using the app.
Thanking you in advance for your time.

Works on Android Devices Only...

-- 
Thanks,
Jatin D N Patel

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

[android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread Zsolt Vasvari
In a background thread's constructor, retrieve the global context
using getApplicationContext().   Then you can use that to look up
resources, it works, I do it all over.

On Jan 26, 12:49 am, elDoudou  wrote:
> Thank you Kostya.
>
> Yes, my intent is to invoke those methods from a worker background
> thread.
>
> You assume that I want to get i18n string to update the UI, but this
> is not my exact use case. I need to get an i18n string, because I want
> to prepare the computation of a string (imagine that the string
> computation takes a lot of time, it may make sense, for instance),
> which will eventually be used on a UI thread to update the display,
> which is slightly different.
>
> Your phone settings changes while the background thread is still
> running example is a very well chosen use case, and I do not see how
> the AsyncTask enables that properly neither.
>
> Not to mention the fact that there is no synchronization mechanism
> around the "Fragment.getActivity()": if I test its nullity, nothing
> prevents it from being null in the if statement body. I cannot figure
> out why the "Fragment.getText()/getString()/getResources()" methods
> correct execution may need to depend on the fragment state. At least,
> the "Fragment.getActivity()" method should throw an
> "IllegalStateException" instead of "null" when the fragment has been
> detached, or even better, a dedicated exception also used for the
> previous methods.
>
> I'm still investigating, on how to handle that properly...
> Regards,
> Édouard

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


Re: [android-developers] Re: Scroll View

2012-01-25 Thread TreKing
On Wed, Jan 25, 2012 at 4:04 PM, Oliviu Vais  wrote:

> I cannot get this to work. When i press the button it registers as a
> single click, then it releases the touch. HELP!!!
>

Have you tried all of the motion-centric events described here:
http://developer.android.com/reference/android/view/View.html?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Delayed modification of ListView row causing a rebuild of the entire list when scrolling

2012-01-25 Thread Mark Murphy
On Wed, Jan 25, 2012 at 8:12 PM, mattcoz  wrote:
> I have determined this by logging the getView method of the adapter.  When
> operating normally, getView is only called for the new row to be displayed
> when scrolling.  In my case, getView is called for every row.

There are no rules on how many times getView() will be called. You
need to ensure that getView() is very fast.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in DC: http://marakana.com/training/android/

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


Re: [android-developers] Delayed modification of ListView row causing a rebuild of the entire list when scrolling

2012-01-25 Thread mattcoz
I have determined this by logging the getView method of the adapter.  When 
operating normally, getView is only called for the new row to be displayed 
when scrolling.  In my case, getView is called for every row.

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

Re: [android-developers] Spinner example has no prompt

2012-01-25 Thread Ray Tayek

At 07:52 AM 1/25/2012, you wrote:

Since you mentioned 4.0.3 and api level 15...

With Holo themes, spinners are no longer popup 
dialogs - they are dropdown lists, sošthere is no title.š


Adding a text label to the layout somewhere near the spinner should work.


yes, but that would take up more real estate.

i ended up adding a prompt string as the first 
element in the list model when i made the array 
adapter.  and then removed it when the user made 
a choice that was not the prompt.


is this a sane thing to do?

or is there a better way? maybe change adapters 
when the user makes a choice that was not the prompt?


thanks


25 ÑÎ×ÁÒÑ 2012šÇ. 8:20 ÐÏÌØÚÏ×ÁÔÅÌØ Ray Tayek 
<rta...@ca.rr.com> ÎÁÐÉÓÁÌ:

At 07:07 PM 1/24/2012, you wrote:
At 02:21 AM 1/23/2012, you wrote:
At 07:29 PM 1/21/2012, Ray Tayek wrote:
hi, newbie here. ...
running the spinner example shows earth. the 
prompt is not visible  also, the spinner 
prompts in my project are not visible...



found šclue: 
http://groups.google.com/group/android-developers/browse_thread/thread/d93ce1ef583a2a29



more clues: more clues: 
http://stackoverflow.com/questions/867518/how-to-make-an-android-spinner-with-initial-text-select-one


has anyone seen a prompt in a spinner in without 
some special code using 4.0.3 spi level 15?



thanks



---
co-chair http://ocjug.org/

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to 
android-developers@googlegroups.com

To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en 



---
co-chair http://ocjug.org/

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


[android-developers] Re: Image Quality problems using Canvas and canvas.scale(Scale, Scale);

2012-01-25 Thread JamesColeman
Thank you for your reply, I appreciate the input!

Overall I agree with what you are saying about the "bleeding
obvious".  However, I down scaled the exact same images on
BlackBerry's and had no problems whatsoever.  In our graphics arts, I
downscale graphics all the time and end up with great looking images.
The problem I am experiencing is something particular to Android
Canvas scale and is similar to the problem in the link I posted.

In intend to have a pinch zoom control the canvas scale so it looks
like I have a challenge ahead of me. One would think if I can pull it
off on a BlackBerry I could do it on an Android somehow.  I hope I am
not stuck with it as you say.

On Jan 22, 1:05 am, Peter Webb  wrote:
> At the risk of stating the bleeding obvious, if you upscale a bitmap
> *anywhere* in your code by a factor which is not an exact integer (1,
> 2, 3, etc) then the system will not be able to exactly reproduce the
> original image, and will be interpolating and/or duplicating pixels to
> make it fit. Which gives you a not so great result.
>
> You have gone to great lengths to avoid scaling when you read it in
> (using Bitmap Factory Options), this is largely a waste of time if you
> scale it for writing using canvas.scale. You will still get scaling
> artefacts on write. You need to suppress scaling for read *and* write.
>
> The only way that I know of to get pinsharp graphics - with your
> bitmaps appearing exactly how you intended - is to write to a canvas
> which has the same resolution as the actual device (or View). The
> downside of this is that you have to manage all possible screen
> resolutions within your code, as you can no longer use the system to
> map a fixed co-ordinate space in your code to the specs of the actual
> screen. A pretty obvious trade-off between coding simplicity and image
> quality.
>
> If you are already relying on automatic output scaling for lots of
> other stuff in your code, you are probably stuck with it.
>
> Peter Webb
>
> On Jan 22, 2:15 pm, JamesColeman 
> wrote:
>
>
>
>
>
>
>
> > I am having Image Quality problems using Canvas and
> > canvas.scale(Scale, Scale); they look exactly like the following:
>
> >http://stackoverflow.com/questions/2041207/android-quality-of-the-ima...
>
> > I believe I have read all the posts on image quality problems when re-
> > sizing bitmaps, but it doesn't seem to help when scaling with a Canvas
> > scale(float scale).
>
> > I have tried many different options as suggested by the image quality
> > posts.
>
> > BitmapFactory.Options options = new BitmapFactory.Options();
> > options.inJustDecodeBounds = false;
> > options.inDither = false;
> > options.inSampleSize = 1;
> > options.inScaled = false;
> > options.inPreferredConfig = Bitmap.Config.ARGB_;//I thought this
> > would do it
> > CurrentPicture = BitmapFactory.decodeFile(path, options);//Also tried
> > decodeStream()
>
> > PicturePaint = new Paint();
> > //PicturePaint = new Paint(Paint.FILTER_BITMAP_FLAG); //I also tried
> > this
> > //PicturePaint = new Paint(Paint.ANTI_ALIAS_FLAG);  //I also tried
> > this
> > canvas.scale(Scale, Scale);
> > canvas.drawBitmap(CurrentPicture, 0, 0, PicturePaint);
>
> > I am quite concerned as I am in serious trouble if I can't get the
> > image quality problem solved. Any help is appreciated.
>
> > Thanks!

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


Re: [android-developers] Re: Partial invalidation in custom Android view with hardware acceleration

2012-01-25 Thread Andrew Hughes
So, with the new hardware accelerated pipeline, in the case where there
could be *thousands* of drawing calls (such as drawLine(s) or drawPath) is
it better to not draw to a bitmap cache but rather issue those calls
directly to the Canvas provided by onDraw()? What about when scrolling?
Should a bitmap cache be used then, or should all the draw calls be
continually re-issued while scrolling?

I understand (and have seen) how this is slow when not using hardware
acceleration, but I don't understand the new rendering pipeline and
internal use of DisplayList enough to know which is the proper
implementation (and I would love to understand it better!). My gut wants to
use a bitmap cache, but you made it sound like with the hardware
acceleration pipeline you shouldn't have to?

Thanks,
Andrew

On Sat, Jan 21, 2012 at 12:14 PM, Andrew Hughes  wrote:

> Thanks.
>
> It does as of API level 12 (Android 3.2.) I would recommend you switch
>> to using hardware AA lines if possible (all devices that shipped with
>> API level 11 should have now be upgraded to 12.) Make sure to use
>> drawLines() as well to batch the geometry.
>
>
> Unfortunately both devices I have (HTC Jetstream and Lenovo ThinkPad
> Tablet) are still on API 11...and at least in the case of the ThinkPad
> Tablet, what I've heard is that they're skipping API 12 and going straight
> to ICS which won't be out until March or later...
>
> As for using Canvas.drawLines(), the width of the lines I am drawing is
> constantly changing (based on the pressure level provided by the active pen
> on the tablets I mentioned above). With hardware acceleration, is it
> practical to make (a lot) of draw lines calls (changing the stroke width of
> the provided Paint in between calls), instead of creating a Bitmap cache
> and updating just the region of the Bitmap that changed? I don't know
> enough about graphics (and how the DisplayList stuff works) to see how (or
> if) this is faster. What about when invalidating the entire Canvas (such as
> when scrolling), is it faster to redraw the entire canvas via drawLines()
> or to just translate a Bitmap cache? My gut wants to say that the Bitmap is
> faster...but I really don't know (remember it could potentially be *a lot* of
> lines...depending on how much the user draws).
>
> I know for sure using a Bitmap cache is faster than drawing everything in
> software (using Skia) since I have observed it (and that at least makes
> sense to me).
>
> It would be nice if there were a drawLines() that took an array of line
> widths as a parameter instead of using the stroke width in the provided
> Paint object :)
>
> Since you are doing your own buffering I would recommend you keep
>> track of the dirty region yourself. Note that you could instead set
>> your View's layer type to be LAYER_TYPE_SOFTWARE. If you do so, the
>> View will be drawn into a Bitmap for you *and* the clip rect in
>> onDraw() will be the same as when you call invalidate(Rect).
>> Note however that the rendering engine will have to upload the entire
>> bitmap as a texture which can be expensive.
>
>
> I started with using LAYER_TYPE_SOFTWARE, but I was running into problems
> where calling invalidate(Rect) still set the clip in onDraw() to the entire
> Canvas (http://stackoverflow.com/q/8686525/287575). So I decided to try
> implementing the drawing cache myself and test enabling hardware
> acceleration to keep all overlapping views from being invalidated just
> because one of them is. I also tried keeping track of the dirty region
> myself and setting the clip to the dirty region in onDraw() (with hardware
> acceleration enabled) but then I was *only* seeing the dirty region being
> drawn each time...as if the Canvas was being cleared by the framework each
> time (that's what I meant by a "blank Canvas" in one of my previous posts).
>
> Thanks,
> Andrew
>
>
> On Fri, Jan 20, 2012 at 1:51 PM, Romain Guy  wrote:
>
>> > The reason for this is one of the things I'm drawing in the View are
>> lines
>> > (potentially lots of them), and hardware acceleration does not support
>> AA
>> > for drawing lines.
>>
>> It does as of API level 12 (Android 3.2.) I would recommend you switch
>> to using hardware AA lines if possible (all devices that shipped with
>> API level 11 should have now be upgraded to 12.) Make sure to use
>> drawLines() as well to batch the geometry.
>>
>> > So, I draw everything to a Bitmap cache and simply update
>> > a section of the Bitmap cache when the View's data is updated, then I
>> call
>> > invalidate(Rect) hoping to only update the View's Canvas with that
>> portion
>> > of the Bitmap cache that was updated. But I end up redrawing the entire
>> > Canvas every time. This ends up being a lot slower than doing the same
>> > technique without hardware acceleration enabled.
>>
>> Since you are doing your own buffering I would recommend you keep
>> track of the dirty region yourself. Note that you could instead set
>> your View's layer type to be LAY

[android-developers] Re: Scroll View

2012-01-25 Thread Oliviu Vais
I cannot get this to work. When i press the button it registers as a
single click, then it releases the touch. HELP!!!

On Jan 24, 11:47 pm, TreKing  wrote:
> On Tue, Jan 24, 2012 at 3:06 PM, Oliviu Vais  wrote:
> > I thought it's clear enough.
>
> Nope =)
>
> > I need help for the Java class, i cant get my buttons to scroll continous,
> > they scroll only once when i click them. I need them to scroll to the end
> > of the View but not at once, in little continous steps. This is what i have
> > so far:
>
> A - see, that makes a lot more sense than "here's some code, what's
> wrong".
>
> I don't know much about the onTouchEvent, but I would guess by the name and
> what you described that it get's called once, when the view is initially
> touched, and not continuously as you're wanting to do.
>
> Does the method get called when you release as well? If so, or if there is
> another event that tells you that, you could start a timer on the initial
> touch which you use to control the scrolling of the view, and then stop it
> when the view stops being touched.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: system/bin/dalvikvm command/

2012-01-25 Thread Mark Murphy
On Wed, Jan 25, 2012 at 4:09 PM, nir apple  wrote:
> in general i want to open a new process, not forked from the zygote
> process...
> do you know of way to do this?

This has nothing to do with the Android SDK, which is the focus of this list.

If you are building custom firmware, please visit
http://source.android.com, click on the Community tab, and find a
relevant Google Group.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: system/bin/dalvikvm command/

2012-01-25 Thread nir apple
in general i want to open a new process, not forked from the zygote
process...
do you know of way to do this?

thank
Nir

2012/1/25 Kristopher Micinski 

> On Wed, Jan 25, 2012 at 1:46 PM, nir apple  wrote:
> > Thanks for the answer, but I already looked at these sites. there I found
> > the problem but not the solution or other way to do what I need.
> > Regrading your question, yes very few application will need something
> like
> > but those few will be something else then your regular applications, and
> I
> > am no hacker. If I were to ask this question in linux or windows forums I
> > wouldent get that reply.
> > Why? because os needs to give power to developers and not strip it from
> > them. I did really nice  things in linux and windows which could be
> amazing
> > in smartphone.
> > Well anyway thanks for the answer, I will keep looking
> > Nir
> >
>
> Given the security models as they stand now, I feel there's basically
> 0% chance that you're going to get this kind of control on an unrooted
> phone ever.
>
> You still didn't say why you wanted this, there might be another way
> to do what you want.
>
> kris
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Screebl 3.0 Beta Test

2012-01-25 Thread keyeslabs
Looking for some brave souls to test a ground-up rewrite of Screebl.  The 
engine is mostly there, but things aren't pretty yet.  If you're 
interested, I've published to the 
market: https://market.android.com/details?id=com.keyes.screebl.beta.

Still wish Google provided a more integrated beta program for developers so 
that this could be managed from the developer console.

Anyway, let me know how things work out.  Thanks in advance.

dk

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

Re: [android-developers] VideoView.setLayoutParams - ClassCastException

2012-01-25 Thread John-Marc Desmarais
That is a very good point.
Thanks.
-jm

On Wed, Jan 25, 2012 at 2:33 PM, TreKing  wrote:
> On Wed, Jan 25, 2012 at 1:25 PM, John-Marc Desmarais  wrote:
>>
>> Can anyone suggest why this is the case?
>
>
> This is your code: (LinearLayout.LayoutParams)vv.getLayoutParams();
>
> This is the stack trace:
> java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] VideoView.setLayoutParams - ClassCastException

2012-01-25 Thread TreKing
On Wed, Jan 25, 2012 at 1:25 PM, John-Marc Desmarais  wrote:

> Can anyone suggest why this is the case?


This is your code: (*LinearLayout*.LayoutParams)vv.getLayoutParams();

This is the stack trace:
java.lang.*ClassCastException*: android.widget.*RelativeLayout*$LayoutParams

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] VideoView.setLayoutParams - ClassCastException

2012-01-25 Thread John-Marc Desmarais
Hi,

I have a VideoView in a LinearLayout with 2 other boxes. In trying to
create a full screen video, I am doing the following:

private boolean isFullScreen = false;
public void onClick(View v)
{
VideoView vv = (VideoView) v.findViewById(R.id.videoView1);
LinearLayout.LayoutParams lp =
(LinearLayout.LayoutParams)vv.getLayoutParams();
if (isFullScreen)
{
isFullScreen = false;
lp.weight = 0.2f;
vv.setLayoutParams(lp);
v.invalidate();
}
else
{
isFullScreen = true;
lp.weight = 0f;
vv.setLayoutParams(lp);
v.invalidate();
}
Log.v(LogName.onClick, "Video switch to " + (isFullScreen ? 
"Full
screen" : "Normal size"));
}

I am getting an exception:
01-26 04:12:20.380: E/AndroidRuntime(8010): FATAL EXCEPTION: main
01-26 04:12:20.380: E/AndroidRuntime(8010):
java.lang.ClassCastException:
android.widget.RelativeLayout$LayoutParams
01-26 04:12:20.380: E/AndroidRuntime(8010): at
com.elliptictech.hdcprx.gui.PlayVideo.onClick(PlayVideo.java:54)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.view.View.performClick(View.java:2538)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.view.View$PerformClick.run(View.java:9152)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.os.Handler.handleCallback(Handler.java:587)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.os.Handler.dispatchMessage(Handler.java:92)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.os.Looper.loop(Looper.java:130)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.app.ActivityThread.main(ActivityThread.java:3691)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
java.lang.reflect.Method.invokeNative(Native Method)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
java.lang.reflect.Method.invoke(Method.java:507)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)

Can anyone suggest why this is the case? Alternatively, can you
suggest another method to set the video view to full screen?

Best regards,
-jm

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


[android-developers] Re: access dual gsm interfaces

2012-01-25 Thread flsobral
I'm also interested in this feature, is there a way to detect how many gsm 
interfaces the phone has, and retrieve information from all of them?
Maybe there's a way to change the gsm interface from which the 
TelephonyManager retrieves info.

Thanks in advance.

Fabio.


On Saturday, November 19, 2011 11:00:35 PM UTC-2, Cocoro Cara wrote:
>
> Does Android 2.3.4 support dual gsm interfaces in a phone? What will
> be required to implement something like this? Software-wise? Can you
> point me to some documentation? We want to be able to select which GSM
> interface to make a particular call. Moreover, display the status of
> the signal strength for each interface in the notification area.
>
> Thnx. Any and all help will be appreciated.
>
> CC
>
>

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

Re: [android-developers] Re: system/bin/dalvikvm command/

2012-01-25 Thread Kristopher Micinski
On Wed, Jan 25, 2012 at 1:46 PM, nir apple  wrote:
> Thanks for the answer, but I already looked at these sites. there I found
> the problem but not the solution or other way to do what I need.
> Regrading your question, yes very few application will need something like
> but those few will be something else then your regular applications, and I
> am no hacker. If I were to ask this question in linux or windows forums I
> wouldent get that reply.
> Why? because os needs to give power to developers and not strip it from
> them. I did really nice  things in linux and windows which could be amazing
> in smartphone.
> Well anyway thanks for the answer, I will keep looking
> Nir
>

Given the security models as they stand now, I feel there's basically
0% chance that you're going to get this kind of control on an unrooted
phone ever.

You still didn't say why you wanted this, there might be another way
to do what you want.

kris

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


Re: [android-developers] Re: system/bin/dalvikvm command/

2012-01-25 Thread nir apple
Thanks for the answer, but I already looked at these sites. there I found
the problem but not the solution or other way to do what I need.
Regrading your question, yes very few application will need something like
but those few will be something else then your regular applications, and I
am no hacker. If I were to ask this question in linux or windows forums I
wouldent get that reply.
Why? because os needs to give power to developers and not strip it from
them. I did really nice  things in linux and windows which could be amazing
in smartphone.
Well anyway thanks for the answer, I will keep looking
Nir
בתאריך 25 בינו 2012 20:32, מאת "nir apple"  :

>
> בתאריך 25 בינו 2012 01:23, מאת "Kristopher Micinski" <
> krismicin...@gmail.com> :
> >
> > I should mention: why are you doing this?
> >
> > If you feel like you need to do this, you are probably doing something
> > wrong.  There aren't too many reasons you would need to do this, the
> > only time I've ever done this was when I was actually hacking the vm
> > source.  If this is what you intend to do, this is the wrong mailing
> > list to ask..
> >
> > kris
> >
> > On Tue, Jan 24, 2012 at 6:20 PM, Kristopher Micinski
> >  wrote:
> > > http://www.milk.com/kodebase/dalvik-docs-mirror/docs/hello-world.html
> > >
> > >
> http://www.netmite.com/android/mydroid/2.0/dalvik/docs/embedded-vm-control.html
> > >
> > > will be of interest to you..
> > >
> > > kris
> > >
> > > On Tue, Jan 24, 2012 at 6:16 PM, nir apple 
> wrote:
> > >> slight correction.
> > >> after changing the ANDROID_DATA variable my new dex errors are: that
> > >> it can't find system.framework.jar.classes.dex
> > >> and more.
> > >> sounds reasonable that is can't find them since they are probably at /
> > >> data/... but why do we need them?
> > >> and this returns me to my first questions: is there another way??? or
> > >> a solution
> > >> thanks again
> > >> Nir
> > >>
> > >> On 25 ינואר, 01:03, nir apple  wrote:
> > >>> Hi,
> > >>> I want to use the adb shell command: dalvikvm in order to start a new
> > >>> dalvik virtual machine
> > >>> When i try to use it like this: dalvikvm Myclass .it doesn't work
> > >>> When looking at logcat i see that the following error:
> > >>> can't open dex cache /data/dalvik-cache..
> > >>> As i read this is because i don't have access to that folder. so i
> > >>> changed the ANDROID_DATA environment variable to =/sdcard in adb
> shell
> > >>> using export.
> > >>> and when trying again i get: can't open dex cache /sdcard/dalvik-
> > >>> cache..
> > >>> Seems like nothing changed...
> > >>>
> > >>> 1. Does anyone know what's the problem. or even if it is possible to
> > >>> start a new dvm using adb (not forking from zygote process like am
> > >>> command, maybe dvz or app_process) in non rooted devices?
> > >>> 2. Is it possible to tell dalvikvm to skip the dex optimization part?
> > >>> or to tell him that i already have one optimized
> > >>>
> > >>> Thanks for the help
> > >>> Nir
> > >>
> > >> --
> > >> You received this message because you are subscribed to the Google
> > >> Groups "Android Developers" group.
> > >> To post to this group, send email to
> android-developers@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> android-developers+unsubscr...@googlegroups.com
> > >> 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 android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: system/bin/dalvikvm command/

2012-01-25 Thread nir apple
בתאריך 25 בינו 2012 01:23, מאת "Kristopher Micinski" 
:
>
> I should mention: why are you doing this?
>
> If you feel like you need to do this, you are probably doing something
> wrong.  There aren't too many reasons you would need to do this, the
> only time I've ever done this was when I was actually hacking the vm
> source.  If this is what you intend to do, this is the wrong mailing
> list to ask..
>
> kris
>
> On Tue, Jan 24, 2012 at 6:20 PM, Kristopher Micinski
>  wrote:
> > http://www.milk.com/kodebase/dalvik-docs-mirror/docs/hello-world.html
> >
> >
http://www.netmite.com/android/mydroid/2.0/dalvik/docs/embedded-vm-control.html
> >
> > will be of interest to you..
> >
> > kris
> >
> > On Tue, Jan 24, 2012 at 6:16 PM, nir apple  wrote:
> >> slight correction.
> >> after changing the ANDROID_DATA variable my new dex errors are: that
> >> it can't find system.framework.jar.classes.dex
> >> and more.
> >> sounds reasonable that is can't find them since they are probably at /
> >> data/... but why do we need them?
> >> and this returns me to my first questions: is there another way??? or
> >> a solution
> >> thanks again
> >> Nir
> >>
> >> On 25 ינואר, 01:03, nir apple  wrote:
> >>> Hi,
> >>> I want to use the adb shell command: dalvikvm in order to start a new
> >>> dalvik virtual machine
> >>> When i try to use it like this: dalvikvm Myclass .it doesn't work
> >>> When looking at logcat i see that the following error:
> >>> can't open dex cache /data/dalvik-cache..
> >>> As i read this is because i don't have access to that folder. so i
> >>> changed the ANDROID_DATA environment variable to =/sdcard in adb shell
> >>> using export.
> >>> and when trying again i get: can't open dex cache /sdcard/dalvik-
> >>> cache..
> >>> Seems like nothing changed...
> >>>
> >>> 1. Does anyone know what's the problem. or even if it is possible to
> >>> start a new dvm using adb (not forking from zygote process like am
> >>> command, maybe dvz or app_process) in non rooted devices?
> >>> 2. Is it possible to tell dalvikvm to skip the dex optimization part?
> >>> or to tell him that i already have one optimized
> >>>
> >>> Thanks for the help
> >>> Nir
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to
android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> 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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Using various parts of an image to select on. Possible?

2012-01-25 Thread Kostya Vasilyev
There is a way to intercept touch events sent to a view:

http://developer.android.com/reference/android/view/View.html#setOnTouchListener(android.view.View.OnTouchListener)

... and it should work with an ImageView and such.

I'd also consider writing your own view subclass and handling the UI
interaction completely within that view:

http://developer.android.com/reference/android/view/View.html#onTouchEvent(android.view.MotionEvent)

You could also subclass ViewGroup - or probably one of the layout classes,
such as FrameLayout, and then use this:

http://developer.android.com/reference/android/view/ViewGroup.html#onInterceptTouchEvent(android.view.MotionEvent)

... to direct events to this view or to enclosed views, if you wanted to do
it that way.

-- Kostya

25 января 2012 г. 22:08 пользователь darrinps  написал:

> OK, so this is a good one.
>
> I need the ability to allow an image to be re-sizable (pinch zoom for
> example) and scrollable (finger drag) yet still allow parts of that
> image to be pressed and depending on which part is pressed, have a
> different action take place.
>
> For example, suppose my image had four areas where each area (denoted
> by []) can be selected like this:
>
> [][]
> [][]
>
> If the user pinch zooms the thing it might look like this:
>
> [   ][   ]
> [   ][   ]
>
> I thought about breaking the image up into areas and using image view
> buttons but I am not so sure about scrolling the thing or zooming.
>
> So, is there any way to specify coordinates on an image and based on
> where the user presses know what area they touched? Of course this
> would need to be tracked and adjusted as they pan/zoom the thing.
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Using various parts of an image to select on. Possible?

2012-01-25 Thread darrinps
OK, so this is a good one.

I need the ability to allow an image to be re-sizable (pinch zoom for
example) and scrollable (finger drag) yet still allow parts of that
image to be pressed and depending on which part is pressed, have a
different action take place.

For example, suppose my image had four areas where each area (denoted
by []) can be selected like this:

[][]
[][]

If the user pinch zooms the thing it might look like this:

[   ][   ]
[   ][   ]

I thought about breaking the image up into areas and using image view
buttons but I am not so sure about scrolling the thing or zooming.

So, is there any way to specify coordinates on an image and based on
where the user presses know what area they touched? Of course this
would need to be tracked and adjusted as they pan/zoom the thing.

Thanks!

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


[android-developers] Re: android accelerometer to measure distance

2012-01-25 Thread TomL
http://en.wikipedia.org/wiki/Kinematics#Displacement 

Acceleration is delta velocity over delta time.  Velocity is delta position 
over delta time.  If you can accurately sample the acceleration values over 
a period of time, you could calculate the changes in velocity and therefore 
the overall change in position.

In practice, I don't think that smartphone accelerometers are anywhere near 
as accurate as you'd need to be able to do this.  If they were, smartphones 
would cost as much as missile guidance systems.

Tom

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

[android-developers] Bluetooth without UUID?

2012-01-25 Thread darrinps
I am working on an Android Bluetooth application to mimic one done on
Blackberry.

The Blackberry app connects to a Bluetooth server without issue.
My Android app OCCASIONALLY connects to the Bluetooth server (pairs
and discovers just fine every time)

I began to suspect the common UUID they were using on the server side
wasn't always what I was using (the server perhaps rotates it
somehow?) but when I asked the Blackberry person what UUID they were
using, the answer I got back was "We don't specify ANY UUID at all and
just use Serial Port Profile".

Well, it is my understanding that SPP is just another name for RFCOMM
which Android uses.

So, can anyone tell me why sometimes, without doing anything
differently (not bouncing Bluetooth, not bouncing the application,
etc.) I can sometimes connect and sometimes not?

Also, is there some obscurely documented way to connect like
Blackberry without specifying the UUID?

Thanks!

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


[android-developers] android accelerometer to measure distance

2012-01-25 Thread heri hahihu
How to use Android Accelerometer feature to measure the distance when
phone is moved from one hand to another? What is the best way to build
this kind of application .. help me

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


[android-developers] Querying settings.db

2012-01-25 Thread ramkumar pinninti
hi,

Using the following code i am updating "secure"  table in 
setting.db(/data/data/com.android.providers.settings/databases/settings.db)
Runtime runtime = Runtime.getRuntime();
Process p = runtime.exec("su");
DataOutputStream os = new 
DataOutputStream(p.getOutputStream());
String cmd = "chmod 777 
/data/data/com.android.providers.settings/databases/settings.db";
os.writeBytes(cmd + "\n"); 
cmd = "sqlite3  
/data/data/com.android.providers.settings/databases/settings.db";
os.writeBytes(cmd + "\n");
Thread.sleep(1*1000); 
//Disable airplane mode
cmd = "update system set value = 0 where name = 
'airplane_mode_on';";
os.writeBytes(cmd + "\n");
//Disable Wifi
cmd = "update secure set value = 0 where name = 'wifi_on';";
os.writeBytes(cmd + "\n");
//Enable internet settings
cmd = "update secure set value = 1 where name = 
'mobile_data';";
os.writeBytes(cmd + "\n"); 
//Enable Bluetooth settings off
cmd = "update secure set value = 0 where name = 
'bluetooth_on';";
os.writeBytes(cmd + "\n"); 
//Enable data roaming
cmd = "update secure set value = 1 where name = 
'data_roaming';";
os.writeBytes(cmd + "\n"); 
//Exit sqlite3
cmd = ".exit";
os.writeBytes(cmd + "\n");

My code is working on Android2.2 (LG Optimus P350).But when i run the sane 
code in Samsung galaxy Y(Android 2.3.6)
"secure" table is not udating with my new values.No exception displaye on 
LOGCAT .Please help me if any wrong with my code.
Thanks and Regards
P.Ramkumar.

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

Re: [android-developers] Re: Encoder???

2012-01-25 Thread skink


Muhammad UMER wrote:
> hi skink,
> I read the link that you have posted. In a blog describe the mdat 
> atoms that leave some spaces also not write the header. what is it, i haven't 
> studied about it. How can i write the header of the file and the mdat atom 
> spaces.
>
>
>

you have to figure it out by yourself

try googling

pskink

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


[android-developers] Re: javax.management

2012-01-25 Thread Jan Burse

Dear All,

I found the following substitute for what I needed
from javax.management. There is:

 void   onLowMemory()
 This is called when the overall system is running
 low on memory, and would like actively running process
 to try to tighten their belt.
 http://developer.android.com/reference/android/app/Application.html

And:

 public longthreshold   
 The threshold of availMem at which we consider memory to
 be low and start killing background services and other
 non-extraneous processes.

http://developer.android.com/reference/android/app/ActivityManager.MemoryInfo.html

There seem also to be more APIs since Level 14, for example
onTrimMemory in Application, but I will try level 10 for the
moment.

I also found SystemClock useful, but I am still missing
an API that would give me some statistics about how much
time spent in GC.

Best Regards


Jan Burse schrieb:

Mark Murphy schrieb:

You are missing the point. If I am understanding the documentation for
MemoryPoolMXBean, there cannot be "some other lib". I believe that you
will be needing to remove the ties to javax.management, not replace
them.


Since I only need the memory threshold functionality
I could easily implement the functionality in Android
by myself by polling Runtime.freeMemory() in a thread.
The later is available in Android.

But it would be more handy if there is some existing
lib or even an API in Android that I did not yet see.

Bye





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


[android-developers] Re: Application Object, Complex ArrayList's and memory?

2012-01-25 Thread Dancing Fingers
I think I found a gottcha for Developers of Ubuntu.  My son left his
Macbook at my house so I started using it for development.  The same
code that didn't work on Ubuntu 10.11 ran fine on the Mac.  The Mac
runs a lot faster even though the Linux box has 4 gigs of RAM.  May be
it's the JAVA implementation?
Chris

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


[android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread elDoudou
Thank you Kostya.

Yes, my intent is to invoke those methods from a worker background
thread.

You assume that I want to get i18n string to update the UI, but this
is not my exact use case. I need to get an i18n string, because I want
to prepare the computation of a string (imagine that the string
computation takes a lot of time, it may make sense, for instance),
which will eventually be used on a UI thread to update the display,
which is slightly different.

Your phone settings changes while the background thread is still
running example is a very well chosen use case, and I do not see how
the AsyncTask enables that properly neither.

Not to mention the fact that there is no synchronization mechanism
around the "Fragment.getActivity()": if I test its nullity, nothing
prevents it from being null in the if statement body. I cannot figure
out why the "Fragment.getText()/getString()/getResources()" methods
correct execution may need to depend on the fragment state. At least,
the "Fragment.getActivity()" method should throw an
"IllegalStateException" instead of "null" when the fragment has been
detached, or even better, a dedicated exception also used for the
previous methods.

I'm still investigating, on how to handle that properly...
Regards,
Édouard

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


RE: [android-developers] Re: Encoder???

2012-01-25 Thread Muhammad UMER

hi skink,
I read the link that you have posted. In a blog describe the mdat 
atoms that leave some spaces also not write the header. what is it, i haven't 
studied about it. How can i write the header of the file and the mdat atom 
spaces. 


Thanks



> Date: Wed, 25 Jan 2012 06:34:11 -0800
> Subject: Re: [android-developers] Re: Encoder???
> From: psk...@gmail.com
> To: android-developers@googlegroups.com
> 
> 
> 
> Muhammad UMER wrote:
> > hi skink,
> >   Sorry it was my mistake at object of InputStream, that is 'is 
> > ' but i was using 'in'. Now it's receive the data and create a video.3gp 
> > file but it's not a playable(corrupted). Now what can you suggest me, and 
> > Thanks a lot for your kind help.
> >
> 
> 
> now read again the link I already posted in that thread - this time
> read it caredully
> 
> pskinj
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Spinner example has no prompt

2012-01-25 Thread Kostya Vasilyev
Since you mentioned 4.0.3 and api level 15...

With Holo themes, spinners are no longer popup dialogs - they are dropdown
lists, so there is no title.

Adding a text label to the layout somewhere near the spinner should work.

-- Kostya

25 января 2012 г. 8:20 пользователь Ray Tayek  написал:

> At 07:07 PM 1/24/2012, you wrote:
>
>> At 02:21 AM 1/23/2012, you wrote:
>>
>>> At 07:29 PM 1/21/2012, Ray Tayek wrote:
>>>
 hi, newbie here. ...
 running the spinner example shows earth. the prompt is not visible 
 also, the spinner prompts in my project are not visible...

>>>
>> found  clue: http://groups.google.com/**group/android-developers/**
>> browse_thread/thread/**d93ce1ef583a2a29
>>
>
> more clues: more clues: http://stackoverflow.com/**
> questions/867518/how-to-make-**an-android-spinner-with-**
> initial-text-select-one
>
> has anyone seen a prompt in a spinner in without some special code using
> 4.0.3 spi level 15?
>
>
> thanks
>
>
>
> ---
> co-chair http://ocjug.org/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to 
> android-developers@**googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+**unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] custom ui widgets?

2012-01-25 Thread TreKing
2012/1/25 John Davis 

> I'm just trying to get a rough heading from the established guide before I
> head out into the wilderness.


I'd start here:  http://developer.android.com/search.html#q=layout
manager&t=5

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread Kostya Vasilyev
( responding back to the list )

Yes, that was my point.

Even if each individual framework method you're calling was be thread-safe
(which it may not be) , overall, your code sequence is not thread safe.

Mark already gave one suggestion.

Here is another:

Since you're talking about getting strings to update the UI, you won't be
needing them until doing that - calling textView.setText and such. That is
only safe to do from the UI thread.

With this in mind, postpone getting the strings to just before you need
them, on the UI thread, to avoid the issue of accessing Context altogether.

This most likely means that your background thread would need to return
some kind of "result" object that describes enough of the outcome of what
it was doing --

-- so that code on the UI thread can make intelligent decisions on what
exactly to present in the UI --

-- but that's probably a good thing anyway: abstract, clean separation of
work / UI code, etc.

Your idea with keeping a context reference for the duration of the worker
thread might also work, but I'm not sure it is safe for all cases - for
example, the user going into phone Settings and changing the language while
your worker thread is running.

-- Kostya

25 января 2012 г. 18:44 пользователь elDoudou  написал:

> Yes, Kostya,
>
> my intention is actually to access to the Android application context
> from a background worker thread. You are right, since the fragment
> state may change during the thread execution, it means that every time
> the "Fragment.getActivity()" is invoked, we need to check its not
> nullity. Since there is no locking mechanism around the
> "getActivity()" method, invoking "if (getActivity() != null) { do
> something }" is not safe, since the fragment may me detached during
> the if statement body, leading "Fragment.getActivity()" to return
> null.
>
> This leads me to think that, if I want to make sure that my Android
> context is accessible and reliable during a background thread, I
> should just create a local reference to it at the beginning of its
> execution, and not use the "getActivity()". This will however prevent
> the GC to garbage the activity as long as the worker thread is
> running...
>
> Not being able to safely invoke the "Fragment.getString()/getText()/
> getResources()" methods from a background worker thread initiated from
> a fragment, is really an issue, and from my point of view, is an
> architectural mistake. And what's more, those methods are marked as
> final, so no direct work-around is available. If someone can convince
> me that those methods should never be called from a background thread
> initiated from a fragment, and propose an elegant work-around
>
> Regards,
> Édouard

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

Re: [android-developers] custom ui widgets?

2012-01-25 Thread John Davis
Hello TreKing,

Yes, the diagonal placement might not work with the gridview, but I can
adjust my goal to fit the gridview.

Very true about many viable ways.  I'm just trying to get a rough heading
from the established guide before I head out into the wilderness.

John

On Wed, Jan 25, 2012 at 9:49 AM, TreKing  wrote:

> 2012/1/25 John Davis 
>
>> Possibly the solution to my problem is a custom component consisting of a
>> GridView with three textviews.
>>
>> Does that seem right to you?
>>
>
> Possibly. Your image to me looks like it would require a custom layout
> manager, but I haven't done that, so I can't say that will full certainty.
> Like most programming tasks, there are likely several viable ways to
> accomplish what you need.
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
John F. Davis

独树一帜

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

Re: [android-developers] custom ui widgets?

2012-01-25 Thread TreKing
2012/1/25 John Davis 

> Possibly the solution to my problem is a custom component consisting of a
> GridView with three textviews.
>
> Does that seem right to you?
>

Possibly. Your image to me looks like it would require a custom layout
manager, but I haven't done that, so I can't say that will full certainty.
Like most programming tasks, there are likely several viable ways to
accomplish what you need.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] custom ui widgets?

2012-01-25 Thread John Davis
Hello TreKing,

Thank you.  I'll look into that.  FWIW, I've gotten some other suggestions
off list.  It appears that I will need
to learn gridview.  Possibly the solution to my problem is a custom
component consisting of a GridView with three textviews.

Does that seem right to you?

John

On Wed, Jan 25, 2012 at 9:31 AM, TreKing  wrote:

> On Wed, Jan 25, 2012 at 7:54 AM, John Davis  wrote:
>
>> I don't know anything about custom UI usage.
>
> Any suggestions on what I should do?
>
>
> http://developer.android.com/guide/topics/ui/custom-components.html
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
John F. Davis

独树一帜

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

Re: [android-developers] Re: Encoder???

2012-01-25 Thread skink


Muhammad UMER wrote:
> hi skink,
>   Sorry it was my mistake at object of InputStream, that is 'is ' 
> but i was using 'in'. Now it's receive the data and create a video.3gp file 
> but it's not a playable(corrupted). Now what can you suggest me, and Thanks a 
> lot for your kind help.
>


now read again the link I already posted in that thread - this time
read it caredully

pskinj

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


Re: [android-developers] custom ui widgets?

2012-01-25 Thread TreKing
On Wed, Jan 25, 2012 at 7:54 AM, John Davis  wrote:

> I don't know anything about custom UI usage.

Any suggestions on what I should do?


http://developer.android.com/guide/topics/ui/custom-components.html

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread Mark Murphy
On Wed, Jan 25, 2012 at 9:06 AM, elDoudou  wrote:
> If you implement "Fragment.getContext()" the following way, I think
> that it works:

getView().getContext() may not return a context that is safe to use
from a background thread. It could easily be the last Activity
associated with that View, and that is not safe to be used from a
background thread.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread Kostya Vasilyev
Do you expect to run this code on a background worker thread?

If so, how are you ensuring that the UI thread won't change the fragment's
state while this code is running?

25 января 2012 г. 18:06 пользователь elDoudou  написал:

> Thank you Mark.
>
> If you implement "Fragment.getContext()" the following way, I think
> that it works:
>
> public final Fragment.getContext()
> {
>  if (isDetached() == true)
>  {
>if (getView() == null)
>{
>  throw new IllegalStateException("...");
>}
>   return getView().getContext()";
>  }
>  else
>  {
>return getActivity().getApplicationContext();
>  }
> }
>
> Which leads to me to the question: why Android developers did not
> expose such a method, which would prevent us from having to resort to
> the "getActivity()"...
>
> Regards,
> Édouard
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

RE: [android-developers] Re: Encoder???

2012-01-25 Thread Muhammad UMER

hi skink,
  Sorry it was my mistake at object of InputStream, that is 'is ' 
but i was using 'in'. Now it's receive the data and create a video.3gp file but 
it's not a playable(corrupted). Now what can you suggest me, and Thanks a lot 
for your kind help.

Thanks and Regards,
umer 




> Date: Wed, 25 Jan 2012 03:58:29 -0800
> Subject: Re: [android-developers] Re: Encoder???
> From: psk...@gmail.com
> To: android-developers@googlegroups.com
> 
> 
> 
> Muhammad UMER wrote:
> > hi skink,
> >   Now i have used inputstream but it give me Exeption (null) at 
> > while((bytesRead = is.read(buffer)) != -1) on server side.
> >
> > here server side code that i am using.
> >  try
> >  {
> > // create stream to Network
> >   InputStream in = clientSocket.getInputStream();
> >
> >// create stream to file
> >   OutputStream os = new FileOutputStream("video.3gp", true);
> >
> >   byte[] buffer = new byte[4096];
> > int bytesRead;
> > while((bytesRead = is.read(buffer)) != -1)
> >   {
> >
> >os.write(buffer, 0, bytesRead);
> >
> >
> >  }
> > is.close();
> > os.close();
> >   }
> >catch (Exception e)
> >{
> > System.out.println(e.getMessage());
> >}
> >
> >
> 
> what's stack trace? tried to debug it?
> 
> pskink
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread elDoudou
Thank you Mark.

If you implement "Fragment.getContext()" the following way, I think
that it works:

public final Fragment.getContext()
{
  if (isDetached() == true)
  {
if (getView() == null)
{
  throw new IllegalStateException("...");
}
   return getView().getContext()";
  }
  else
  {
return getActivity().getApplicationContext();
  }
}

Which leads to me to the question: why Android developers did not
expose such a method, which would prevent us from having to resort to
the "getActivity()"...

Regards,
Édouard

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


[android-developers] custom ui widgets?

2012-01-25 Thread John Davis
Hello

I have a good understanding of the basic ui api.  I can use TextViews and
layouts, but I don't know anything about custom UI usage.

I would like to build a UI which looks something like this:
http://s1258.photobucket.com/albums/ii540/netskink/?action=view¤t=ssicons.jpg

Possibly a component with three lines of text with two font sizes.  Any
suggestions on what I should do?

-- 
John F. Davis

独树一帜

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

Re: [android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread Mark Murphy
On Wed, Jan 25, 2012 at 8:44 AM, elDoudou  wrote:
> Yes sure, this is a way to address this issue. But if the i18n string
> I need to get depends on the result of a web service call, this means
> that I need to provide all i18n strings at AsyncTask build time.

Or, you do the lookup in onPostExecute().

> I think that this is not bad design to make the Android application
> context accessible from a background thread, isn't it?

You are welcome to pass in the Application object to the background
thread, if you think it will work. I have not tried it with string
resources, so I have no idea how reliable it may be in that role.

> I'm really try to understand the motivations which account for why the
> Android developers did not expose such a "Fragment.getContext()",
> instead of exposing "Fragment.getString()/getResources()/..."
> methods...

getContext() would be pointless, as there would be no guarantee that
the returned Context would be valid for a background thread.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


[android-developers] Re: "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread elDoudou
Thank you Mark.

Yes sure, this is a way to address this issue. But if the i18n string
I need to get depends on the result of a web service call, this means
that I need to provide all i18n strings at AsyncTask build time. And
if I need to use the "getString(int resourceId, ...)" form? In that
case, I have to check the "Fragment.isDetached()" method, before
attempting to use that i18n form, right?

I think that this is not bad design to make the Android application
context accessible from a background thread, isn't it?

I'm really try to understand the motivations which account for why the
Android developers did not expose such a "Fragment.getContext()",
instead of exposing "Fragment.getString()/getResources()/..."
methods...

Regards,
Édouard

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


Re: [android-developers] "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread Mark Murphy
On Wed, Jan 25, 2012 at 8:19 AM, elDoudou  wrote:
> As soon as a background thread attempts to invoke
> the "Fragment.getString(int resId)" while the fragment is not attached
> to its view, the caller thread gets an "IllegalStateException" with a
> message of the form "Fragment MyfragmentClass{X} not attached to
> Activity".

Never refer to a fragment or an activity from a background thread. For
example, if you use AsyncTask, pass your string into the task's
constructor or execute() method.

> Did someone solve this problem of detached thread
> accessing the i18n in an elegant and efficient way?

Yes, you pass the data into the thread.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


[android-developers] "IllegalStateException Fragment not attached to Activity": a challenging issue?

2012-01-25 Thread elDoudou
Hello.

With the Fragment API, the easy and straightforward way to access to
the i18n is to use the "Fragment.getString(int resId)" method.
Unfortunately, the implementation resorts to the underlying attached
Activity, which is only available between the
"Fragment.onAttach(Activity activity)" and the "Fragment.onDetach()"
methods life-cycle. As soon as a background thread attempts to invoke
the "Fragment.getString(int resId)" while the fragment is not attached
to its view, the caller thread gets an "IllegalStateException" with a
message of the form "Fragment MyfragmentClass{X} not attached to
Activity".

This involves that any worker thread which have been starting
executing a command when the fragment has been started, and which is
still being executing while the fragment has been detached (a typical
case is leaving the hosting activity), will need to check the
"Fragment.isDetached()" method, before attempting to access to the
i18n. One may claim that the background worker thread execution should
be interrupted as soon as the "Fragment.onDetach()" callback is
invoked, so as to get rid of the problem. But this leads to more code:
either to have a boolean somewhere to indicate whether the thread
should be still be running, or a test every time the "
"Fragment.getString()/getResources()/..." methods are invoked.

My question is: why not having exposed a "Fragment.getContext()"
method? A work-around, would be to define one, which returns
"getActivity().getApplicationContext()" as long as the fragment is
attached, and something like "getView().getContext()" in other cases.
But if the Android developers did not expose a "Fragment.getContext()"
method, coupled with a "private Context context" attribute, they must
have their reason. Is it to make the fragment more quickly garbage
collected, by reducing the amount of time when there is a double link
between between the fragment and its hosting activty?

To my opinion, accessing the Android context from a fragment or from
an activity should be done the same way (and this is actually the case
through the same for the "Activity/Fragment.getString()/
getResources()"), so as to ease porting activities to fragmented
activities. Did someone solve this problem of detached thread
accessing the i18n in an elegant and efficient way? What are your
thoughts about that issue?

Thank you for your time. Regards,
Édouard

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


[android-developers] Best Application Data Backup solution?

2012-01-25 Thread gcstang
What is the best solution to integrate backup, external to the device
for an Android application?

Ideally the solution will be cheap, integrate easily with an existing
application and will be seamless to the clients.

I know Google Backup is limited so most likely it will not work, but
there has to be other solutions.

Backup per client will be roughly 5-10MB in size.

Thank you in advance.

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


Re: [android-developers] how to get data from server

2012-01-25 Thread unicus unicus
Dear Aparna,
I have developed simple tutorial about how to use webservice in android.
please visit following website,

http://androidbasic-answer.blogspot.com/2012/01/access-webservice-from-android-device.html

-- 
*More info*,
http://androidbasic-answer.blogspot.com/

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

Re: [android-developers] Re: How I use Web Services in android.?

2012-01-25 Thread unicus unicus
Harpit,

I have developed sample tutorial.You can idea how to access webservice in
android.
please following link
http://androidbasic-answer.blogspot.com/2012/01/access-webservice-from-android-device.html
-- 
*More info*,
http://androidbasic-answer.blogspot.com/

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

Re: [android-developers] Re: Strange behavior with Theme.DeviceDefault.Light

2012-01-25 Thread Ricardo Amaral
It does seem to contradict but looking at *
res/values/themes_device_defaults.xml* on API Level 15 source (look here: 
http://pastebin.com/rj5LwgVf) we can see that both the *Theme.DeviceDefault*and 
*Theme.DeviceDefault.Light* inherit from *Theme.Holo* and *Theme.Holo.Ligh*t, 
respectively. But they both override some styles. For some reason these 
overrides (this is just my guess though) are messing up the Light theme and 
not the default one.

We can also see on...

Line 179:




Line 325:




There are no overrides and when I use this *Light.NoActionBar* theme, 
everything works as expected. To me it's not a problem because I use a 
library for the ActionBar, not the native one. But for people who does need 
the native one, this is not a good solution.

There's something really strange going on with ICS themes...

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

Re: [android-developers] Re: How I use Web Services in android.?

2012-01-25 Thread Mark Murphy
On Wed, Jan 25, 2012 at 7:28 AM, Harpreet Singh  wrote:
> 1. Where to write all these codes of SOAP (i read that it has to be
> written in xml file, then where to save this/these xml file(s) in
> Project [ either in layout, in assets or in values {where?}]).
> 2. What names should I use to save this file? (Is soap_service.xml is
> OK?)
> 3. Should the Soap Request & Soap Response be on same xml file or not.
> 4. Now How I implement this/these xml file(s) in Java Code.

Android does not have built-in SOAP support. Please ask your questions
of some group that offers SOAP for Android.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


[android-developers] Android Mapview Voice Navigation Sample

2012-01-25 Thread T.M.S.VIJAYKUMARR
Hi ,
Please check below link

http://iamvijayakumar.blogspot.com/2012/01/mapview-draw-drive-route-direction-with.html
-- 




-
Thanks & Regards,
T.M.S.VIJAYKUMARR
BloG:http://iamvijayakumar.blogspot.com/

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

[android-developers] Re: How I use Web Services in android.?

2012-01-25 Thread Harpreet Singh
Hello Sir,

What I really want is that::
Activity 1:: Login Page (asks for email address & access code).
Activity 2:: Application Form (a complete form to fill) then SUBMIT.

So right now I am at Activity 1, I want that when user fill email
address and access code, it check that from online running site
(http://www.premiere-concierge.com/services.aspx) using soap and give
the response regarding Login Successful or not.

If Login is successful, then it move to Activity 2 otherwise shows an
error( i am using textview to shows the error on Activity1.)

I am studying about SOAP, as I am new to this concept, never used any
web service before.
so the doubts came::

1. Where to write all these codes of SOAP (i read that it has to be
written in xml file, then where to save this/these xml file(s) in
Project [ either in layout, in assets or in values {where?}]).
2. What names should I use to save this file? (Is soap_service.xml is
OK?)
3. Should the Soap Request & Soap Response be on same xml file or not.
4. Now How I implement this/these xml file(s) in Java Code.

Examples, Samples, links... Anything preferred.

Sorry for all these silly questions but doubts have to be cleared.

Thanks.
Harpreet.
harry...@gmail.com




On Jan 25, 10:15 am, Shubhangi  wrote:
> hello I have used a web service created in .NET in android in my
> application.
> so please let me knw what exactly you want to do. so that i can send u demo
> example for this
>
> thank you
> regards
>
>
>
>
>
>
>
> On Wed, Jan 25, 2012 at 10:12 AM, Bhaumik Thaker  wrote:
> > u can refer stackoverflow for this it may help u a lot
>
> > On Tue, Jan 24, 2012 at 6:59 PM, Harpreet Singh wrote:
>
> >> Actually I have to develop the app in form that the user access id &
> >> pwd has to be checked from site and get the response.  User should
> >> always be on app, I dont have to take him to any website, he has to
> >> access everything on app. :)
>
> >> On Jan 24, 4:28 pm, unicus unicus  wrote:
> >> > ok then learn how to consume soap based website in android.
>
> >> > --
> >> > *More info*,http://androidbasic-answer.blogspot.com/
>
> >> > On Mon, Jan 23, 2012 at 7:18 PM, Harpreet Singh 
> >> wrote:
> >> > > Actually the website is developed in .NET, they are going to provide
> >> > > me WebServices information.
> >> > > I studied regarding web services on internet and going to develop it
> >> > > using ksoap2, wsdl and whatever it needs.
> >> > > Sorry actually I am new to this stuff.
> >> > > Please do suggest whatever you like, like::
> >> > > What concept should I use and all.
> >> > > Thanks.
>
> >> > > On Jan 22, 4:50 pm, unicus unicus  wrote:
> >> > > > Is your web service is soap based or simple servlet?.
>
> >> > > > On Fri, Jan 20, 2012 at 11:21 PM, TreKing 
> >> wrote:
> >> > > > > On Thu, Jan 19, 2012 at 6:39 AM, Harpreet Singh <
> >> harry...@gmail.com
> >> > > >wrote:
>
> >> > > > >> How can I communicate with the database which that site is using?
>
> >> > > > > Have the site developers provide you an api.
>
> >> ---
> >> > > --
> >> > > > > TreKing  -
> >> Chicago
> >> > > > > transit tracking app for Android-powered devices
>
> >> > > > >  --
> >> > > > > You received this message because you are subscribed to the Google
> >> > > > > Groups "Android Developers" group.
> >> > > > > To post to this group, send email to
> >> > > android-developers@googlegroups.com
> >> > > > > To unsubscribe from this group, send email to
> >> > > > > android-developers+unsubscr...@googlegroups.com
> >> > > > > 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
> >> android-developers@googlegroups.com
> >> > > To unsubscribe from this group, send email to
> >> > > android-developers+unsubscr...@googlegroups.com
> >> > > 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 android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Bhaumik Thaker
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://gr

Re: [android-developers] Re: android browser

2012-01-25 Thread Mark Murphy
On Tue, Jan 24, 2012 at 9:26 PM, cindy  wrote:
> Then what is the meaning of following news release:
>
> http://androidcommunity.com/android-web-browser-goes-open-source-chrome-incoming-20110823/

The meaning is that you are reading a blog post from a non-developer,
rather than reading the original WebKit mailing list post:

https://lists.webkit.org/pipermail/webkit-dev/2011-August/017738.html

> Dose it means the open source android browser will get better?

That is impossible to answer.

It also has nothing to do with this list, which is for building
Android applications with the SDK.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: braodcast to other application

2012-01-25 Thread unicus unicus
pls. check following link.
http://androidbasic-answer.blogspot.com/2012/01/broadcast-receiver-launch-application.html

-- 
*More info*,
http://androidbasic-answer.blogspot.com/

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

Re: [android-developers] Re: Encoder???

2012-01-25 Thread skink


Muhammad UMER wrote:
> hi skink,
>   Now i have used inputstream but it give me Exeption (null) at 
> while((bytesRead = is.read(buffer)) != -1) on server side.
>
> here server side code that i am using.
>  try
>  {
> // create stream to Network
>   InputStream in = clientSocket.getInputStream();
>
>// create stream to file
>   OutputStream os = new FileOutputStream("video.3gp", true);
>
>   byte[] buffer = new byte[4096];
> int bytesRead;
> while((bytesRead = is.read(buffer)) != -1)
>   {
>
>os.write(buffer, 0, bytesRead);
>
>
>  }
> is.close();
> os.close();
>   }
>catch (Exception e)
>{
> System.out.println(e.getMessage());
>}
>
>

what's stack trace? tried to debug it?

pskink

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


[android-developers] Re: Managing resources such as images, themes, colors.

2012-01-25 Thread skink


Anieeh wrote:
> Off-course Skink but all of sudden i cant change a platform, are you
> using Ubuntu or anything else and hows your developing platform, is it
> user friendly?, because i cant invest time to explore different
> platform my company wont give that much time.
>
> Thanks again.
>
>
>

what about this: 
http://en.wikipedia.org/wiki/Symbolic_link#Windows_7_.26_Vista_symbolic_link

pskink

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


Re: [android-developers] Re: Strange behavior with Theme.DeviceDefault.Light

2012-01-25 Thread Kostya Vasilyev
Normally I use @android:style/Theme.Holo.Light (and its dark counterpart),
and it works very well except for custom alert dialog content, but that's a
"known known" and there are ways to deal with that.

Just tried out @android:style/Theme.DeviceDefault.Light on my Galaxy Nexus
with 4.0.2 and the result is the same as you're seeing in the emulator - it
looks quite different from @android:style/Theme.Holo.Light, weird and
unreadable.

This seems to directly contradict the blog post you linked to above:

"Google's Nexus devices alias DeviceDefault to the unmodified Holo themes."

Is the Galaxy Nexus a Nexus device? Is it a Google device? Does anyone know?

-- Kostya

PS Another cute bug is that bringing up a context menu in an
ExpandableListView pushes the expandable view's content veritically off the
screen - so you have an unreadable context menu over an otherwise purely
white screen.

25 января 2012 г. 6:54 пользователь Ricardo Amaral  написал:

> No one else noticed this problem?
>
> Are you all using the default/dark theme?
>
> This isn't an issue for you guys?
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

RE: [android-developers] Re: Encoder???

2012-01-25 Thread Muhammad UMER

hi skink,
  Now i have used inputstream but it give me Exeption (null) at 
while((bytesRead = is.read(buffer)) != -1) on server side.

here server side code that i am using.
 try
 {
// create stream to Network
  InputStream in = clientSocket.getInputStream();

   // create stream to file
  OutputStream os = new FileOutputStream("video.3gp", true);

  byte[] buffer = new byte[4096];  
int bytesRead; 
while((bytesRead = is.read(buffer)) != -1)
  {

   os.write(buffer, 0, bytesRead);


 }
is.close();  
os.close(); 
  }
   catch (Exception e)
   {
System.out.println(e.getMessage());
   }

Regards.


> Date: Wed, 25 Jan 2012 01:47:56 -0800
> Subject: Re: [android-developers] Re: Encoder???
> From: psk...@gmail.com
> To: android-developers@googlegroups.com
> 
> 
> 
> Muhammad UMER wrote:
> > hi skink,
> >  Thanks for your reply, I am using server side code to receive 
> > each frame is perfect. but when i use this server for mediaRecorder it 
> > gives the invalid stream header: , i am using
> > ObjectInputStream to receive the data. on client side (android), i  am 
> > using the ParcelFileDescriptor.fromSocket(socket), is ParcelFileDescriptor 
> > send video in object form?
> >
> >  here is my server side code.
> >
> > try
> >{
> >  // create stream to Network
> >  ois = new ObjectInputStream(clientSocket.getInputStream());
> >
> >// create stream to file
> > FileOutputStream fos = new FileOutputStream("video.3gp", 
> > true);
> > ObjectOutputStream out = new ObjectOutputStream(fos);
> >
> >   while(true)
> >   {
> >
> >  // read data in object form from network
> > byte [] byt = (byte[]) ois.readObject();
> >
> >   // write data to file
> >  out.write(byt);
> >  out.flush();
> >  }
> > }
> > catch (Exception e)
> > {
> >   System.out.println(e.getMessage());
> >  }
> >
> >
> 
> 
> Dont use ObjectInputStream, just use InputStream
> 
> pskink
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Managing resources such as images, themes, colors.

2012-01-25 Thread Anieeh

Off-course Skink but all of sudden i cant change a platform, are you
using Ubuntu or anything else and hows your developing platform, is it
user friendly?, because i cant invest time to explore different
platform my company wont give that much time.

Thanks again.



On Jan 25, 3:12 pm, skink  wrote:
> Anieeh wrote:
> > Thanks for quick reply Skink but i am developing application on window
> > is there any way on that.
>
> no idea then, or wait, change your platdorm - win32 is not for real
> developement :)
>
> pskink

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


Re: [android-developers] Re: Existing joomla site in Android..

2012-01-25 Thread Daniel Drozdzewski
It is becoming off-topic...

You will have to use User-Agent detection on the server site (easily
done in PHP or anything else)  to return the appropriate version of
the page or use JS to redirect based on some properties of the browser
rendering the page.

First solution depends on User-Agent, which could be spoofed and is
not 100% watertight.

Second one, that I found (jQuery):

if($(window).width() < 480){
 window.location = "mobile.yoursite.com"
}

...is a bit rigid and assumes a lot about the screens that your page
is being rendered on. If you are limiting the content only because of
the screen resolution, then you are safe, but if you want to remove
say flash or some other file types, resolution is not the way to
detect the agent. Some phones have more pixels than some desktop
platforms.

Also, if it is only images that you are concerned with, you could use
adaptive images:

http://adaptive-images.com/


HTH,

Daniel







On 25 January 2012 09:43, sathyashrayan  wrote:
> Ok i am back with a new question.. If suppose i don't want some files to be
> loaded in the mobile device. But it should be loaded in desktop devices. If
> that is the case then what should be the solution?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Daniel Drozdzewski

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


[android-developers] Re: Managing resources such as images, themes, colors.

2012-01-25 Thread skink


Anieeh wrote:
> Thanks for quick reply Skink but i am developing application on window
> is there any way on that.
>

no idea then, or wait, change your platdorm - win32 is not for real
developement :)

pskink

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


[android-developers] Re: braodcast to other application

2012-01-25 Thread skink


ANKUR GOEL wrote:
> hi all
>
> how to send broadcast to other application

how to send broadcast?

context#sendBroadcast

pskink

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


[android-developers] Re: Managing resources such as images, themes, colors.

2012-01-25 Thread Anieeh

Thanks for quick reply Skink but i am developing application on window
is there any way on that.

Thanks and regards
 Anieeh


>
> on linux you could create symbolic link to your res folder - this is
> how i'd do it withiout any effort
>
> pskink

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


Re: [android-developers] Re: Encoder???

2012-01-25 Thread skink


Muhammad UMER wrote:
> hi skink,
>  Thanks for your reply, I am using server side code to receive 
> each frame is perfect. but when i use this server for mediaRecorder it gives 
> the invalid stream header: , i am using
> ObjectInputStream to receive the data. on client side (android), i  am using 
> the ParcelFileDescriptor.fromSocket(socket), is ParcelFileDescriptor send 
> video in object form?
>
>  here is my server side code.
>
> try
>{
>  // create stream to Network
>  ois = new ObjectInputStream(clientSocket.getInputStream());
>
>// create stream to file
> FileOutputStream fos = new FileOutputStream("video.3gp", 
> true);
> ObjectOutputStream out = new ObjectOutputStream(fos);
>
>   while(true)
>   {
>
>  // read data in object form from network
> byte [] byt = (byte[]) ois.readObject();
>
>   // write data to file
>  out.write(byt);
>  out.flush();
>  }
> }
> catch (Exception e)
> {
>   System.out.println(e.getMessage());
>  }
>
>


Dont use ObjectInputStream, just use InputStream

pskink

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


[android-developers] Re: Existing joomla site in Android..

2012-01-25 Thread sathyashrayan
Ok i am back with a new question.. If suppose i don't want some files to be 
loaded in the mobile device. But it should be loaded in desktop devices. If 
that is the case then what should be the solution?

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

Re: [android-developers] Disabled EditText is not working properly...?

2012-01-25 Thread unicus unicus
yes do set focusable false.

*More info*,
http://androidbasic-answer.blogspot.com/

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

RE: [android-developers] Re: Encoder???

2012-01-25 Thread Muhammad UMER

hi skink,
 Thanks for your reply, I am using server side code to receive each 
frame is perfect. but when i use this server for mediaRecorder it gives the 
invalid stream header: , i am using 
ObjectInputStream to receive the data. on client side (android), i  am using 
the ParcelFileDescriptor.fromSocket(socket), is ParcelFileDescriptor send video 
in object form? 

 here is my server side code.

try
   {
 // create stream to Network
 ois = new ObjectInputStream(clientSocket.getInputStream());

   // create stream to file
FileOutputStream fos = new FileOutputStream("video.3gp", true);
ObjectOutputStream out = new ObjectOutputStream(fos);

  while(true)
  {

 // read data in object form from network
byte [] byt = (byte[]) ois.readObject();

  // write data to file 
 out.write(byt);
 out.flush();
 }
}
catch (Exception e)
{
  System.out.println(e.getMessage());
 }


Thanks again,





> Date: Wed, 25 Jan 2012 00:17:28 -0800
> Subject: Re: [android-developers] Re: Encoder???
> From: psk...@gmail.com
> To: android-developers@googlegroups.com
>  
> 
> 
> Muhammad UMER wrote:
> > hi,
> > I go through this blog as you suggest,
> >
> >  
> > http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system
> >
> > guy, just told how to send from android on network but doesn't told how to 
> > receive it on PC server.
> >
> > Thanks and Regards
> > umer
> >
> >
> >
> 
> when you tried to send frame by frame as a Bitmap, did you have server
> side implemented?
> 
> now there should be no difference:  just write down to the file every
> bit if data you got from the android client
> 
> pskink
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: How to continously updating data from XML

2012-01-25 Thread Kristopher Micinski
You can look at some AsyncTask examples, but really, you should also
put some interest into this:

http://developer.android.com/guide/topics/fundamentals/loaders.html

This was introduced in 3.0 (which I haven't gotten as much of a chance
to play around with as I should have yet).

I think that Mark Murphy points out something to do <3.0, but I don't
remember at the moment.

AsyncTask should have examples, as well as a tutorial or two out there.

kris

On Wed, Jan 25, 2012 at 3:56 AM, Cheah Peng Huat  wrote:
> Thank you for your reply. Any example code i can refer to?
>
> On Jan 17, 10:27 am, Kristopher Micinski 
> wrote:
>> To go along with that, you can't directly update the UI from a random
>> thread, and you need to look into a Messenger, then do something like
>> fill the buffer in one thread (perhaps an AsyncTask?) and then 'poke'
>> the UI thread to update the view when you're done.
>>
>> kris
>>
>> On Mon, Jan 16, 2012 at 1:32 PM, Ricardo Santos
>>
>>
>>
>>  wrote:
>> > Why don't you make a thread that keeps checking for changes on the file,
>> > than, if a change is detected, you can update all the data... Or, create a
>> > button "update data now"...
>>
>> > On Fri, Jan 13, 2012 at 7:16 AM, Cheah Peng Huat 
>> > wrote:
>>
>> >> I have a problem trying to get dynamic data from XML. I have written
>> >> code to parse data from xml, but the data only update once when i
>> >> execute the application.
>> >> What i want is continuosly update of data.
>>
>> >> Can anyone help me on that? Thank you.
>>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "Android Developers" group.
>> >> To post to this group, send email to android-developers@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> android-developers+unsubscr...@googlegroups.com
>> >> 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 android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>>
>> - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to continously updating data from XML

2012-01-25 Thread Cheah Peng Huat
Thank you for your reply. Any example code i can refer to?

On Jan 17, 10:27 am, Kristopher Micinski 
wrote:
> To go along with that, you can't directly update the UI from a random
> thread, and you need to look into a Messenger, then do something like
> fill the buffer in one thread (perhaps an AsyncTask?) and then 'poke'
> the UI thread to update the view when you're done.
>
> kris
>
> On Mon, Jan 16, 2012 at 1:32 PM, Ricardo Santos
>
>
>
>  wrote:
> > Why don't you make a thread that keeps checking for changes on the file,
> > than, if a change is detected, you can update all the data... Or, create a
> > button "update data now"...
>
> > On Fri, Jan 13, 2012 at 7:16 AM, Cheah Peng Huat 
> > wrote:
>
> >> I have a problem trying to get dynamic data from XML. I have written
> >> code to parse data from xml, but the data only update once when i
> >> execute the application.
> >> What i want is continuosly update of data.
>
> >> Can anyone help me on that? Thank you.
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> 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 android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] Re: Android's CheckJNI: How to turn it off/on (on an emulator)? Documentation seems to be faulti

2012-01-25 Thread Jon Bonbon Jovi
I have asked the writer of the article in mention - and he as
generously answered it on stack overflow. So I will direct any one who
needs an answer for the issue there:
http://stackoverflow.com/questions/8911776/androids-checkjni-how-to-turn-it-off-on-on-an-emulator-documentation-seems

On Jan 19, 12:05 pm, Jon Bonbon Jovi 
wrote:
> I have spent some time examining the checkjni mode using an Android
> emulator with my app.
> Altough it is written 
> (inhttp://android-developers.blogspot.com/2011/11/jni-local-reference-ch...)
> that CheckJNI is on by default if debuggable="true" & targetSdkVersion
> is at least Ice Cream Sandwich (in the AndroidManifest.xml file) - The
> debug output dump of the CheckJNI (warning and errors) is still
> printed in the DDMS, even if i use a Gingerbread values and install it
> on a Gingerbread emulator.
>
> The only difference that i have found is that CheckJNI warnings on an
> Ice Cream Sandwich emulator (no matter what were the values in my
> AndroidManifest.xml file) will cause the app to crash with the
> respected warning - while they would only be printed in a Gingerbread
> emulator (I have tested a DeleteGlobalRef used on local reference to
> induce this warning).
>
> There are two non-informational logs that are printed in accordance to
> the AndroidManifest.xml - But the logs of the of the CheckJNI mode are
> not affected.
>
> Here are the logs -
>
> #On ICS emulator
> After Installing the app:
> 01-19 08:43:01.491: D/AndroidRuntime(32): CheckJNI is ON
>
> Loading the app:
> 01-19 08:32:26.617: D/dalvikvm(590): Not late-enabling CheckJNI
> (already on)
> (The last line is printed only when debuggable="true")
> 01-19 08:32:27.066: I/dalvikvm(590): Turning on JNI app bug
> workarounds for target SDK version 10...
> (The last line is printed only when targetSdkVersion=10)
>
> On error code (crash):
> 01-19 08:37:56.176: W/dalvikvm(651): JNI WARNING: DeleteGlobalRef on
> non-global 0x41339550 (type=1)
> ...
> 01-19 08:37:56.187: E/dalvikvm(651): VM aborting
> 01-19 08:37:56.187: A/libc(651): Fatal signal 11 (SIGSEGV) at
> 0xdeadd00d (code=1)
>
> #On Gingerbread:
>
> After Installing the app:
> 01-19 08:43:01.491: D/AndroidRuntime(32): CheckJNI is ON
>
> Loading the app:
> No important logs
>
> On error code (no crash):
> 01-19 08:45:20.079: W/dalvikvm(304): JNI: DeleteGlobalRef(0x40608718)
> failed to find entry (valid=1)
>
> So my question is how should i turn it on/off - and how should it
> affect the application (or the logs) differently when on?
>
> Thanks.
>
>

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


[android-developers] Re: Managing resources such as images, themes, colors.

2012-01-25 Thread skink


Anieeh wrote:
> Hi all
>  I have an application which has two client and for both client i
> have different resources i.e. there images are different, themes are
> different, fonts, styles, etc. But my code base is same for both. And
> i have used XMLs for all above described item.
> How can i manage images, themes, etc. by changing single config
> variable or some other way such that if i build an app for one client
> the other client's resource should not be added in APK.
>
>Can anyone know how to solve this problem please help me.
>
> Thanks in Advance
>   Anieeh

on linux you could create symbolic link to your res folder - this is
how i'd do it withiout any effort

pskink

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


Re: [android-developers] Re: Encoder???

2012-01-25 Thread skink


Muhammad UMER wrote:
> hi,
> I go through this blog as you suggest,
>
>  
> http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system
>
> guy, just told how to send from android on network but doesn't told how to 
> receive it on PC server.
>
> Thanks and Regards
> umer
>
>
>

when you tried to send frame by frame as a Bitmap, did you have server
side implemented?

now there should be no difference:  just write down to the file every
bit if data you got from the android client

pskink

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


[android-developers] Managing resources such as images, themes, colors.

2012-01-25 Thread Anieeh
Hi all
 I have an application which has two client and for both client i
have different resources i.e. there images are different, themes are
different, fonts, styles, etc. But my code base is same for both. And
i have used XMLs for all above described item.
How can i manage images, themes, etc. by changing single config
variable or some other way such that if i build an app for one client
the other client's resource should not be added in APK.

   Can anyone know how to solve this problem please help me.

Thanks in Advance
  Anieeh

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