[android-developers] Re: Extracting Video Frames with help of Native code

2011-12-21 Thread Rajeev Ranganathan
Am i cross posting in this forum??

On Dec 20, 11:40 pm, Rajeev Ranganathan  wrote:
> Hello all,
>
> I am developing a video conferancing Solution and want to test that on
> Nexus S.So far,i have been succesfull in streaming portion of the
> project.Now am stuck up with Application part,where we need to have
> both Camera preview and the peer view(video from the other peer). On
> Nexus S,it is impossible to have a Media recorder(through which i am
> streaming) showing the preview and a Media Player(which plays streamed
> video from the other peer) instance ,in the same window,because of
> some hardware limitation(only one overlay at a time).So, i have
> decided to Extract the video frames from the native and play it on the
> canvas,instead of letting the media player displaying it on the
> surfaceView.Does this approach makes any sense?If yes..please let me
> know how to extract the frames from the native and play it on Canvas.
>
> Thanks in Advance,
> -Rajeev

-- 
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 can i terminate message, after sending it

2011-12-21 Thread Anil Jagtap
Run like they do in Olympics!! Or Superman!! Or use Doraemon's
anywhere door!!
Get the receivers phone before he/she reads the message and delete it.
So simple!!


On Dec 20, 2:15 am, surabhi jain  wrote:
> Hi to all.
>
> Pls send me the source code
> or send the souce code link...
>
> Thanks you all.

-- 
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: Regarding play audio files using SoundPool class

2011-12-21 Thread kumar
Hi,

Thanks for your early reply Md.Fazla Rabbi.

* I have noted your point, in my app  I am  also using same as this,  but
here is  my requirement below*:
1. Once i click on a button, it should give me three different sounds one
after the other?  I have three music files, which should be run one after
the other as soon as the music of first complete, then second should start,
once the second is completed then third should start, and complete. How to
provide duration for each audio file?

*Here the problem is: *
In my app audio files are with different duration lengths.
How can I find the duration length and play each audio file?
If anyone knows soon for this, Please provide me.


Thanks & Regards,
Kumar Varma.





On Wed, Dec 21, 2011 at 10:59 AM, Md.Fazla Rabbi OPU <
md.fazlara...@gmail.com> wrote:

> Hi Verma,
> I have developed a app which holds some audio files(50 sound files). For
> my app  i have used *MediaPlayer* Object which play one sound file at a
> time. So for these 50 sound files i have stored sound files in 
> *res/raw*folder. Then in my code i use an array which holds the
> *id* of the sounds. After that i pass one sound file at a time to *
> MediaPlayer* Object using the index number of the array.
>
> This is something like this:
>
> *int [] sounds=new int[] {R.raw.sound1, R.raw.sound2, R.raw.sound3};
>
> MediaPlayer mp=new MediaPlayer( MyActivity.this, sounds[i] );///*Where *i*is 
> the index no. of the
> *sounds array
> mp.start();*
>
> Hope this will helpful for 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

Re: [android-developers] Re: Regarding play audio files using SoundPool class

2011-12-21 Thread Md.Fazla Rabbi OPU
Hi Kumar ,

Hope this link will be helpful for you.

*
http://stackoverflow.com/questions/3288513/how-to-play-audio-files-one-after-the-other
*

-- 
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: Pls send me android souce code....

2011-12-21 Thread common user
Mr. John Coryat

If u know the sample code link just share it are else sign out your gmail
account

On Tue, Dec 20, 2011 at 10:40 AM, John Coryat  wrote:

> Here you go:
>
> http://bit.ly/ucalcF
>
> --
> 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: Multiple On-Going Notification with progress bar keep changing position

2011-12-21 Thread Daniele Segato

On 12/18/2011 01:04 PM, Daniele Segato wrote:

Hi,

I have this exact same problem:
http://stackoverflow.com/questions/6189817/pin-notification-to-top-of-notification-area



some (more) confirmation I'm not alone would be good even if you have no 
solution :)


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] How can apps sending and receiving SMSs be visible on the market for the new Galaxy Tablets?

2011-12-21 Thread Terry
I have tried to ask this question elsewhere, but without getting any
answer I can use. So I try it here also.

I have some apps which send and receive SMSs. They are invisible for
the new Galaxy Tablets on the Market, and they cannot be dowloaded to
them.

WHY?

As e.g. the Galaxy Tablet 10.1, model GT-P7500 does NOT support audio
phone calls - but it DOES support sending and receiving SMSs, there
should be no problem. In fact, when I download these apps to the GT-
P7500  locally, they work as expected.

The Market however, sees the permissions to SEND_ and RECEIVE_SMS in
the Manifest file of the apps, and interprets this so as to require
hardware.telephony from the Galaxy Tabs. Which is does not seem to
support.

Any idea how to make a work-around for this problem?

Terry

-- 
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] App to help developers

2011-12-21 Thread Rafael Maas
https://market.android.com/details?id=br.com.dotfive.rankingme

Rankingme is an application to help developers track their applications on
the market. This is free and without advertising, I'm posting here to notmake
a profit but to help other developers to monitor their applications.

-- 
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 disable copy/paste in EditText

2011-12-21 Thread Yahel
I've just found the answer to that so I'll put it here for other
Googlers reference, but  as Mark said : It can be really user-hostile.
So you have to use this only in perfectly defined situations and be
sure you won't upset your users by implementing this.
 For example, in my app people can put comments on photographs. These
comments should be unique to keep the freshness and since the subject
of the app is prone to a lot of spam and, it allows me to stop a
spammer from just going on random pictures pasting the same comment
over and over again.
So here it goes. In your activity ad the following :
       @Overrideprotected void onCreateContextMenu(ContextMenu menu)
{   //super.onCreateContextMenu(menu); //Be sure to 
comment this line
or remove it completely.menu.clear();   }
Yahel

-- 
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: Pls send me android souce code....

2011-12-21 Thread Oli Wright
Gowtham.  John was making an entirely valid point there.  Ignoring the fact 
that the OP has posted this multiple times, this sort of question is more 
than easy to answer by searching for it.  This is behaviour advocated by 
the heading of this very group within the Google Groups interface. 
 Fostering an environment where the first activity from someone is to push 
their question out far and wide before they have done any of their own 
research would lead to a world where no one will be willing to volunteer 
time to assist people.

-- 
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: "Converting to string" warning in preferences

2011-12-21 Thread Zsolt Vasvari
Those messages are normal for non-String preferences. No clue why they
are even displayed.

On Dec 21, 5:53 am, Bret Foreman  wrote:
> I'm getting the following warnings in the logcat when I start my
> PreferencesActivity. It looks like I've got some data-type issues in
> my preferences.xml file. I'm guessing I could hunt in R.java somewhere
> but I took a look and nothing stands out. How do I interpret these
> warning messages to find the offending data types?
>
> 12-20 13:49:24.800: W/Resources(4133): Converting to string:
> TypedValue{t=0x10/d=0xa a=-1}
> 12-20 13:49:24.804: W/Resources(4133): Converting to string:
> TypedValue{t=0x10/d=0x0 a=-1}
> 12-20 13:49:24.808: W/Resources(4133): Converting to string:
> TypedValue{t=0x10/d=0x0 a=-1}

-- 
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] Need to ask ask question on Home key action on Emergency-Dialer

2011-12-21 Thread Mark Murphy
On Wed, Dec 21, 2011 at 2:52 AM, Sudeep Sharma  wrote:
>     Can anyone please help me knowing the reason for this behaviour.

Step #1: Visit http://source.android.com

Step #2: Click on the Community tab

Step #3: Find a Google Group that is relevant to your question, as
this group (pertaining to developing apps with the Android SDK) is
clearly not

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

Android Training in NYC: 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


[android-developers] To truncate call from activity

2011-12-21 Thread Test
Hi all,

I need a help, in my application I am detecting an outgoing call. For
a particular number I need to abort the outgoing call but before doing
this a user confirmation is also required.

Now the problem is we can't draw "Alert Dialog" in BroadCastRecevier.
To solve this issue I can call an activity having dialog theme but  if
user press "No" button of the Alert Dialog then the app can disconnect
the outgoing call but we haven't setResultData() method in the
activity.

Please tell me, how can I solve this problem? Any help will be
appreciated.

Thanks 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


[android-developers] Animation doesn't start again after several times of running

2011-12-21 Thread AlexBonel
Hello everyone. I make custom AdapterView which items should be
scrolled in two directions (from bottom left to top rigth and
conversely). During scrolling I use TranslateAnimation and
AlphaAnimation.

Here is the steps of scrolling:

1) Top (Bottom) View starts to hidem using AlphaAnimation
2) I start TranslateAnimation for every other items in loop and they
relocated to the new positions
3) At the end of AlphaAnimation I make border View invisible and
remove
4) At the end of TranslateAnimation every translated item get new
positions (using layout() calling)), I remove faded View from layout
and store it as convert in the buffer
5) Then I call adapter's getView() to get convertedView and position
it on the bottom (top) of my AdapterView, make this view visible and
start AlphaAnimation (fade in)

The problem is that this combination of animation works well with
deffinite values of their durations, but if I make duration values
smaller they stop working after third running.

Here are the code snippets for more clearness:

private void hideView(final View v, final boolean scrollDown) {
AlphaAnimation hiding = new AlphaAnimation(1.0f, 0.0f);
hiding.setDuration(700);

hiding.setAnimationListener(
new AnimationListener() {

@Override
public void onAnimationStart(Animation 
animation) {}

@Override
public void onAnimationRepeat(Animation 
animation) {}

@Override
public void onAnimationEnd(Animation animation) 
{
v.setVisibility(View.INVISIBLE);
}
}
);
v.startAnimation(hiding);
}

private void scrollDown() {
final View frontView = getChildAt(getChildCount() - 1);
hideView(frontView, true);

for(int i = getChildCount() - 2; i >= 0; i--) {
final View child = getChildAt(i);
final int newleft = child.getLeft() - 
mOffsetBetweenItems;
final int newTop = child.getTop() + mOffsetBetweenItems;
final int index = i;
TranslateAnimation scrollDown = new 
TranslateAnimation(0, -
mOffsetBetweenItems, 0, mOffsetBetweenItems);
scrollDown.setDuration(750);
scrollDown.setFillEnabled(true);
scrollDown.setAnimationListener(
new AnimationListener() {

@Override
public void onAnimationStart(Animation 
animation) {}

@Override
public void onAnimationRepeat(Animation 
animation) {}

@Override
public void onAnimationEnd(Animation 
animation) {
child.layout(newleft, newTop, 
newleft +
child.getMeasuredWidth(), newTop + child.getMeasuredHeight() );
if(index == 0) {
removeFromFront();
fillFromBehind();
}
}
}
);

child.startAnimation(scrollDown);
}
}

private void scrollUp() {
final View backView = getChildAt(0);
hideView(backView, true);

for(int i = 1; i < getChildCount(); i++) {
final View child = getChildAt(i);
final int newleft = child.getLeft() + 
mOffsetBetweenItems;
final int newTop = child.getTop() - mOffsetBetweenItems;
final int index = i;
TranslateAnimation scrollUp = new TranslateAnimation(0,
mOffsetBetweenItems, 0, -mOffsetBetweenItems);
scrollUp.setDuration(750);
scrollUp.setFillEnabled(true);
scrollUp.setAnimationListener(
new AnimationListener() {

@Override
public void onAnimationStart(Animation 
animation) {}

@Override
public void onAnimationRepeat(Animation 
animation) {}

@Override
public void onAnimationEnd(Animation 
animation) 

Re: [android-developers] App to help developers

2011-12-21 Thread TreKing
I was excited about this because it seemed like it let you do something
TrackMyApp doesn't: find and track apps without knowing the package name
(i.e., competitors). But *both* a key word and package are required? This
is rather silly, since if I have to know the package, that kind of narrows
down the search, doesn't it? So you render the other fields completely
useless, unless I'm missing something.

I tried with my main package and a known keyword and it did work. I tried
with the keyword "poontang" (which I don't have in my description - yet)
but it failed.

-
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: openOptionsMenu not working on Honeycomb device

2011-12-21 Thread Royston
Mark,
It would appear that ICS on Lareg has reverted to Honeycomb 3.0/3.1 
behaviour regarding ActionBar Menu. On Honeycomb 3.2 Large I have a fully 
functioning ActionBar with menu but on ICS 4.0.3 I get an ActionBar with no 
menu and no alternate access to menu.  I am assuming this is an emulator 
issue so not worrying overly but thought I would report findings.

Regards

Roy

-- 
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: Want to know about Thread life cycle

2011-12-21 Thread Streets Of Boston
Which is indeed a big problem and a cause of many crashes or force-closes.

If something needs to run in the background (as a Thread or a 
Task/AsyncTask/Future) and it will possibly survive the destruction of an 
activity:

   - Avoid making your (anonymous or inner) Thread/AsyncTask/etc sub-class 
   a non-static class. *Make it a static class*, so that it doesn't hold an 
   implicit 'this$0' pointer to your enclosing activity. 
   - *Tie it to a non-configuration 
instance*(getLastNonConfigurationInstance/onRetainNonConfigurationInstance) or 
to a 
   Fragment that is retained (setRetainInstance(true)).

Stop or just ignore the thread (depending or your Thread/Task/etc) when you 
activity is really dying (isFinishing() == true) or when the Fragment is 
destroyed entirely.

-- 
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] App to help developers

2011-12-21 Thread Rafael Maas
Hi, do you know another way to find your app without package name?
App´s idea is to find your ranking according to a keyword and
android market filters.
If you conducted a search and did not show a result this means that
when someone is searching for that keyword will not find your
application in the search result.


2011/12/21 TreKing 

> I was excited about this because it seemed like it let you do something
> TrackMyApp doesn't: find and track apps without knowing the package name
> (i.e., competitors). But *both* a key word and package are required? This
> is rather silly, since if I have to know the package, that kind of narrows
> down the search, doesn't it? So you render the other fields completely
> useless, unless I'm missing something.
>
> I tried with my main package and a known keyword and it did work. I tried
> with the keyword "poontang" (which I don't have in my description - yet)
> but it failed.
>
>
> -
> 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] App to help developers

2011-12-21 Thread TreKing
On Wed, Dec 21, 2011 at 9:20 AM, Rafael Maas  wrote:

> Hi, do you know another way to find your app without package name?
>

Yes, by searching for the title.


> App´s idea is to find your ranking according to a keyword and
> android market filters.
>

Yes, that's a great idea - but currently the app *requires* a package name,
rendering the other filters useless. What's the point of adding filters if
you *have to* input a package name that uniquely identifies a single app?


> If you conducted a search and did not show a result this means that
> when someone is searching for that keyword will not find your
> application in the search result.
>

On the Android Market I can search without entering a package name. In this
app, I could NOT conduct a search without also entering a package name.

If I'm missing something, please let me know - but right now if I leave the
package name field blank it pops up with a dialog that says that it's
required.

-
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] Incremental builds with ant - something wrong?

2011-12-21 Thread Kostya Vasilyev
Something seems to be wrong when touching a Java file and then doing
an incremental build with ant (i.e. without "ant clean").

My ant log is below.

Note how it says "Compiling 1 source file" - which is correct since a
Java file was changed - and then dex thinks there is "No new compiled
code" so the rest of the build process is skipped.

I verified that the compilation step produces an updated .class file
with a new timestamp.

Anyone else seeing this?

FWIW, I'm using Linux Mint (Debian), 64-bit, Android Tools 16,
Platform Tools 9 and 10 (tried both).


-compile:
[javac] Compiling 1 source file to
/home/kman/Android/proj-new/kmanWifiManagerDriver/bin/classes

-post-compile:

-obfuscate:

-dex:
  [dex] No new compiled code. No need to convert bytecode to dalvik format.

-crunch:
   [crunch] Crunching PNG Files in source dir:
/home/kman/Android/proj-new/kmanWifiManagerDriver/res
   [crunch] To destination dir:
/home/kman/Android/proj-new/kmanWifiManagerDriver/bin/res
   [crunch] Crunched 0 PNG files to update cache

-package-resources:
 [aapt] No changed resources or assets. kmanWifiManagerDriver.ap_
remains untouched

-package:
[apkbuilder] No changes. No need to create apk.

-- 
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] App to help developers

2011-12-21 Thread Rafael Maas
I think you did not understand the idea of the application.
The idea is you find the position that your application has when a
user searches
for a specific keyword and filters.
So you can discover if the description of your application is reaching the
audience you want.

 :D

2011/12/21 TreKing 

> On Wed, Dec 21, 2011 at 9:20 AM, Rafael Maas  wrote:
>
>> Hi, do you know another way to find your app without package name?
>>
>
> Yes, by searching for the title.
>
>
>> App´s idea is to find your ranking according to a keyword and
>> android market filters.
>>
>
> Yes, that's a great idea - but currently the app *requires* a package
> name, rendering the other filters useless. What's the point of adding
> filters if you *have to* input a package name that uniquely identifies a
> single app?
>
>
>> If you conducted a search and did not show a result this means that
>> when someone is searching for that keyword will not find your
>> application in the search result.
>>
>
> On the Android Market I can search without entering a package name. In
> this app, I could NOT conduct a search without also entering a package name.
>
> If I'm missing something, please let me know - but right now if I leave
> the package name field blank it pops up with a dialog that says that it's
> required.
>
>
> -
> 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

[android-developers] Re: ContentProvider Memory Leak

2011-12-21 Thread alexb
Why not storing the files on sdcard and passing only the names?

On Dec 19, 7:01 pm, Ankur Avlani  wrote:
> Hi All ,
>
> I am developing an application in WebView.  We serve android sd card images
> (average 3 MB per image) using ContentProvider in web view.  Please see the
> sample code below:
>
> public class LocalImageContentProvider extends ContentProvider {
>     @Override
>     public ParcelFileDescriptor openFile(Uri uri, String mode) throws
> FileNotFoundException {
>         try {
>             String path = uri.getPath();
>             File file = new File(path);
>
>             ParcelFileDescriptor parcel = ParcelFileDescriptor.open(file,
> ParcelFileDescriptor.MODE_READ_ONLY);
>             return parcel;
>         } catch (IOException e) {
>             // TODO Auto-generated catch block
>
>             e.printStackTrace();
>         }
>         return null;
>     }
>
> }
>
> This works fine for the first 50-60 images.  But when i start browsing more
> images, I see that the memory increaseing and Android starts closing
> background process to free up memory and finally the core process shutsdown
> and my app crashes.
>
> Question is, is there anything that I need to add in the above code to make
> is more robust and not occupy unnecessary memory.
>
> Thanks and regards
> Ankur

-- 
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] Mobile applications

2011-12-21 Thread Ali Rangwala
Hello All,

We're trying to brainstorm on Ideas for development of Mobile application -
be it on Android, BB or Iphone.

We have got some directions of Social Media and Education industries but
not able to drill down further on what kind of apps or concepts we should
take in particular and dwell on that further.

If anyone of you have similar ideas, thoughts and some details that you can
share, would be glad to listen from you.

Thanks for your time in advance & Looking forward to your comments.

BR,
Ali

-- 
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] Mobile applications

2011-12-21 Thread Marcelo Henrique
Hello Ali
how can we participate

2011/12/21 Ali Rangwala 

> Hello All,
>
> We're trying to brainstorm on Ideas for development of Mobile application
> - be it on Android, BB or Iphone.
>
> We have got some directions of Social Media and Education industries but
> not able to drill down further on what kind of apps or concepts we should
> take in particular and dwell on that further.
>
> If anyone of you have similar ideas, thoughts and some details that you
> can share, would be glad to listen from you.
>
> Thanks for your time in advance & Looking forward to your comments.
>
> BR,
> Ali
>
> --
> 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




-- 
  - Marcelo Henrique -
  "Se não puder se destacar pelo talento, vença pelo esforço." (Dave
Weinbaum)

-- 
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] Galaxy Nexus multitouch trouble

2011-12-21 Thread Jean-François Geyelin
I don't have a galaxy nexus, but I am receiving some complaints from the 
users, and engadget reported the problem:
http://www.engadget.com/2011/12/18/galaxy-nexus-users-reporting-touchscreen-trouble-lower-scores-i/

Do you have any idea what's causing this? Is it a problem in ICS, in the 
games, or with the Galaxy Nexus?

-- 
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] App to help developers

2011-12-21 Thread TreKing
On Wed, Dec 21, 2011 at 9:37 AM, Rafael Maas  wrote:

> I think you did not understand the idea of the application.
> The idea is you find the position that your application has when a user 
> searches
> for a specific keyword and filters.
> So you can discover if the description of your application is reaching the
> audience you want.


Oh, well then, yes, I misunderstood the purpose. I'd recommend you clarify
this on the app description, as it's not entirely clear.

-
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: Memory leaks when using bitmaps in android

2011-12-21 Thread shyama
Sorry for the large code. Thanks for your help. What I would like to
know is when to use weak references and if it is a good option while
using Bitmaps? If so how does it help?

/** This is the onPause function which releases the bitmap when the
imagebutton is clicked and gallery is displayed.
 protected void onPause() {
super.onPause();
Log.v(TAG,"on pause called");
Log.v(TAG,"Allocated memoryin on pause before recycle done:
"+Debug.getNativeHeapAllocatedSize());
choice.setImageBitmap(null);
if(bitmap != null)
{
Log.v(TAG,"bitmap is not null");
bitmap.recycle();
if(bitmap.isRecycled())
Log.v(TAG,"bitmap is recycled");
bitmap = null;
}


if(mutBitmap != null)
{
mutBitmap.recycle();
if(mutBitmap.isRecycled())
Log.v(TAG,"mutBitmap is recycled");
mutBitmap = null;
}
Log.v(TAG,"Allocated memory on pause after recycle done:  "
+Debug.getNativeHeapAllocatedSize());
}
@Override
protected void onResume() {
super.onResume();
choice.setImageBitmap(bitmap);
}
  /** call to Gallery Activity **/
@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
Log.v(TAG,"onActivityResult called before loading bitmap,
Allocated memory:  "+Debug.getNativeHeapAllocatedSize());


if (resultCode == RESULT_OK) {
photoUri  = intent.getData();


if (photoUri != null) {
try {
Log.v(TAG, "No crash 0");
   bitmap =
Bitmap.createScaledBitmap(MediaStore.Images.Media.getBitmap(this.getContentResolver(),
photoUri), 300, 400, true);
   Log.v(TAG, "No crash 1");
   Log.v(TAG,"onActivityResult called after
loading bitmap,  Allocated memory:
"+Debug.getNativeHeapAllocatedSize());
  choice.setImageBitmap(bitmap);

} catch (Exception e) {
Log.v(TAG, "Unable to load image at path: " +
photoUri.getPath());
}
}
}


}

-- 
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: ContentProvider Memory Leak

2011-12-21 Thread Duygu Kahraman
What do you want to do? Which picture you are storing? İf you can
explain,we can learn this is the correct way or not?

21 Aralık 2011 17:44 tarihinde alexb  yazdı:

> Why not storing the files on sdcard and passing only the names?
>
> On Dec 19, 7:01 pm, Ankur Avlani  wrote:
> > Hi All ,
> >
> > I am developing an application in WebView.  We serve android sd card
> images
> > (average 3 MB per image) using ContentProvider in web view.  Please see
> the
> > sample code below:
> >
> > public class LocalImageContentProvider extends ContentProvider {
> > @Override
> > public ParcelFileDescriptor openFile(Uri uri, String mode) throws
> > FileNotFoundException {
> > try {
> > String path = uri.getPath();
> > File file = new File(path);
> >
> > ParcelFileDescriptor parcel = ParcelFileDescriptor.open(file,
> > ParcelFileDescriptor.MODE_READ_ONLY);
> > return parcel;
> > } catch (IOException e) {
> > // TODO Auto-generated catch block
> >
> > e.printStackTrace();
> > }
> > return null;
> > }
> >
> > }
> >
> > This works fine for the first 50-60 images.  But when i start browsing
> more
> > images, I see that the memory increaseing and Android starts closing
> > background process to free up memory and finally the core process
> shutsdown
> > and my app crashes.
> >
> > Question is, is there anything that I need to add in the above code to
> make
> > is more robust and not occupy unnecessary memory.
> >
> > Thanks and regards
> > Ankur
>
> --
> 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




-- 
---
Duygu Kahraman

http://tr.linkedin.com/in/duygukahramann

-- 
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] Unable To Debug Android Junit Test In Eclipse

2011-12-21 Thread propovip
Hi All,

I have created a small calculator Android App and  I am able to
debug the Android application in eclipse. But when i write a Junit
Test for the application , I am able to run the Unit Test.. but i am
not able to debug.

Note :-  I have set the flag debuggable = true in the manifest.xml.
Any Clue why this occurs.

Thanks,
Muhil

-- 
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: ContentProvider Memory Leak

2011-12-21 Thread Ankur Avlani
I am developing an application which will help the user view the "local sd
card images" in web view.

Do we have some better way of displaying sd card images in web view?.

Thanks and regards,
Ankur

On Wed, Dec 21, 2011 at 8:47 AM, Duygu Kahraman
wrote:

> What do you want to do? Which picture you are storing? İf you can
> explain,we can learn this is the correct way or not?
>
> 21 Aralık 2011 17:44 tarihinde alexb  yazdı:
>
> Why not storing the files on sdcard and passing only the names?
>>
>> On Dec 19, 7:01 pm, Ankur Avlani  wrote:
>> > Hi All ,
>> >
>> > I am developing an application in WebView.  We serve android sd card
>> images
>> > (average 3 MB per image) using ContentProvider in web view.  Please see
>> the
>> > sample code below:
>> >
>> > public class LocalImageContentProvider extends ContentProvider {
>> > @Override
>> > public ParcelFileDescriptor openFile(Uri uri, String mode) throws
>> > FileNotFoundException {
>> > try {
>> > String path = uri.getPath();
>> > File file = new File(path);
>> >
>> > ParcelFileDescriptor parcel =
>> ParcelFileDescriptor.open(file,
>> > ParcelFileDescriptor.MODE_READ_ONLY);
>> > return parcel;
>> > } catch (IOException e) {
>> > // TODO Auto-generated catch block
>> >
>> > e.printStackTrace();
>> > }
>> > return null;
>> > }
>> >
>> > }
>> >
>> > This works fine for the first 50-60 images.  But when i start browsing
>> more
>> > images, I see that the memory increaseing and Android starts closing
>> > background process to free up memory and finally the core process
>> shutsdown
>> > and my app crashes.
>> >
>> > Question is, is there anything that I need to add in the above code to
>> make
>> > is more robust and not occupy unnecessary memory.
>> >
>> > Thanks and regards
>> > Ankur
>>
>> --
>> 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
>
>
>
>
> --
> ---
> Duygu Kahraman
>
> http://tr.linkedin.com/in/duygukahramann
>
>  --
> 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: "Converting to string" warning in preferences

2011-12-21 Thread Bret Foreman
OK, I'll ignore them. Probably some sort of legacy thing that nobody
has the time to correct.

-- 
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] External Television Display

2011-12-21 Thread Mark Perona
We have a requirement to connect a tablet to a television(external
display), show some content on the tablet and show different content
on the external display. A good example of this is the iPAD Netflix
app. If the iPad is used standalone, the video plays on the iPad and
the controls are overlaid on top of the video. But if the iPad is
connected to a television, the iPad display becomes control only and
the television plays the video.  Is it possible to develop such a
Android App.

-- 
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] External Television Display

2011-12-21 Thread Mark Murphy
On Wed, Dec 21, 2011 at 2:57 PM, Mark Perona  wrote:
> We have a requirement to connect a tablet to a television(external
> display), show some content on the tablet and show different content
> on the external display. A good example of this is the iPAD Netflix
> app. If the iPad is used standalone, the video plays on the iPad and
> the controls are overlaid on top of the video. But if the iPad is
> connected to a television, the iPad display becomes control only and
> the television plays the video.  Is it possible to develop such a
> Android App.

The Android SDK does not have a concept of an external display. What
you want is possible, if you build your own hardware, or at least your
own firmware. As of the moment you cannot accomplish it via an
ordinary SDK app, AFAIK.

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

Android Training in NYC: 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


[android-developers] getLastNonConfigurationInstace returns null if task is launched from a Spinner OnItemSelectedListener

2011-12-21 Thread Bluemercury
Hi all! so currently i have an activity that laucnhes an async task from 
inside the spinner onItemSelected method with the select int year value:

spinYears.setOnItemSelectedListener(
 new OnItemSelectedListener() {

@Override
public void onItemSelected(AdapterView item, View arg1,
int arg2, long arg3) {

yearSelected=(Integer) item.getSelectedItem(); 
doAsyncTask();

}

@Override
public void onNothingSelected(AdapterView arg0) {
// TODO Auto-generated method stub

}});

*here's the doAsyncTask method:*

/**
 * do asynctask for background work
 */
public void doAsyncTask(){
//get task back in case of rotation
task= (QuadrosMobileActivityTask)getLastNonConfigurationInstance();

if(task==null){ 
 task=new PeriodoFeriasDbAsyncTask(this);
((PeriodoFeriasDbAsyncTask)task).execute(yearSelected);
}else{
task.attach(this);
}
}


if i rotate the phone the task runs again, but if i put the doAsyncTask() 
method call outside of the listener it works as it should.any reason 
for this?why would calling a task inside the spinner listener be different?

regards,


-- 
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] Newbie Needing Layout help

2011-12-21 Thread javajoe
Can someone help me?
I have a wallpaper app that I am writing.
I coded it correctly. on my emulator the thumbnails are very small I
changed them in the code, in the ImageAdapter class.
I would like them a bit larger
Here is the code:
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.ImageView;

public class ImageAdapter extends BaseAdapter {
private Context mContext;


public ImageAdapter(Context c) {
mContext = c;
}

public int getCount() {
return mThumbIds.length;
}


public Object getItem(int position) {
return null;
}


public long getItemId(int position) {
return mFullSizeIds[position];
}
// create a new ImageView for each item referenced by the Adapter
public View getView(int position, View convertView, ViewGroup
parent) {
ImageView imageView;

if (convertView == null) {
imageView = new ImageView(mContext);
imageView.setLayoutParams(new GridView.LayoutParams(95,
95));
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
imageView.setPadding(5, 5, 5, 5);
} else {
imageView = (ImageView) convertView;
}

imageView.setImageResource(mThumbIds[position]);

return imageView;
}

// references to our images
private Integer[] mThumbIds = {
R.drawable.pic1,
R.drawable.pic2,
R.drawable.pic3,
R.drawable.pic4,
R.drawable.pic5,
R.drawable.pic6,
R.drawable.pic7,

};

private Integer[] mFullSizeIds = {
R.drawable.purposetwp1,
R.drawable.priority2,
R.drawable.prayer3,
R.drawable.wallpaper4,
R.drawable.wallpaper5,
R.drawable.wallpaper6,
R.drawable.wallpaper7,

};
}

Once i click on a selected thumbnail what happens next is that I get
an Emulator forced error but the Wallpaper come  up covering the whole
screen what can i do to make the selected image fit screen?
My target platform is 2.2
Here is my XML code


http://schemas.android.com/apk/res/android";
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"
/>
I have degugged and done everything possible can someone please help
me
my add is
joeblyth2...@gmail.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] getLastNonConfigurationInstace returns null if task is launched from a Spinner OnItemSelectedListener

2011-12-21 Thread Kostya Vasilyev
The value returned by getLastNonConfigurationInstance is cleared to
null very soon after you're supposed to have used it - onCreate.

So, don't delay, make it quick, grab it while you can, inside your
onCreate, and hold on to it.

( IIRC, the value doesn't stay around long enough to be retrieved in
onStart or onResume -- not to mention much later, when the UI is
completely up and running with your spinner )

-- Kostya

22 декабря 2011 г. 0:06 пользователь Bluemercury  написал:
> Hi all! so currently i have an activity that laucnhes an async task from
> inside the spinner onItemSelected method with the select int year value:
>
> spinYears.setOnItemSelectedListener(
> new OnItemSelectedListener() {
>
> @Override
> public void onItemSelected(AdapterView item, View arg1,
> int arg2, long arg3) {
>
> yearSelected=(Integer) item.getSelectedItem();
> doAsyncTask();
>
> }
>
> @Override
> public void onNothingSelected(AdapterView arg0) {
> // TODO Auto-generated method stub
>
> }});
>
> here's the doAsyncTask method:
>
> /**
> * do asynctask for background work
> */
> public void doAsyncTask(){
> //get task back in case of rotation
> task= (QuadrosMobileActivityTask)getLastNonConfigurationInstance();
>
> if(task==null){
> task=new PeriodoFeriasDbAsyncTask(this);
>                 ((PeriodoFeriasDbAsyncTask)task).execute(yearSelected);
> }else{
> task.attach(this);
> }
> }
>
>
> if i rotate the phone the task runs again, but if i put the doAsyncTask()
> method call outside of the listener it works as it should.any reason for
> this?why would calling a task inside the spinner listener be different?
>
> regards,
>
>
> --
> 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] Messages between App and Server without C2DM

2011-12-21 Thread Markus Unger
Hello!

My App send Http Request to Webservice in the Google App Engine. So I
need to inform some User, maybe that they receiver a new Message...
But I don't want to use C2DM.

Do's anybody know a good solution? Currently I check the Webservice
every 10 Seconds.. But I definitely not the best solution.

Thanks for help!

Regards, Markus

-- 
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: Incremental builds with ant - something wrong?

2011-12-21 Thread Kostya Vasilyev
To everyone who may be affected: turns out it's a recognized, and
already filed bug:

http://code.google.com/p/android/issues/detail?id=22948

( and I thought that it might be caused by mounting my file system
with "noatime"... )

-- Kostya

21 декабря 2011 г. 19:35 пользователь Kostya Vasilyev
 написал:
> Something seems to be wrong when touching a Java file and then doing
> an incremental build with ant (i.e. without "ant clean").
>
> My ant log is below.
>
> Note how it says "Compiling 1 source file" - which is correct since a
> Java file was changed - and then dex thinks there is "No new compiled
> code" so the rest of the build process is skipped.
>
> I verified that the compilation step produces an updated .class file
> with a new timestamp.
>
> Anyone else seeing this?
>
> FWIW, I'm using Linux Mint (Debian), 64-bit, Android Tools 16,
> Platform Tools 9 and 10 (tried both).
>
>
> -compile:
>    [javac] Compiling 1 source file to
> /home/kman/Android/proj-new/kmanWifiManagerDriver/bin/classes
>
> -post-compile:
>
> -obfuscate:
>
> -dex:
>      [dex] No new compiled code. No need to convert bytecode to dalvik format.
>
> -crunch:
>   [crunch] Crunching PNG Files in source dir:
> /home/kman/Android/proj-new/kmanWifiManagerDriver/res
>   [crunch] To destination dir:
> /home/kman/Android/proj-new/kmanWifiManagerDriver/bin/res
>   [crunch] Crunched 0 PNG files to update cache
>
> -package-resources:
>     [aapt] No changed resources or assets. kmanWifiManagerDriver.ap_
> remains untouched
>
> -package:
> [apkbuilder] No changes. No need to create apk.

-- 
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] Min SDK=3 not good in ICS?

2011-12-21 Thread Alain
Some of my current apps in the market have android:minSdkVersion=3.
They work fine in ICS when I downloaded them from the market.

Today as I was updating a couple of them, and testing on a Galaxy
Nexus running 4.0.1, the UI showed up as miniaturized window in the
bottom left of the screen. I then changed the minSdkVersion=4 and the
UI is back to normal, occupying the full screen.

Why does a minsdk = 3 break the app in ICS whereas minsdk=4 is OK?

-- 
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] Make own voice input method

2011-12-21 Thread Zwiebel
Hi!

I have decided, that I will try to start to make a new voice input
program, with I can input words in my own language (hungarian). But I
don't know how to start, because I haven't seen anything on the
internet about these things. Could you give me some advices of this,
please?

-- 
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] getLastNonConfigurationInstace returns null if task is launched from a Spinner OnItemSelectedListener

2011-12-21 Thread João Rossa
So basically you can not use the combination of
onRetainNonConfigurationInstance()/  getLastNonConfigurationInstance ()
with the task inside the spinner listenerbecause i wanted to aunch
tasks according to the option selected of the spinner

2011/12/21 Kostya Vasilyev 

> The value returned by getLastNonConfigurationInstance is cleared to
> null very soon after you're supposed to have used it - onCreate.
>
> So, don't delay, make it quick, grab it while you can, inside your
> onCreate, and hold on to it.
>
> ( IIRC, the value doesn't stay around long enough to be retrieved in
> onStart or onResume -- not to mention much later, when the UI is
> completely up and running with your spinner )
>
> -- Kostya
>
> 22 декабря 2011 г. 0:06 пользователь Bluemercury 
> написал:
> > Hi all! so currently i have an activity that laucnhes an async task from
> > inside the spinner onItemSelected method with the select int year value:
> >
> > spinYears.setOnItemSelectedListener(
> > new OnItemSelectedListener() {
> >
> > @Override
> > public void onItemSelected(AdapterView item, View arg1,
> > int arg2, long arg3) {
> >
> > yearSelected=(Integer) item.getSelectedItem();
> > doAsyncTask();
> >
> > }
> >
> > @Override
> > public void onNothingSelected(AdapterView arg0) {
> > // TODO Auto-generated method stub
> >
> > }});
> >
> > here's the doAsyncTask method:
> >
> > /**
> > * do asynctask for background work
> > */
> > public void doAsyncTask(){
> > //get task back in case of rotation
> > task= (QuadrosMobileActivityTask ?>)getLastNonConfigurationInstance();
> >
> > if(task==null){
> > task=new PeriodoFeriasDbAsyncTask(this);
> > ((PeriodoFeriasDbAsyncTask)task).execute(yearSelected);
> > }else{
> > task.attach(this);
> > }
> > }
> >
> >
> > if i rotate the phone the task runs again, but if i put the doAsyncTask()
> > method call outside of the listener it works as it should.any reason
> for
> > this?why would calling a task inside the spinner listener be different?
> >
> > regards,
> >
> >
> > --
> > 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] getLastNonConfigurationInstace returns null if task is launched from a Spinner OnItemSelectedListener

2011-12-21 Thread Kostya Vasilyev
The spinner has nothing to do with this, per se.

Get your exising task, if any, by calling getLast... *inside onCreate*.

22 декабря 2011 г. 2:19 пользователь João Rossa  написал:
> So basically you can not use the combination of
> onRetainNonConfigurationInstance()/  getLastNonConfigurationInstance () with
> the task inside the spinner listenerbecause i wanted to aunch tasks
> according to the option selected of the spinner
>
>
> 2011/12/21 Kostya Vasilyev 
>>
>> The value returned by getLastNonConfigurationInstance is cleared to
>> null very soon after you're supposed to have used it - onCreate.
>>
>> So, don't delay, make it quick, grab it while you can, inside your
>> onCreate, and hold on to it.
>>
>> ( IIRC, the value doesn't stay around long enough to be retrieved in
>> onStart or onResume -- not to mention much later, when the UI is
>> completely up and running with your spinner )
>>
>> -- Kostya
>>
>> 22 декабря 2011 г. 0:06 пользователь Bluemercury 
>> написал:
>> > Hi all! so currently i have an activity that laucnhes an async task from
>> > inside the spinner onItemSelected method with the select int year value:
>> >
>> > spinYears.setOnItemSelectedListener(
>> > new OnItemSelectedListener() {
>> >
>> > @Override
>> > public void onItemSelected(AdapterView item, View arg1,
>> > int arg2, long arg3) {
>> >
>> > yearSelected=(Integer) item.getSelectedItem();
>> > doAsyncTask();
>> >
>> > }
>> >
>> > @Override
>> > public void onNothingSelected(AdapterView arg0) {
>> > // TODO Auto-generated method stub
>> >
>> > }});
>> >
>> > here's the doAsyncTask method:
>> >
>> > /**
>> > * do asynctask for background work
>> > */
>> > public void doAsyncTask(){
>> > //get task back in case of rotation
>> > task= (QuadrosMobileActivityTask> > ?>)getLastNonConfigurationInstance();
>> >
>> > if(task==null){
>> > task=new PeriodoFeriasDbAsyncTask(this);
>> >                 ((PeriodoFeriasDbAsyncTask)task).execute(yearSelected);
>> > }else{
>> > task.attach(this);
>> > }
>> > }
>> >
>> >
>> > if i rotate the phone the task runs again, but if i put the
>> > doAsyncTask()
>> > method call outside of the listener it works as it should.any reason
>> > for
>> > this?why would calling a task inside the spinner listener be different?
>> >
>> > regards,
>> >
>> >
>> > --
>> > 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

-- 
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: Messages between App and Server without C2DM

2011-12-21 Thread Streets Of Boston
Every 10  seconds? That'll drain the battery quite quickly.
Why don't you want to use C2DM (or Urban Airship or other such 
technologies)?

But yes, without a server-push technology (like C2DM or Urban Airship), 
you're left with client-polling and you're doing that. Just don't do it 
every 10 seconds all the time

-- 
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: Messages between App and Server without C2DM

2011-12-21 Thread John Coryat
Any users of Urban Airship around here? 

It looks promising but what's the catch (besides cost)?

What's the mechanism behind this system?

-John Coryat

-- 
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] Make own voice input method

2011-12-21 Thread Jim Graham
On Wed, Dec 21, 2011 at 02:15:46PM -0800, Zwiebel wrote:

> I have decided, that I will try to start to make a new voice input
> program, with I can input words in my own language (hungarian). But I
> don't know how to start, because I haven't seen anything on the
> internet about these things. Could you give me some advices of this,
> please?

My suggestion:  wait for support for Hungarian to be added (if it isn't
already there).  You are getting into a far, far more complicated project
than you may realize.  I can't speak for Hungarian, but in English, at
least, there are words and phrases which can sound very, very similar,
and voice recognition software must take context into account.  Sadly,
there are also times when taking context into account will cause it to
fail.

A perfect example comes from a guest speaker at an ICA (International
Communications Association) conference I attended (I think it was the
same year, 1988, when I had a student paper on broadband packet switching
published in the ICA journal, but it might have been the following year).
Anyways, this particular guest speaker was doing a presentation on speech
recognition.  He told us about the various problems, such as different
speeds, accents, similar sounding words, etc., and then gave us a little
example

He said, or we THOUGHT he said, "Do you know how to recognize speech?"
He said this fairly quickly, and there was no real separation between
words.  As we're all looking around, wondering what on earth he meant,
and thinking, "Of COURSE we know how to recognize speech!", he stood
there, just watching us (no doubt with a big grin).  He finally spoke up
and said, "Now, you may THINK I said, do you know how to RECOGNIZE
SPEECH.  Well, you're all wrong.  I said, do you know how to WRECK A NICE
BEACH." [empasis his, all spoken slowly and clearly]  When he said that,
you could almost see the little cartoon-like light bulbs lighting up over
everyone's heads, as our understanding of just how complicated it really
is took a major leap forward.  We all took his words in context with the
topic of the presentation, and our brains all got it completely wrong.

So keep that in mind if you really plan on starting this.  I'm not
saying you won't or can't succeed; I'm just saying that it's not as
simple as you might expect, and that you need to take concerns such
as this into account.  Best of luck if you do go forward with it.

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)  | 1) "Smoking habanero powder helps defeat that
< Running FreeBSD 7.0 >   |off taste' quite nicely."
spooky1...@gmail.com  | 2) "I figure a couple bong hits of [habanero]
ICBM/Hurr.: / 30.44406N   |powder would defeat just about anything!"
| 86.59909W--seen in Chile-Heads list

Android Apps Listing at http://www.jstrack.org/barcodes.html

-- 
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] getLastNonConfigurationInstace returns null if task is launched from a Spinner OnItemSelectedListener

2011-12-21 Thread João Rossa
But if i want to launch a task based on the spinner value how do you that
without calling the task in the itemlistener?

regards,

On Wed, Dec 21, 2011 at 10:34 PM, Kostya Vasilyev wrote:

> The spinner has nothing to do with this, per se.
>
> Get your exising task, if any, by calling getLast... *inside onCreate*.
>
> 22 декабря 2011 г. 2:19 пользователь João Rossa 
> написал:
> > So basically you can not use the combination of
> > onRetainNonConfigurationInstance()/  getLastNonConfigurationInstance ()
> with
> > the task inside the spinner listenerbecause i wanted to aunch tasks
> > according to the option selected of the spinner
> >
> >
> > 2011/12/21 Kostya Vasilyev 
> >>
> >> The value returned by getLastNonConfigurationInstance is cleared to
> >> null very soon after you're supposed to have used it - onCreate.
> >>
> >> So, don't delay, make it quick, grab it while you can, inside your
> >> onCreate, and hold on to it.
> >>
> >> ( IIRC, the value doesn't stay around long enough to be retrieved in
> >> onStart or onResume -- not to mention much later, when the UI is
> >> completely up and running with your spinner )
> >>
> >> -- Kostya
> >>
> >> 22 декабря 2011 г. 0:06 пользователь Bluemercury 
> >> написал:
> >> > Hi all! so currently i have an activity that laucnhes an async task
> from
> >> > inside the spinner onItemSelected method with the select int year
> value:
> >> >
> >> > spinYears.setOnItemSelectedListener(
> >> > new OnItemSelectedListener() {
> >> >
> >> > @Override
> >> > public void onItemSelected(AdapterView item, View arg1,
> >> > int arg2, long arg3) {
> >> >
> >> > yearSelected=(Integer) item.getSelectedItem();
> >> > doAsyncTask();
> >> >
> >> > }
> >> >
> >> > @Override
> >> > public void onNothingSelected(AdapterView arg0) {
> >> > // TODO Auto-generated method stub
> >> >
> >> > }});
> >> >
> >> > here's the doAsyncTask method:
> >> >
> >> > /**
> >> > * do asynctask for background work
> >> > */
> >> > public void doAsyncTask(){
> >> > //get task back in case of rotation
> >> > task= (QuadrosMobileActivityTask >> > ?>)getLastNonConfigurationInstance();
> >> >
> >> > if(task==null){
> >> > task=new PeriodoFeriasDbAsyncTask(this);
> >> >
>   ((PeriodoFeriasDbAsyncTask)task).execute(yearSelected);
> >> > }else{
> >> > task.attach(this);
> >> > }
> >> > }
> >> >
> >> >
> >> > if i rotate the phone the task runs again, but if i put the
> >> > doAsyncTask()
> >> > method call outside of the listener it works as it should.any
> reason
> >> > for
> >> > this?why would calling a task inside the spinner listener be
> different?
> >> >
> >> > regards,
> >> >
> >> >
> >> > --
> >> > 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
>
> --
> 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] getLastNonConfigurationInstace returns null if task is launched from a Spinner OnItemSelectedListener

2011-12-21 Thread Kostya Vasilyev
You can launch the task any place you like, just don't expect to be able to
check if one already exists by calling getLast... (sorry, I'm not typing
that again) anywhere but in onCreate.

So: call getLast in onCreate, save the value someplace, and then you'll
have a way of checking if you need to launch a new task or wait for an
existing one to complete.
22.12.2011 3:18 пользователь "João Rossa"  написал:

> But if i want to launch a task based on the spinner value how do you that
> without calling the task in the itemlistener?
>
> regards,
>
> On Wed, Dec 21, 2011 at 10:34 PM, Kostya Vasilyev wrote:
>
>> The spinner has nothing to do with this, per se.
>>
>> Get your exising task, if any, by calling getLast... *inside onCreate*.
>>
>> 22 декабря 2011 г. 2:19 пользователь João Rossa 
>> написал:
>> > So basically you can not use the combination of
>> > onRetainNonConfigurationInstance()/  getLastNonConfigurationInstance ()
>> with
>> > the task inside the spinner listenerbecause i wanted to aunch tasks
>> > according to the option selected of the spinner
>> >
>> >
>> > 2011/12/21 Kostya Vasilyev 
>> >>
>> >> The value returned by getLastNonConfigurationInstance is cleared to
>> >> null very soon after you're supposed to have used it - onCreate.
>> >>
>> >> So, don't delay, make it quick, grab it while you can, inside your
>> >> onCreate, and hold on to it.
>> >>
>> >> ( IIRC, the value doesn't stay around long enough to be retrieved in
>> >> onStart or onResume -- not to mention much later, when the UI is
>> >> completely up and running with your spinner )
>> >>
>> >> -- Kostya
>> >>
>> >> 22 декабря 2011 г. 0:06 пользователь Bluemercury > >
>> >> написал:
>> >> > Hi all! so currently i have an activity that laucnhes an async task
>> from
>> >> > inside the spinner onItemSelected method with the select int year
>> value:
>> >> >
>> >> > spinYears.setOnItemSelectedListener(
>> >> > new OnItemSelectedListener() {
>> >> >
>> >> > @Override
>> >> > public void onItemSelected(AdapterView item, View arg1,
>> >> > int arg2, long arg3) {
>> >> >
>> >> > yearSelected=(Integer) item.getSelectedItem();
>> >> > doAsyncTask();
>> >> >
>> >> > }
>> >> >
>> >> > @Override
>> >> > public void onNothingSelected(AdapterView arg0) {
>> >> > // TODO Auto-generated method stub
>> >> >
>> >> > }});
>> >> >
>> >> > here's the doAsyncTask method:
>> >> >
>> >> > /**
>> >> > * do asynctask for background work
>> >> > */
>> >> > public void doAsyncTask(){
>> >> > //get task back in case of rotation
>> >> > task= (QuadrosMobileActivityTask> >> > ?>)getLastNonConfigurationInstance();
>> >> >
>> >> > if(task==null){
>> >> > task=new PeriodoFeriasDbAsyncTask(this);
>> >> >
>>   ((PeriodoFeriasDbAsyncTask)task).execute(yearSelected);
>> >> > }else{
>> >> > task.attach(this);
>> >> > }
>> >> > }
>> >> >
>> >> >
>> >> > if i rotate the phone the task runs again, but if i put the
>> >> > doAsyncTask()
>> >> > method call outside of the listener it works as it should.any
>> reason
>> >> > for
>> >> > this?why would calling a task inside the spinner listener be
>> different?
>> >> >
>> >> > regards,
>> >> >
>> >> >
>> >> > --
>> >> > 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
>>
>> --
>> 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@googleg

[android-developers] Re: Messages between App and Server without C2DM

2011-12-21 Thread Streets Of Boston
What I understand from their web-site is that they'll use C2DM when it's 
available on the device (depending on OS version and C2DM availability on 
it).
For 'basic users' this is the only option, though, it seems.
For 'enterprise users' (starting at $199 p/month), they implement their own 
system "Android Helium". I guess it is much like C2DM but home-grown by UA.

-- 
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: Messages between App and Server without C2DM

2011-12-21 Thread Kostya Vasilyev
Not an airship user, but...

How about just keeping a network connection to your server open, with the
server sending down events as they occur?

The device can then avoid polling and go to sleep, and will be waken up
when new data arrives.

You'd need some sort of keep alive logic, gracefully restart when network
connectivity changes, and most likely make it look like an http exchange
(or an IMAP IDLE session) to make firewalls and NATs happy.

Um, I think that's how c2dm works, more our less, or at least the Google
Talk part on the device... Except they call events "tickets"...
22.12.2011 3:01 пользователь "John Coryat"  написал:

> Any users of Urban Airship around here?
>
> It looks promising but what's the catch (besides cost)?
>
> What's the mechanism behind this system?
>
> -John Coryat
>
> --
> 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] getLastNonConfigurationInstace returns null if task is launched from a Spinner OnItemSelectedListener

2011-12-21 Thread João Rossa
Ok, so if you had a spinner where each option would be used as a parameter
to an async task but you didnt want to repeat that same async task after
rotating what would be best approach?

regards,

On Wed, Dec 21, 2011 at 11:24 PM, Kostya Vasilyev wrote:

> You can launch the task any place you like, just don't expect to be able
> to check if one already exists by calling getLast... (sorry, I'm not typing
> that again) anywhere but in onCreate.
>
> So: call getLast in onCreate, save the value someplace, and then you'll
> have a way of checking if you need to launch a new task or wait for an
> existing one to complete.
> 22.12.2011 3:18 пользователь "João Rossa"  написал:
>
> But if i want to launch a task based on the spinner value how do you that
>> without calling the task in the itemlistener?
>>
>> regards,
>>
>> On Wed, Dec 21, 2011 at 10:34 PM, Kostya Vasilyev wrote:
>>
>>> The spinner has nothing to do with this, per se.
>>>
>>> Get your exising task, if any, by calling getLast... *inside onCreate*.
>>>
>>> 22 декабря 2011 г. 2:19 пользователь João Rossa 
>>> написал:
>>> > So basically you can not use the combination of
>>> > onRetainNonConfigurationInstance()/
>>>  getLastNonConfigurationInstance () with
>>> > the task inside the spinner listenerbecause i wanted to aunch tasks
>>> > according to the option selected of the spinner
>>> >
>>> >
>>> > 2011/12/21 Kostya Vasilyev 
>>> >>
>>> >> The value returned by getLastNonConfigurationInstance is cleared to
>>> >> null very soon after you're supposed to have used it - onCreate.
>>> >>
>>> >> So, don't delay, make it quick, grab it while you can, inside your
>>> >> onCreate, and hold on to it.
>>> >>
>>> >> ( IIRC, the value doesn't stay around long enough to be retrieved in
>>> >> onStart or onResume -- not to mention much later, when the UI is
>>> >> completely up and running with your spinner )
>>> >>
>>> >> -- Kostya
>>> >>
>>> >> 22 декабря 2011 г. 0:06 пользователь Bluemercury <
>>> joao.ro...@gmail.com>
>>> >> написал:
>>> >> > Hi all! so currently i have an activity that laucnhes an async task
>>> from
>>> >> > inside the spinner onItemSelected method with the select int year
>>> value:
>>> >> >
>>> >> > spinYears.setOnItemSelectedListener(
>>> >> > new OnItemSelectedListener() {
>>> >> >
>>> >> > @Override
>>> >> > public void onItemSelected(AdapterView item, View arg1,
>>> >> > int arg2, long arg3) {
>>> >> >
>>> >> > yearSelected=(Integer) item.getSelectedItem();
>>> >> > doAsyncTask();
>>> >> >
>>> >> > }
>>> >> >
>>> >> > @Override
>>> >> > public void onNothingSelected(AdapterView arg0) {
>>> >> > // TODO Auto-generated method stub
>>> >> >
>>> >> > }});
>>> >> >
>>> >> > here's the doAsyncTask method:
>>> >> >
>>> >> > /**
>>> >> > * do asynctask for background work
>>> >> > */
>>> >> > public void doAsyncTask(){
>>> >> > //get task back in case of rotation
>>> >> > task= (QuadrosMobileActivityTask>> >> > ?>)getLastNonConfigurationInstance();
>>> >> >
>>> >> > if(task==null){
>>> >> > task=new PeriodoFeriasDbAsyncTask(this);
>>> >> >
>>>   ((PeriodoFeriasDbAsyncTask)task).execute(yearSelected);
>>> >> > }else{
>>> >> > task.attach(this);
>>> >> > }
>>> >> > }
>>> >> >
>>> >> >
>>> >> > if i rotate the phone the task runs again, but if i put the
>>> >> > doAsyncTask()
>>> >> > method call outside of the listener it works as it should.any
>>> reason
>>> >> > for
>>> >> > this?why would calling a task inside the spinner listener be
>>> different?
>>> >> >
>>> >> > regards,
>>> >> >
>>> >> >
>>> >> > --
>>> >> > 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
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to

Re: [android-developers] Re: Messages between App and Server without C2DM

2011-12-21 Thread Streets Of Boston
Yes, that basically it. That's what C2DM (and probably UA) does as well.
However, if there is only one such pipeline on your phone (e.g. one C2DM 
service) instead of multiple (one for each app with its own solution), 
it'll be better for the battery overall. 

-- 
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] getLastNonConfigurationInstace returns null if task is launched from a Spinner OnItemSelectedListener

2011-12-21 Thread Kostya Vasilyev
To represent multiple tasks, I'd use any suitable data structure (hash map,
sparse array, plain java array, etc.)

I'd then carry this entire data structure across configuration changes,
making sure to get it in onCreate.
 22.12.2011 3:35 пользователь "João Rossa"  написал:

> Ok, so if you had a spinner where each option would be used as a parameter
> to an async task but you didnt want to repeat that same async task after
> rotating what would be best approach?
>
> regards,
>
> On Wed, Dec 21, 2011 at 11:24 PM, Kostya Vasilyev wrote:
>
>> You can launch the task any place you like, just don't expect to be able
>> to check if one already exists by calling getLast... (sorry, I'm not typing
>> that again) anywhere but in onCreate.
>>
>> So: call getLast in onCreate, save the value someplace, and then you'll
>> have a way of checking if you need to launch a new task or wait for an
>> existing one to complete.
>> 22.12.2011 3:18 пользователь "João Rossa"  написал:
>>
>> But if i want to launch a task based on the spinner value how do you that
>>> without calling the task in the itemlistener?
>>>
>>> regards,
>>>
>>> On Wed, Dec 21, 2011 at 10:34 PM, Kostya Vasilyev wrote:
>>>
 The spinner has nothing to do with this, per se.

 Get your exising task, if any, by calling getLast... *inside onCreate*.

 22 декабря 2011 г. 2:19 пользователь João Rossa 
 написал:
 > So basically you can not use the combination of
 > onRetainNonConfigurationInstance()/
  getLastNonConfigurationInstance () with
 > the task inside the spinner listenerbecause i wanted to aunch
 tasks
 > according to the option selected of the spinner
 >
 >
 > 2011/12/21 Kostya Vasilyev 
 >>
 >> The value returned by getLastNonConfigurationInstance is cleared to
 >> null very soon after you're supposed to have used it - onCreate.
 >>
 >> So, don't delay, make it quick, grab it while you can, inside your
 >> onCreate, and hold on to it.
 >>
 >> ( IIRC, the value doesn't stay around long enough to be retrieved in
 >> onStart or onResume -- not to mention much later, when the UI is
 >> completely up and running with your spinner )
 >>
 >> -- Kostya
 >>
 >> 22 декабря 2011 г. 0:06 пользователь Bluemercury <
 joao.ro...@gmail.com>
 >> написал:
 >> > Hi all! so currently i have an activity that laucnhes an async
 task from
 >> > inside the spinner onItemSelected method with the select int year
 value:
 >> >
 >> > spinYears.setOnItemSelectedListener(
 >> > new OnItemSelectedListener() {
 >> >
 >> > @Override
 >> > public void onItemSelected(AdapterView item, View arg1,
 >> > int arg2, long arg3) {
 >> >
 >> > yearSelected=(Integer) item.getSelectedItem();
 >> > doAsyncTask();
 >> >
 >> > }
 >> >
 >> > @Override
 >> > public void onNothingSelected(AdapterView arg0) {
 >> > // TODO Auto-generated method stub
 >> >
 >> > }});
 >> >
 >> > here's the doAsyncTask method:
 >> >
 >> > /**
 >> > * do asynctask for background work
 >> > */
 >> > public void doAsyncTask(){
 >> > //get task back in case of rotation
 >> > task= (QuadrosMobileActivityTask>>> >> > ?>)getLastNonConfigurationInstance();
 >> >
 >> > if(task==null){
 >> > task=new PeriodoFeriasDbAsyncTask(this);
 >> >
   ((PeriodoFeriasDbAsyncTask)task).execute(yearSelected);
 >> > }else{
 >> > task.attach(this);
 >> > }
 >> > }
 >> >
 >> >
 >> > if i rotate the phone the task runs again, but if i put the
 >> > doAsyncTask()
 >> > method call outside of the listener it works as it should.any
 reason
 >> > for
 >> > this?why would calling a task inside the spinner listener be
 different?
 >> >
 >> > regards,
 >> >
 >> >
 >> > --
 >> > 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 ema

[android-developers] ADT 16.0.1 and library dependencies problems (Conversion to Dalvik format failed with error 1)

2011-12-21 Thread Viktor Bresan
Anyone?

The problem is not fixed with the latest ADT release v16.0.1

Viktor.


On Dec 14, 5:31 pm, Viktor Bresan  wrote:
> Anyone?
>
> The problem is not fixed with the latest ADT release v16.0.0
>
> Viktor.

-- 
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: Messages between App and Server without C2DM

2011-12-21 Thread Kostya Vasilyev
That depends on the load: for very light or very heavy loads the difference
should be quite small.

Reconnecting after connectivity changes is expensive, especially over ssl,
but that is driven by connectivity manager broadcasts, and so should be
more our less in sync even for multiple phone side consumers.
22.12.2011 3:41 пользователь "Streets Of Boston" 
написал:

> Yes, that basically it. That's what C2DM (and probably UA) does as well.
> However, if there is only one such pipeline on your phone (e.g. one C2DM
> service) instead of multiple (one for each app with its own solution),
> it'll be better for the battery overall.
>
> --
> 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] getLastNonConfigurationInstace returns null if task is launched from a Spinner OnItemSelectedListener

2011-12-21 Thread João Rossa
Well only on task is launched but the spinner option value selected is used
as a parameter to the async task

On Wed, Dec 21, 2011 at 11:42 PM, Kostya Vasilyev wrote:

> To represent multiple tasks, I'd use any suitable data structure (hash
> map, sparse array, plain java array, etc.)
>
> I'd then carry this entire data structure across configuration changes,
> making sure to get it in onCreate.
>  22.12.2011 3:35 пользователь "João Rossa"  написал:
>
> Ok, so if you had a spinner where each option would be used as a parameter
>> to an async task but you didnt want to repeat that same async task after
>> rotating what would be best approach?
>>
>> regards,
>>
>> On Wed, Dec 21, 2011 at 11:24 PM, Kostya Vasilyev wrote:
>>
>>> You can launch the task any place you like, just don't expect to be able
>>> to check if one already exists by calling getLast... (sorry, I'm not typing
>>> that again) anywhere but in onCreate.
>>>
>>> So: call getLast in onCreate, save the value someplace, and then you'll
>>> have a way of checking if you need to launch a new task or wait for an
>>> existing one to complete.
>>> 22.12.2011 3:18 пользователь "João Rossa" 
>>> написал:
>>>
>>> But if i want to launch a task based on the spinner value how do you
 that without calling the task in the itemlistener?

 regards,

 On Wed, Dec 21, 2011 at 10:34 PM, Kostya Vasilyev 
 wrote:

> The spinner has nothing to do with this, per se.
>
> Get your exising task, if any, by calling getLast... *inside onCreate*.
>
> 22 декабря 2011 г. 2:19 пользователь João Rossa 
> написал:
> > So basically you can not use the combination of
> > onRetainNonConfigurationInstance()/
>  getLastNonConfigurationInstance () with
> > the task inside the spinner listenerbecause i wanted to aunch
> tasks
> > according to the option selected of the spinner
> >
> >
> > 2011/12/21 Kostya Vasilyev 
> >>
> >> The value returned by getLastNonConfigurationInstance is cleared to
> >> null very soon after you're supposed to have used it - onCreate.
> >>
> >> So, don't delay, make it quick, grab it while you can, inside your
> >> onCreate, and hold on to it.
> >>
> >> ( IIRC, the value doesn't stay around long enough to be retrieved in
> >> onStart or onResume -- not to mention much later, when the UI is
> >> completely up and running with your spinner )
> >>
> >> -- Kostya
> >>
> >> 22 декабря 2011 г. 0:06 пользователь Bluemercury <
> joao.ro...@gmail.com>
> >> написал:
> >> > Hi all! so currently i have an activity that laucnhes an async
> task from
> >> > inside the spinner onItemSelected method with the select int year
> value:
> >> >
> >> > spinYears.setOnItemSelectedListener(
> >> > new OnItemSelectedListener() {
> >> >
> >> > @Override
> >> > public void onItemSelected(AdapterView item, View arg1,
> >> > int arg2, long arg3) {
> >> >
> >> > yearSelected=(Integer) item.getSelectedItem();
> >> > doAsyncTask();
> >> >
> >> > }
> >> >
> >> > @Override
> >> > public void onNothingSelected(AdapterView arg0) {
> >> > // TODO Auto-generated method stub
> >> >
> >> > }});
> >> >
> >> > here's the doAsyncTask method:
> >> >
> >> > /**
> >> > * do asynctask for background work
> >> > */
> >> > public void doAsyncTask(){
> >> > //get task back in case of rotation
> >> > task= (QuadrosMobileActivityTask >> > ?>)getLastNonConfigurationInstance();
> >> >
> >> > if(task==null){
> >> > task=new PeriodoFeriasDbAsyncTask(this);
> >> >
>   ((PeriodoFeriasDbAsyncTask)task).execute(yearSelected);
> >> > }else{
> >> > task.attach(this);
> >> > }
> >> > }
> >> >
> >> >
> >> > if i rotate the phone the task runs again, but if i put the
> >> > doAsyncTask()
> >> > method call outside of the listener it works as it should.any
> reason
> >> > for
> >> > this?why would calling a task inside the spinner listener be
> different?
> >> >
> >> > regards,
> >> >
> >> >
> >> > --
> >> > 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-developer

[android-developers] Re: Edit device owner information programmatically

2011-12-21 Thread j4velin
if someone is interested in the solution:
it's not writable as it's in settings.secure, but readable with
"Settings.Secure.getString(getActivity().getContentResolver(),
Settings.Secure.LOCK_SCREEN_OWNER_INFO);"

On 10 Dez., 01:55, j4velin  wrote:
> As since Honeycomb there is a deviceownerinformationfield, I would
> like to know if that's programmatically accessible somehow

-- 
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] [SOLVED] Real Multi touch in Android - Going Open Source!!!

2011-12-21 Thread lbendlin
he moved it to WP

http://asimmittal.net/wp/?page_id=52

-- 
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] Trouble dismissing custom dialog

2011-12-21 Thread Alex Oh
I have two buttons in an activity ("Add" and "Edit") that open up a
dialog. Initially, the dialog dismisses fine if I open up the dialog
using the Add button. However, once I press the edit button (dialog
opens up, dismisses fine) and click on the Add button, the dialog no
longer closes when the "Done" or "Cancel" button for the dialog shows
up. I've tried putting in a try/catch but their are no problems.
Stepped through with debugger and when it hits pcDialog.dismiss(), it
executes, but the dialog never closes.

private Dialog addPCDialog()
{
pcDialog = new Dialog( this );

pcDialog.setContentView( R.layout.party_createpc );
pcDialog.setTitle( "Add PC" );


Button createDoneBtn =
( Button ) pcDialog.findViewById( R.id.createPCDone );
Button cancelCreateBtn =
( Button ) pcDialog.findViewById( R.id.createPCCancel );

createDoneBtn.setOnClickListener(
new View.OnClickListener()
{
@Override
public void onClick(View v) {
try {
if ( !editMode ) {
setPCStats( 
false );

party.addMember( character );
adapter.add( 
character );
}
else if ( editMode ) {
setPCStats( 
true );
party.RemovePC( 
character.getCharName() );

party.addMember( character );
}
setStates( 
STATE.DONE_ADD_BUTTON );
pcDialog.dismiss();

adapter.notifyDataSetChanged();
}
catch( Exception e ) {
Toast.makeText( 
PCM_EditParty.this, "Exception",

Toast.LENGTH_SHORT ).show();
}
}
});

cancelCreateBtn.setOnClickListener(
new View.OnClickListener()
{
@Override
public void onClick(View v)
{
pcDialog.dismiss();
setStates( 
STATE.CANCEL_ADD_BUTTON );
}
});
return pcDialog;
}

-- 
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] SoundPool

2011-12-21 Thread bob
Why would you use SoundPool for an Android game sound effects instead
of MediaPlayer?

-- 
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] SoundPool

2011-12-21 Thread Christopher Van Kirk

Is that a joke?

On 12/22/2011 10:14 AM, bob wrote:

Why would you use SoundPool for an Android game sound effects instead
of MediaPlayer?



--
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] In-app product localization

2011-12-21 Thread dozy
I have localized my in-app product descriptions to Spanish,
Portuguese, and English. English is the default language for my
application. What determines the language that will show up in the
Android market when one of my users goes to purchase something? I am
seeing the descriptions in Portuguese despite my phone's locale being
set to English or Spanish.

-- 
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] Same problem

2011-12-21 Thread Yaron Recher
Did you find a 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


[android-developers] Setting that reboots phone if no activity

2011-12-21 Thread Matt
Hi there, my phone reboots in Recovery mode after about 2 minutes, I
was told by the device developer that this is because of a default
flag setting. I cannot find any reference to such a setting in the
android source code. I'm hoping to get some help as to the setting to
set. 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


[android-developers] simulate hte speed for amdroid phones

2011-12-21 Thread Shabnaz
hi
  Iam trying to develop an app for accident detection and notification
system.

  For tat I need to get the speed and acceleration of the mobile
phione equpped with android

  how do I simulate ht espeed of the phone using the emulator because
the mibile phone does not physically change its location

-- 
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 devices supporting OpenGL ES 2.0 (at least through NDK) as of September 2010

2011-12-21 Thread yc
There are surprisingly few benchmarks for recent Android devices -- also, I 
am surprised that the iPad 2 is the only one with OpenGL 2 benchmark 5 star 
ratio? 

-- 
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] Accelerometer Real-Time high frequency sampling

2011-12-21 Thread Yaron
I want to sample the Accelerometer and GPS Sensors as fast as
possible.
I know GPS maximal frequency is 1 Hz, but the Accelerometer suppose to
have much higher frequency.
I dont want to wait for event of the Accelerometer- I want to sample
it by myself as fast as possible. how can I do it?
Setting timer of milliseconds wont do the work since as I understood
when the system is overloaded the interrupt wont happen at the exact
needed time (sleepage).
I need a timer/interrupt that can be as precise as possible.
Thanks,
Yaron

-- 
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] Corrupted pictures from camera

2011-12-21 Thread Dmitri Hrapof
Hello!

As mentioned here:
http://stackoverflow.com/q/8466757/1092612

and here
http://stackoverflow.com/q/6967723/1092612

(and I think I've seen this kind of problem on stackoverflow at least
once more)

there is a problem taking pictures programmatically on some devices. I
believe Camera/Picture example by Mark Murphy is written correctly (at
least it follows Google documentation). What then?
Do offending phones have some private camera interface?

Sincerely yours,
Dmitri

-- 
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 with same size in all the mobile

2011-12-21 Thread Tushar Lal
int dp = 2;final float scale =
getResources().getDisplayMetrics().density;int dip = (int) (dp * scale
+ 0.5f);

Use this dip to declare size of your U.I. components & the size of
that U.I. components will remain same in all android based phone.
eg:

Button button = new Button();
button.setWidth(20*dip);

Hope this was the answer you were looking for...

Regards:
Tushar
On Dec 19, 11:15 pm, lbendlin  wrote:
> define "same size". Do you mean inches, pixels, or something in between?

-- 
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: SDK 4, R15, where is the navigation button?

2011-12-21 Thread Kang Lu
I guess this may solve your 
problem. https://plus.google.com/109385828142935151413/posts/FqJ5oT2xWjm

-- 
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 replace GLSurfaceView with TextureView in Android Ice Cream Sandwich?

2011-12-21 Thread Brad Grimm
Thanks for the post, it has been really helpful.

But say I want to draw on top of a SurfaceTexture that is connected to
a Camera via setPreviewTexture. I can get the SurfaceTexture by a
SurfaceTextureListener. But if I just try to use
eglCreateWindowSurface & eglMakeCurrent it fails due to the surface
already being connected.
1) Is it possible to draw on this surface at all? Or does binding it
to the camera make it impossible to do that.
2) If it isn't possible. Can the surface be used (or copied) quickly
to an OpenGL texture and used in a separate surface? If so how?
3) If not, what would be the fastest way to get the camera preview out
of a SurfaceTexture and into OpenGL?
P.S. - I too followed suit and posted to StackOverflow:
http://stackoverflow.com/questions/8582090/possible-to-draw-on-surfacetexture-attached-to-camera
On Nov 23, 11:45 am, plafayette  wrote:
> Thanks for the quick response Romain and the sample code! Will give it
> a try.
>
> On Nov 23, 12:17 pm, Romain Guy  wrote:
>
>
>
>
>
>
>
> > GLSurfaceView handles GL setup for you, whichTextureViewwill not do. A
> >TextureViewcan be used as the native window when you create an EGL
> > surface. Here is an example (the interesting part is the call
> > to eglCreateWindowSurface()):
>
> >     @Override
> >     public void onSurfaceTextureAvailable(SurfaceTexture surface, int
> > width, int height) {
> >         mRenderThread = new RenderThread(getResources(), surface);
> >         mRenderThread.start();
> >     }
>
> >     private static class RenderThread extends Thread {
> >         private static final String LOG_TAG = "GLTextureView";
>
> >         static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
> >         static final int EGL_OPENGL_ES2_BIT = 4;
>
> >         private volatile boolean mFinished;
>
> >         private final Resources mResources;
> >         private final SurfaceTexture mSurface;
>
> >         private EGL10 mEgl;
> >         private EGLDisplay mEglDisplay;
> >         private EGLConfig mEglConfig;
> >         private EGLContext mEglContext;
> >         private EGLSurface mEglSurface;
> >         private GL mGL;
>
> >         RenderThread(Resources resources, SurfaceTexture surface) {
> >             mResources = resources;
> >             mSurface = surface;
> >         }
>
> >         private static final String sSimpleVS =
> >                 "attribute vec4 position;\n" +
> >                 "attribute vec2 texCoords;\n" +
> >                 "varying vec2 outTexCoords;\n" +
> >                 "\nvoid main(void) {\n" +
> >                 "    outTexCoords = texCoords;\n" +
> >                 "    gl_Position = position;\n" +
> >                 "}\n\n";
> >         private static final String sSimpleFS =
> >                 "precision mediump float;\n\n" +
> >                 "varying vec2 outTexCoords;\n" +
> >                 "uniform sampler2D texture;\n" +
> >                 "\nvoid main(void) {\n" +
> >                 "    gl_FragColor = texture2D(texture, outTexCoords);\n" +
> >                 "}\n\n";
>
> >         private static final int FLOAT_SIZE_BYTES = 4;
> >         private static final int TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 *
> > FLOAT_SIZE_BYTES;
> >         private static final int TRIANGLE_VERTICES_DATA_POS_OFFSET = 0;
> >         private static final int TRIANGLE_VERTICES_DATA_UV_OFFSET = 3;
> >         private final float[] mTriangleVerticesData = {
> >                 // X, Y, Z, U, V
> >                 -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
> >                  1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
> >                 -1.0f,  1.0f, 0.0f, 0.0f, 1.0f,
> >                  1.0f,  1.0f, 0.0f, 1.0f, 1.0f,
> >         };
>
> >         @Override
> >         public void run() {
> >             initGL();
>
> >             FloatBuffer triangleVertices =
> > ByteBuffer.allocateDirect(mTriangleVerticesData.length
> >                     *
> > FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();
> >             triangleVertices.put(mTriangleVerticesData).position(0);
>
> >             int texture = loadTexture(R.drawable.large_photo);
> >             int program = buildProgram(sSimpleVS, sSimpleFS);
>
> >             int attribPosition = glGetAttribLocation(program, "position");
> >             checkGlError();
>
> >             int attribTexCoords = glGetAttribLocation(program, "texCoords");
> >             checkGlError();
>
> >             int uniformTexture = glGetUniformLocation(program, "texture");
> >             checkGlError();
>
> >             glBindTexture(GL_TEXTURE_2D, texture);
> >             checkGlError();
>
> >             glUseProgram(program);
> >             checkGlError();
>
> >             glEnableVertexAttribArray(attribPosition);
> >             checkGlError();
>
> >             glEnableVertexAttribArray(attribTexCoords);
> >             checkGlError();
>
> >             glUniform1i(uniformTexture, texture);
> >             checkGlError();
>
> >             while (!mFinished) 

[android-developers] About 'libskiagl.so' on Android 3.2

2011-12-21 Thread song xiang
Hi,everyone!
My app get a error when run on Android 3.2 and force to clase, I find
the reason is no 'libskiagl.so' in System/lib,but this file is exeist
in Android 3.0.
So, how to deal this problem?

Any Help Would Be Great !

-- 
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 Simple File Uploading in Server

2011-12-21 Thread 181
I am new to android and i am trying to develop a application which
supports Uploading files to server,,

While goggling for a while, i found this set of codes

http://reecon.wordpress.com/2010/04/25/uploading-files-to-http-server-using-post-android-sdk/?blogsub=confirming#subscribe-blog

and i tried to work with this set of codes with my phone,,But my APK
file is not getting installed in my phone,

and few other query's are

1)should i add any extra codes to this (above) code?

2)How to add permissions to my script on server side?

3)Should any changes to be made in "Androidmainfest.xml" and wot?


Really Thank your help

-- 
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] Programatically deleted files still visible in Windows Explorer

2011-12-21 Thread Acosta Test Account
Hello,

I have the following problem when running my application on an Asus
eee Pad Tranformer Android 3.0:

I delete files from the sdcard programmatically. Then, I connect the
device to Windows 7 through USB. The deleted files are still present
in the explorer. However through adb shell I can confirm that the
files have been deleted.

The only way to update the file list is to restart the device.

I use MediaScannerConnection.scan file to update the content of
Windows 7 explorer when I add a new file but it does not work when
files are removed.

Does anyone knows to trigger a refresh of the file explorer content?

Thank you for your help.

-- 
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: Google Account Sync still does not work on 4.0.3 emulator

2011-12-21 Thread tsyj2007
me too, always so.

-- 
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 MotionEvent for Touch being held down

2011-12-21 Thread nguyen nguyen

I have just started developing in Android and I am trying to make a
very basic game where you have to move a man along the bottom of the
screen and catch items while avoiding bombs.

The problem I am having is I want the man to move along the bottom of
the screen when you hold your finger on the left or the right side of
the screen.

Currently I can get the man to move a few pixels across when the user
touches the screen but I can not get it to keep moving until the user
removes his finger from the screen.

i am using engine from "Beginning Android Games" book, (which its
author using to make "mr.nom" game in chapter 6) . Please help me to
add some code to this engine to do things that i talked above. Thanks

Best regard.

-- 
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 replace GLSurfaceView with TextureView in Android Ice Cream Sandwich?

2011-12-21 Thread Brad Grimm
This post is extremely helpful, thank you.

One question though.  I can get the SurfaceTexture by a
SurfaceTextureListener. But if I just try to use
eglCreateWindowSurface & eglMakeCurrent it fails due to the surface
already being connected.

1) Is it possible to draw on this surface at all? Or does binding it
to the camera make it impossible to do that.

2) If it isn't possible. Can the surface be used (or copied) quickly
to an OpenGL texture and used in a separate surface? If so how?

3) If not, what would be the fastest way to get the camera preview out
of a SurfaceTexture and into OpenGL?

P.S. I followed suit and also posted this to StackOverflow:
http://stackoverflow.com/questions/8582090/possible-to-draw-on-surfacetexture-attached-to-camera

On Nov 23, 11:45 am, plafayette  wrote:
> Thanks for the quick response Romain and the sample code! Will give it
> a try.
>
> On Nov 23, 12:17 pm, Romain Guy  wrote:
>
>
>
>
>
>
>
> > GLSurfaceView handles GL setup for you, which TextureView will not do. A
> > TextureView can be used as the native window when you create an EGL
> > surface. Here is an example (the interesting part is the call
> > to eglCreateWindowSurface()):
>
> >     @Override
> >     public void onSurfaceTextureAvailable(SurfaceTexture surface, int
> > width, int height) {
> >         mRenderThread = new RenderThread(getResources(), surface);
> >         mRenderThread.start();
> >     }
>
> >     private static class RenderThread extends Thread {
> >         private static final String LOG_TAG = "GLTextureView";
>
> >         static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
> >         static final int EGL_OPENGL_ES2_BIT = 4;
>
> >         private volatile boolean mFinished;
>
> >         private final Resources mResources;
> >         private final SurfaceTexture mSurface;
>
> >         private EGL10 mEgl;
> >         private EGLDisplay mEglDisplay;
> >         private EGLConfig mEglConfig;
> >         private EGLContext mEglContext;
> >         privateEGLSurfacemEglSurface;
> >         private GL mGL;
>
> >         RenderThread(Resources resources, SurfaceTexture surface) {
> >             mResources = resources;
> >             mSurface = surface;
> >         }
>
> >         private static final String sSimpleVS =
> >                 "attribute vec4 position;\n" +
> >                 "attribute vec2 texCoords;\n" +
> >                 "varying vec2 outTexCoords;\n" +
> >                 "\nvoid main(void) {\n" +
> >                 "    outTexCoords = texCoords;\n" +
> >                 "    gl_Position = position;\n" +
> >                 "}\n\n";
> >         private static final String sSimpleFS =
> >                 "precision mediump float;\n\n" +
> >                 "varying vec2 outTexCoords;\n" +
> >                 "uniform sampler2Dtexture;\n" +
> >                 "\nvoid main(void) {\n" +
> >                 "    gl_FragColor = texture2D(texture, outTexCoords);\n" +
> >                 "}\n\n";
>
> >         private static final int FLOAT_SIZE_BYTES = 4;
> >         private static final int TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 *
> > FLOAT_SIZE_BYTES;
> >         private static final int TRIANGLE_VERTICES_DATA_POS_OFFSET = 0;
> >         private static final int TRIANGLE_VERTICES_DATA_UV_OFFSET = 3;
> >         private final float[] mTriangleVerticesData = {
> >                 // X, Y, Z, U, V
> >                 -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
> >                  1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
> >                 -1.0f,  1.0f, 0.0f, 0.0f, 1.0f,
> >                  1.0f,  1.0f, 0.0f, 1.0f, 1.0f,
> >         };
>
> >         @Override
> >         public void run() {
> >             initGL();
>
> >             FloatBuffer triangleVertices =
> > ByteBuffer.allocateDirect(mTriangleVerticesData.length
> >                     *
> > FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();
> >             triangleVertices.put(mTriangleVerticesData).position(0);
>
> >             inttexture= loadTexture(R.drawable.large_photo);
> >             int program = buildProgram(sSimpleVS, sSimpleFS);
>
> >             int attribPosition = glGetAttribLocation(program, "position");
> >             checkGlError();
>
> >             int attribTexCoords = glGetAttribLocation(program, "texCoords");
> >             checkGlError();
>
> >             int uniformTexture = glGetUniformLocation(program, "texture");
> >             checkGlError();
>
> >             glBindTexture(GL_TEXTURE_2D,texture);
> >             checkGlError();
>
> >             glUseProgram(program);
> >             checkGlError();
>
> >             glEnableVertexAttribArray(attribPosition);
> >             checkGlError();
>
> >             glEnableVertexAttribArray(attribTexCoords);
> >             checkGlError();
>
> >             glUniform1i(uniformTexture,texture);
> >             checkGlError();
>
> >             while (!mFinished) {
> >                 checkCurrent();
>
> >                 glClearColor(0.0f, 0.

[android-developers] Android - Apache commons libraries & Exchange Web Service Managed API

2011-12-21 Thread Absenth
I am already trying the exchange web service in JAVA. It's running
good. It has send email or get emails correctly.
My java code looks like this :
public static void main(String[] args) {
try {
Locale.setDefault(Locale.ENGLISH);
ExchangeService service = new ExchangeService();
WebCredentials webCredentials = new
WebCredentials("asd...@asasd.onmicrosoft.com", "asdasdasd");
URI url = new URI("https://asdasd802.outlook.com/ews/
Exchange.asmx");
service.setCredentials(webCredentials);
service.setUrl(url);
System.out.println(service.getRequestedServerVersion());
msg.setSubject("Hello world!");
msg.setBody(MessageBody.getMessageBodyFromText("Sent using
the
EWS Managed API."));
msg.getToRecipients().add("asd...@gmail.com");
msg.send();
} catch (Exception ex) {
ex.printStackTrace();
//System.out.println(ex.toString());
}
}

When I try this in android with this code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_layout);
Button b = (Button) findViewById(R.id.button1);
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Locale.setDefault(Locale.ENGLISH);
try {
ExchangeService service = new ExchangeService();
WebCredentials webCredentials = new WebCredentials(
"asd...@asdasd.onmicrosoft.com",
"asdasd");
URI url = new URI("https://asdasd.outlook.com/ews/
Exchange.asmx");
service.setCredentials(webCredentials);
service.setUrl(url);
EmailMessage msg= new EmailMessage(service);
msg.setSubject("Hello world!");
msg.setBody(MessageBody.getMessageBodyFromText
   ("Sent using the EWS Managed API."));
msg.getToRecipients().add("asd...@gmail.com");
msg.send();
} catch (Exception ex) {
//ex.printStackTrace();
System.out.println(ex.toString());
}
}
});
}

I get some errors, when clicking on button.
This is the messages from the console :
[2011-12-15 17:06:25 - MobileApplication1] Dx warning: Ignoring
InnerClasses attribute for an anonymous inner class
(org.apache.commons.httpclient.HttpMethodBase$1) that doesn't come
with an
associated EnclosingMethod attribute. This class was probably
produced
by a
compiler that did not target the modern .class file format. The
recommended
solution is to recompile the class from source, using an up-to-date
compiler
and without specifying any "-target" type options. The consequence of
ignoring
this warning is that reflective operations on this class will
incorrectly
indicate that it is *not* an inner class.
[2011-12-15 17:06:25 - MobileApplication1] Dx warning: Ignoring
InnerClasses attribute for an anonymous inner class
(org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory
$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably
produced
by a
compiler that did not target the modern .class file format. The
recommended
solution is to recompile the class from source, using an up-to-date
compiler
and without specifying any "-target" type options. The consequence of
ignoring
this warning is that reflective operations on this class will
incorrectly
indicate that it is *not* an inner class.
[2011-12-15 17:06:25 - MobileApplication1] Dx warning: Ignoring
InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.LogFactoryImpl$1) that doesn't come
with an
associated EnclosingMethod attribute. This class was probably
produced
by a
compiler that did not target the modern .class file format. The
recommended
solution is to recompile the class from source, using an up-to-date
compiler
and without specifying any "-target" type options. The consequence of
ignoring
this warning is that reflective operations on this class will
incorrectly
indicate that it is *not* an inner class.
[2011-12-15 17:06:25 - MobileApplication1] Dx warning: Ignoring
InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.LogFactoryImpl$2) that doesn't come
with an
associated EnclosingMethod attribute. This class was probably
produced
by a
compiler that did not target the modern .class file format. The
recommended
solution is to recompile the class from source, using an up-to-date
compiler
and without specifying any "-target" type options. The consequence of
ignoring
this warning is that reflective operations on this class will
incorrectly
indicate that it is *not* an inner class.
[2011-12-15 17:06:25 - MobileApplication1] Dx warning: Ignoring
InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.LogFactoryImpl$3) that doesn't come
with an

[android-developers] sdk 1.6 webview httppost

2011-12-21 Thread xx
hi, all
I'm developing a app base on webview. i need post some data, but i
use the sdk 1.6. as some gays said, the sdk 1.6 or lower doesn't
support
the http post.  how should i do with sdk 1.6. any advice is welcome.
thank you in advance!

zghnly

-- 
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] Questions about VpnService

2011-12-21 Thread Lysandus
I have a couple questions about VpnService.
Is the VpnService added in 4.0 only for creating a vpn connection for
your app, or does it make the vpn for all traffic on the device?  If
it's all device traffic does that mean your app can analyze things
like what websites the user is visiting?

Can it be used to just add a new vpn to the device and not have the
traffic go through your app?

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] In-App Purchase Problem - Market Version 3.4.4

2011-12-21 Thread Justin
Hey Everybody,

Looks like Google has introduced a bug in version 3.4.4 of the Market
APK: All in-app purchases fail with the message "Error retrieving
information from server."

I've tested this with my application, and in the Paradise Island app
by attempting to purchase 50,000 "Island Bucks." Both result in the
same error message.

Additionally, the folks in Freenode's #android-dev IRC channel
mentioned other developers complaining about this same issue, which
was isolated to version 3.4.4 of the Market APK.

Anybody else experiencing this issue? Is Google working on a fix?

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] pagination with numbering

2011-12-21 Thread yogesh...@acusis.com
hello,
I am new to android development. now i developnig my application
in android version1.6..
i want to do pagination with numbering(dynamically allocating the
number of pages) navigate to specific page clicking on number

-- 
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] 500-600 Thousand Words Dict Search Speed

2011-12-21 Thread tomyth
Hi!
I'm working on a dict app on android,
I need to search a list of words(about 500-600 thousand words) in file
to find the word.
It took me about 10-20 seconds to search the word. How can I improve
the search speed?


Thanks to all!

tomyth_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


[android-developers] Clicking on an ImageButton error

2011-12-21 Thread TCS
I'm just learning and I'm trying to click on an ImageButton and load a
new activity.  I get the menu activity to load on a device just fine
but as soon as I click the button I get the following in my debugger
window.  How do I decipher to find out my problem.

Thread [<1> main] (Suspended (exception IllegalStateException))
View$1.onClick(View) line: 2178
ImageButton(View).performClick() line: 2532
View$PerformClick.run() line: 9308
ViewRoot(Handler).handleCallback(Message) line: 58
ViewRoot(Handler).dispatchMessage(Message) line: 92
Looper.loop() line: 150
ActivityThread.main(String[]) line: 4293
Method.invokeNative(Object, Object[], Class, Class[],   Class,
int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 507
ZygoteInit$MethodAndArgsCaller.run() line: 839
ZygoteInit.main(String[]) line: 597
NativeStart.main(String[]) line: not available[Native
method]

-- 
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]

2011-12-21 Thread thangaraj raj
Hai,I want to know how to get current city name using android
api.Please 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] How to launch installed application via command line with dalvikvm

2011-12-21 Thread aprel
Hi.
I have an Android application that is already installed on Android
device. I would like to start it with dalvikvm commando. How can i do
that?

-- 
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] problems getting an app to work and avd won't show up with "adb devices" listed command

2011-12-21 Thread Heiko
Hello,

I've some problems getting an application to run in an avd. I created
simple avd named "test", created a hello world android project "test".
When I try to start the application the avd emulator starts up but
doesn't showed the app.
No error Output in eclipse (indigo, java ee) :
*
[2011-12-21 15:55:40 - test] --
[2011-12-21 15:55:40 - test] Android Launch!
[2011-12-21 15:55:40 - test] adb is running normally.
[2011-12-21 15:55:40 - test] Performing test.de.TestActivity activity
launch
[2011-12-21 15:55:40 - test] Automatic Target Mode: Preferred AVD
'test' is not available. Launching new emulator.
[2011-12-21 15:55:40 - test] Launching a new emulator with Virtual
Device 'test'
[2011-12-21 15:55:44 - Emulator] emulator: WARNING: Unable to create
sensors port: Unknown error
*

Thats all, i can play with the emulator but it doesn't show up in
eclipse DDMS.
Output with "adb device" on command line shows an empty device list
despite the fact that 1 or more avd's running.
I tried deleting and creating new avd. Reinstall eclipse and android
sdk but nothing helps...
I hope somebody can help me out.

Thanks!
Heiko

-- 
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] Problem with SQLite Insert command

2011-12-21 Thread Gopal
I am new to andriod. I started creating a sample app using Sqlite databse.
When i run the app i m getting this error


ERROR/AndroidRuntime(878): Caused by:
android.database.sqlite.SQLiteException: table employee has 11 columns but
12 values were supplied: , while compiling: INSERT INTO employee
VALUES(null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )

My Insert query is :

String sql = "INSERT INTO employee VALUES(null, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ? )";
db.execSQL(sql, new Object[]{id,fname, lname, title, skill, DOJ, prc,
officePhone, callPhone, email, mid});

Please can any one help me out this.

-- 
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: NFC Secure Element

2011-12-21 Thread mickae1
Hi,

I would like to know if it's possible to wirte data on the card with an 
android application ? Or is it the problem that you have been talking about 
a secret key that no one know ?

Thx for the answer,

-- 
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] Auth 500 error or not, depending on the version?

2011-12-21 Thread vt
Hello All,

Trivial login that used to work on 2.2 and 2.3.x suddenly ceased to
work when my Nexus S got the ICS upgrade. Here's the code:


 
HttpWrapper.getInstance().httpClient.getParams().setBooleanParameter(ClientPNames.HANDLE_REDIRECTS,
false);

URL targetURL = new
URL(HttpWrapper.getInstance().baseURL, "_ah/login?continue=http://
localhost/&auth=" + authToken);
HttpGet http_get = new HttpGet(targetURL.toString());
HttpResponse response =
HttpWrapper.getInstance().httpClient.execute(http_get);

HttpEntity entity = response.getEntity();

try {

if (response.getStatusLine().getStatusCode() !=
302) {

// Getting 500 right here :(
...

Then, the token is properly invalidated elsewhere:

 
accountManager.invalidateAuthToken(accounts[0].type, authToken);

Now, the really strange fact is that it also ceased to work on fresh
emulator instances - worked on 2.2 emulator until I had to remove it
to run the app on 4.0.3 emulator, and when I created a new one, it
wasn't working anymore.

There's a fact that is lurking somewhere close, maybe - I remember
that when I set up the account on the emulator for the first time and
then ran the app, there was an additional dialog box asking permission
to use account credentials by the application - and I don't see it
anymore. Related?

And again, yes, this very piece of code is still working on 2.3.5 with
no problems, and worked on 2.2 emulator until I deleted it and
recreated it again. Bizarre.

--vt

-- 
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 socket in a service communicating with more activities...

2011-12-21 Thread ganesh
Dear All,

I have multiple activities in my app that need to send data over a
socket.. I figured that service is the best way to handle this.. I
tried many different ways to achieve this but with no success.. If
anyone can share a simple example of how it can be done.. This is what
I am looking for..

@Override
onStart - open the socket for communication, open the input and output
streams..
onDestroy - close the streams and the socket..

my method..
public String onSendData(String abc) - to send and receive data from
the server socket.. this will be called from multiple activities which
I am still unable to figure out.. do I need to call bindService() in
every activity?

Is this the best way to do a socket communication? or is XML-RPC a
better bet..
I do not have a lot of background processing, it is as simple as
sending and receiving a few bytes of data..

Thanks in advance..
Ganesh

-- 
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] Leaking Activity ,Fragment & adapter because of option menu

2011-12-21 Thread santhana
Hi,

I am having one avtivity and a ListFagment inside that activity.  And
i have adapter for that list fragment...
I m creating a option menu for that fragment... In oncreateOptionMenu
i m inflating the menu item( Search View) from menu.xml file.

After come out of the activity because of this search view my
activity , Fragment and Adapter is getting leaked...
Every time if i launch the activity instance of activity, fragment and
adapter are increasing In heap dump it is showing like problem in
SearchView.SpellerCheckerSession.InternalListener is holding the
contex of the activityThis listener is in
AutoCompleteTextView..This AutoCompleteTextView is used by
SearchView

In onDestroy ..i m explectly making this SearchView instance as
null...But i m not able to retify this problem...Please any body tell
me the reason why this "SpellerCheckerSession.InternalListener" is not
getting killed by the systemAnd y this is holding the activities
context.

Or Is it the problem of SearchView( I m adding this search view as
actionView in Option menu..inside the fragment.)

-- 
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: Pls send me android souce code....

2011-12-21 Thread Slay3r

On 12/20/2011 12:36 PM, Sangeeth Krishnan wrote:

http://source.android.com/source/download.html

On Dec 20, 9:00 am, android developer
  wrote:

Hi to all.

Pls send me android source code files(Sample Projects)
or else send the souce code links...

Thanks you all.

http://developer.android.com/resources/samples/get.html
try these. If these aren't what you want try google..

--
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] Distributing adb

2011-12-21 Thread Brian Rowe
Hi,

I'm developing a system for which an Android application is a component.  I 
am considering distributing the adb as part of the system.  Does the SDK 
license allow me to do this?  Section 3.1 of the license leads me to 
believe that (re)distributing the adb binary may not be permitted.  Is that 
true?  If it is true, am I permitted to distribute a version I've compiled 
myself?  What if it's a modified version?

If this isn't the best forum to ask this question, can anyone point me to a 
better place to ask it?

Thanks!
Brian Rowe

-- 
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] Frontal camera low frame rate recording

2011-12-21 Thread Tiago de Freitas Pereira
Hello everyone

I have an app to record videos using the Galaxy SII front camera and
i'm using MediaRecorder to this task.
A weird thing is happening. I'm using the setVideoFrameRate method to
set the frame rate to 25fps but the recorded videos are with 13 or 15
fps. With poor light conditions sometimes i got 8fps.

The weird thing is, when i use samsung app i ALWAYS got 25fps.

Can anyone help me?

Thanks

Tiago

-- 
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] "Call Connected event" and "Vibrate on Call Connected"

2011-12-21 Thread Juanillo
Hi everybody,

i've been searching for some way to know if an outgoing call gets
connected, but no luck.
all that i've read says it's not possible.
however, how "Vibrate on Call connected" apps work?
is it only a matter of configuration in device? do they set on this
feature programmatically or do they find a way to know when a call
gets connected?
this is "must" requisite for my app. i need to know when a call gets
connected.
so, any ideas?

in another direction, is there any way to detect device is vibrating?
maybe we can enable "vibrate on call connected" feature, and then
listen to vibrate events on phone between "OFFHOOK" and "IDLE" phone
state events
just an idea

thanks for your help

-- 
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] Merging two activities that is SMS and LBS

2011-12-21 Thread Mehdi Rizvi
Actually im merging two different activities that is SMS and LBS..

My first Activity is getting latitude and Longitude of a current
position of that device
My SMS activity should sent that first activity location through sms
to the desire number.. in this way we can track the user at any stage
through sms
im working on a single layout and not having errors at log-cat!! But
couldn't achieve my desire result.. that is sent the location through
sms to the desire server

-- 
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] Native SIP Supported on all ICS Devices?

2011-12-21 Thread Shaun
>From what I understand ICS is supposed to bring devices up to more or
less equal standards, does this include the native SIP library, i.e.
as soon as my Galaxy S II gets ICS will I be able to use the native
SIP client on it and any other ICS device? Thanks!

Shaun

-- 
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] tablet

2011-12-21 Thread billy lester
They nee a flash player that will run any tablet made Android.  And.
Why can.t I use market site this is a phone to in away Android. Let me
in to use apps I can.t ever use them this a pandigital what is wrong I
am not buying other phone you smart one.s seem dum when you don.t make
things simple loss a lot of money that way and try to make it that way
ripping persons. Off.

-- 
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] Help clarifying Android Market Developer Program Policies > Spam and Placement

2011-12-21 Thread John Moses
I just got an email with the subject 7-Day Notificati**on of Android Market 
Developer Term Violation noting the spam and placement section.  I have an 
app that is a ListView of each state that links to a WebView for a form 
hosted by state government.  I listed out the name of each state in my 
description as well.

So at first I thought it was because of putting each state in the 
description as you could argue it is "loaded with keywords".
Then I read the fourth bullet point that says: "Do not post an app where 
the primary functionality is to link to the website or the webview of a 
website not owned by you (unless you have permission from the website owner 
to do so)."

I removed the states from the keywords.  Do you think if I host the files 
myself on Google Documents that would not break that rule?

If I hosted them myself, then I am concerned about hosting copyright data. 
 (I'm linking to state's driver's manuals)

I'll probably be on the safe side and just choose a new app idea for my 
first app.  But I would like to bring it up for discussion first.  Also, if 
I did it leave the app up and remove the keywords and host it myself.  If 
it is still in violation, does the app get deleted or does my account get a 
restriction, or is any other action taken?

Thanks in advanced!

-- 
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] How to merge all sms from a sender into one list item in my ListView with a CursorAdapter?

2011-12-21 Thread Abdulsamet KARAKUS
I have a ListView which uses a CursorAdapter to populate datas in it.
My ListView shows all sms inbox, but they are not filtered, each
message is shown. I want to merge all messages considering the
sender's phone number. How can I do it?
I managed to do it with an ArrayAdapter but when there is a lot of
messages, the query takes seconds and the app is of course inefficient.

-- 
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


  1   2   >