Re: [android-developers] Help Needed on Android Widget

2010-11-23 Thread Rocky
Hey,
go thr this link, u may find the sol

http://mobiforge.com/developing/story/sms-messaging-android


On Tue, Nov 23, 2010 at 1:21 PM, Dev Android devandroid1...@gmail.comwrote:


 Rocky,

 Thanks for your reply. We don't have method
 startActivityForResult available in the android widget provider. We have to
 use pendingIntent only. Hope you can try to understand the problem.

 --
 Eng.
 On Tue, Nov 23, 2010 at 1:16 PM, Rocky rkjhaw1...@gmail.com wrote:

 use start activity for result, and from the next activity use bundle to
 pass the result to back

 On Tue, Nov 23, 2010 at 1:05 PM, Dev Android devandroid1...@gmail.comwrote:

 In android widget,

 Is there any mechanism available to get the activity result.

 Scenario:

 On widget we have button and click of this button will launch the
 new activity and after destroying of this activity, this will send some
 results to widget. Is there any callback available to catch the information
 from the launched Activity.

 Thanks in advance!

 --
 Eng.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Thanks  Regards

 Rakesh Kumar Jha
 Software Developer
 Symphony Services Corp (India) Pvt Ltd
 Bangalore
 (O) +918030274295
 (R) +919886336619

  --
 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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Thanks  Regards

Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030274295
(R) +919886336619

-- 
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 for OCR library?

2010-11-23 Thread ko5tik
There was direct download link with barcode -  but it crashed
on attempt to install on 2.1  I got good recognition results with
invariant moments,
and they are easy to compute (and pretty straightforward), but
interpretation if results and matching
to actual characters  requires additional heuristics (not obvious)
And in any case, I favor pure java solution (looked into tessaract
sources and they are not fun to
work with)

So I'm working on it.

regards,

On Nov 22, 4:40 pm, JP joachim.pfeif...@gmail.com wrote:
 See if you can find the Mezzonfanti app somewhere. I've tried it out
 last year, it ran just fine.
 Unless unpublished, it should still be in the Market.
 I experimented with Tessaract OCR on a client project some three
 months ago, but they put a stop on it before I could finish it. At any
 rate, getting this to work is quite an advanced exercise.

 On Nov 22, 4:14 am, Ray da Costa raydaco...@gmail.com wrote:

  Regards The cool, but runs on android? Have you ever done anything to Andoid
  this api?

  2010/11/21 JP joachim.pfeif...@gmail.com

   Assembly required.

   On Nov 21, 4:34 am, ko5tik kpriblo...@yahoo.com wrote:
On Nov 20, 8:36 pm, JP joachim.pfeif...@gmail.com wrote:

 The Tessaract OCR engine:http://code.google.com/p/tesseract-ocr/
 has been integrated in Android. Here's a writeup by a team that's
 gotten it to work:
  http://www.itwizard.ro/mezzofanti-augmented-reality-through-text-reco...

Could not install it on 2.1 - HTC Hero...

   --
   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.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

  --
  Ray da Costa
  The best way to predict the future is to invent it.
  Alan Kay

-- 
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] google api ajax webservice

2010-11-23 Thread Atik
hi guys,
i m stuck with an issue..
i have created json parser to parse the data  from this
http://ajax.googleapis.com/ajax/services/search/local?v=1.0sll=48.8565,2.3509q=restaurant
i want to parse this data and wanna show in list view in android.

please give me sampple code. actually ihave done lot work on it but
still its not giving any output.
my contact mail id is atik0...@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] Creating 2D games with Android and Blender

2010-11-23 Thread Miguel Morales
Nice, I enjoyed the part of content creation.  I'm going to keep your
suggestion of using a single bitmap with all the sprites instead of
individual images.
Although it's not terrible it does indeed have a performance impact.

Are you getting good performance using this approach with canvas alone?
In either case, good job.

On Sun, Nov 21, 2010 at 2:51 PM, Ruben ruben@gmail.com wrote:
 I have just written an in-depth article covering the workflow of 2D
 game creation for Android with blender, based in my own experience
 with the game Egg Savior. I hope you find it usefull.
 Feel free to share your knowledge and propose other alternatives to
 these ideas.

 http://organicandroid.blogspot.com/2010/11/creating-2d-games-with-android-and.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



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://developingthedream.blogspot.com/,
http://www.youtube.com/user/revoltingx

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

2010-11-23 Thread Serdel
Hello,

I have problems with AnimationDrawable which i use to animate a
'striped' gif file. In fact I have two animations that I want to use
in one activity (and they must be used in the same activity). Both
animation are build with 7 frames :

?xml version=1.0 encoding=utf-8?
animation-list xmlns:android=http://schemas.android.com/apk/res/
android
 android:id=@+id/analyse android:oneshot=false
 item android:drawable=@drawable/analyse_frame_0
android:duration=50 /
 item android:drawable=@drawable/analyse_frame_1
android:duration=50 /
item android:drawable=@drawable/analyse_frame_2
android:duration=50 /
 item android:drawable=@drawable/analyse_frame_3
android:duration=50 /
item android:drawable=@drawable/analyse_frame_4
android:duration=50 /
 item android:drawable=@drawable/analyse_frame_5
android:duration=50 /
item android:drawable=@drawable/analyse_frame_6
android:duration=50 /
/animation-list

The second one is the same, just different files but also 7 frames.

In the onCrate() method of my activity I start the first animation and
launch a 15 second timer (the idea is that the first animation is
playing when the timer ticks). I use the following code:

  //The onCreate method of the activity class.
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.third);
 
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

  layout =
(LinearLayout)findViewById(R.id.widget40);
  analyseImage = (ImageView)
findViewById(R.id.ImageView02);
 
analyseImage.setBackgroundResource(R.drawable.analyse_animation);

  analyseAnimation = (AnimationDrawable)
analyseImage.getBackground();
  analyseAnimation.start();

  MyCount counter = new MyCount(15000,1000);.
  counter.start();
  }


Unfortunately this does not work. However when the timer finishes I
want to start a second animation and launch a seperate thread. And
this works - when I start the animation in the 'onFinish' method of
the timer, the animation starts properly:

   //the onFinish() method of timer.
  public void onFinish()
{
 
layout.setBackgroundResource(R.drawable.id_app4);

 
analyseImage .destroyDrawingCache();
 
analyseImage .setVisibility(View.GONE);

  connectImage = (ImageView)
findViewById(R.id.ImageView02);
 
connectImage.setBackgroundResource(R.drawable.connect_animation);
  connectAnimation =
(AnimationDrawable) analyseImage.getBackground();
 
connectAnimation.start();
 
startThread(connectTh,myConnector);
}

Unfortunately this does not work so good because it only works when I
comment-out the first one - otherwise I get an Exception :
'OutOfMemoryError: bitmap size exceeds VM budget'. As you see I try to
release some memory but this does not help. This is a crucial problem,
since my application is working in a 'ring' of couple activities. So
when I finish the last one it goes back to the first one - it is
possible that the activity with animations will be called many times
in the life-time of the whole app. So I need to release the memory
from the second one as well.

So now here are my questions:
- why can't I start the first animation instantly after the activity
starts and how to do this?
- How to release the memory from the animations?

Can anyone please help?

PS: I am working on Android 1.5

-- 
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] Problem with AnimationDrawable

2010-11-23 Thread Kumar Bibek
There's a problem with the current release (I guess), where these kind of
animations do not start if you call them directly from any of the activity's
lifecycle method. If you do the same thing, from within a thread, or on the
click of a button, this seems to work.


Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Tue, Nov 23, 2010 at 2:04 PM, Serdel adam.lichwierow...@gmail.comwrote:

 Hello,

 I have problems with AnimationDrawable which i use to animate a
 'striped' gif file. In fact I have two animations that I want to use
 in one activity (and they must be used in the same activity). Both
 animation are build with 7 frames :

 ?xml version=1.0 encoding=utf-8?
 animation-list xmlns:android=http://schemas.android.com/apk/res/
 android
  android:id=@+id/analyse android:oneshot=false
  item android:drawable=@drawable/analyse_frame_0
 android:duration=50 /
  item android:drawable=@drawable/analyse_frame_1
 android:duration=50 /
 item android:drawable=@drawable/analyse_frame_2
 android:duration=50 /
  item android:drawable=@drawable/analyse_frame_3
 android:duration=50 /
 item android:drawable=@drawable/analyse_frame_4
 android:duration=50 /
  item android:drawable=@drawable/analyse_frame_5
 android:duration=50 /
 item android:drawable=@drawable/analyse_frame_6
 android:duration=50 /
 /animation-list

 The second one is the same, just different files but also 7 frames.

 In the onCrate() method of my activity I start the first animation and
 launch a 15 second timer (the idea is that the first animation is
 playing when the timer ticks). I use the following code:

  //The onCreate method of the activity class.
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.third);

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

  layout =
 (LinearLayout)findViewById(R.id.widget40);
  analyseImage = (ImageView)
 findViewById(R.id.ImageView02);

 analyseImage.setBackgroundResource(R.drawable.analyse_animation);

  analyseAnimation = (AnimationDrawable)
 analyseImage.getBackground();
  analyseAnimation.start();

  MyCount counter = new MyCount(15000,1000);.
  counter.start();
  }


 Unfortunately this does not work. However when the timer finishes I
 want to start a second animation and launch a seperate thread. And
 this works - when I start the animation in the 'onFinish' method of
 the timer, the animation starts properly:

   //the onFinish() method of timer.
  public void onFinish()
 {

 layout.setBackgroundResource(R.drawable.id_app4);


 analyseImage .destroyDrawingCache();

 analyseImage .setVisibility(View.GONE);

  connectImage = (ImageView)
 findViewById(R.id.ImageView02);

 connectImage.setBackgroundResource(R.drawable.connect_animation);
  connectAnimation =
 (AnimationDrawable) analyseImage.getBackground();

 connectAnimation.start();

 startThread(connectTh,myConnector);
}

 Unfortunately this does not work so good because it only works when I
 comment-out the first one - otherwise I get an Exception :
 'OutOfMemoryError: bitmap size exceeds VM budget'. As you see I try to
 release some memory but this does not help. This is a crucial problem,
 since my application is working in a 'ring' of couple activities. So
 when I finish the last one it goes back to the first one - it is
 possible that the activity with animations will be called many times
 in the life-time of the whole app. So I need to release the memory
 from the second one as well.

 So now here are my questions:
 - why can't I start the first animation instantly after the activity
 starts and how to do this?
 - How to release the memory from the animations?

 Can anyone please help?

 PS: I am working on Android 1.5

 --
 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.comandroid-developers%2bunsubscr...@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] how to use Apex Google Api in Android

2010-11-23 Thread Maks
Hi
i want to use Google  Apex Api in my android application .
Could any body provide me  any help gerarding it.

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] Re: How to make a trial version which starts a limited amount of times?

2010-11-23 Thread Eyvind Almqvist
Yes, I see now that they write
Products that cannot be previewed by the buyer (such as
applications): You authorize Google to give the buyer a full refund of
the Product price if the buyer requests the refund within 48 hours
after purchase.


I have released a trial like I described on OVI and
I haven't got much angry reviews.
I could also make a trial with limited functionality.
You could for instance only watch 4 of the 10 visual effects.
But wouldn't that risk getting angry reviews as well?'
Or do you think this alternative would work better on AM?


It is difficult and time consuming to buy anything from AM
in Sweden. You have to buy with credit cards and
you have to write all the information about your credit card in the
mobile.
Is it the same for USA? If so, I think it makes people less willing to
buy anything.
I think a trial version is needed because the buying process is so
complicated, even
 if a 24 hour trial is possible when they buy apps.


On 22 Nov, 01:13, Michael A. michael.aki...@gmail.com wrote:
 On Nov 20, 11:34 am, MobileVisuals eyv...@astralvisuals.com wrote:

  Thanks for explaining, now I understand what you mean when you say
  that there is not much use to make a time limited trial.
  What do you mean with Android Market already implements a default
  time limited trial version of your app? Do you mean that everytime
  someone buys an app they can return it within 24-48 hours for free?
  That must be a special rule that Google has, I've never seen that in
  other appstores.

 You should probably read 
 this:http://www.android.com/us/developer-distribution-agreement.html

  I was planning to release a trial version which starts 3 times. The
  first time, you can view all of the visual effects.
  The second time, you can view just 3 of the visual effects. The third
  time, you can view just 1 of the visual effects.
  But maybe it is no use to release a trial version like that either? My
  apps display visual effects that you can use for meditation or
  relaxation, so you can't use them as a wallpaper.

 I think that you would be likely to get a lot of disgruntled customers
 by releasing an app like that, but do keep in mind that this is just
 an opinion based on my own experiences and observations. Others may
 have differing experiences/opinions, and even if all of us agree (not
 likely), it is still just an opinion. None of us can predict the
 future.

  My company got good distribution to operators, currently about 40
  operators are selling our apps. Maybe it is easier to get sales for
  Android apps on the operators appstores and portals than on Android
  market? I have seen that big US operators like T-mobile and Verizon
  are looking for Android apps.

 It is certainly possible, but none of the alternate markets have - as
 yet - a market penetration to compete with the Android market. You are
 likely to make at least an order of magnitude (10x)  more sales
 through the Android market than any other portal as things stand
 today. That situation may change in future, perhaps even the near
 future, but for now this is the reality we deal with.

 Regards,

 Michael A.



  On 18 Nov, 14:11, Michael A. michael.aki...@gmail.com wrote:

   On Nov 17, 9:57 am, MobileVisuals eyv...@astralvisuals.com wrote:

I see, so do you know the best way to make a time limited trial? I
assume that the License Verification Library (LVL) should not be used
for this?

   I would not make a time-limited trial (that was kind of my point).
   With the way the Android market works (and the demographics of its
   users), it is not really well suited to these kind of apps.

   I would look to limit the functionality/choice in your trial app
   instead. I can see that you do wallpapers; you could for instance
   offer a basic variant for free that does not permit any (or very
   little) tweaking of your wallpaper settings. Or put in ads whenever
   the settings are changed - whichever solution seems to fit best with
   your strategy.

Our apps has sold best when there is no trial version available, so
the consumer only has the option of buying the complete version. This
approach has been successful on Playnow, we've had 2 apps which have
been number one their sales chart.

   The Android market is a very different beast, for better and worse.

But I assume that this approach is more difficult on Android market,
since there are so may free products available?

   Visibility is an issue on the market. There's a reason that most of
   the success stories on the market were either early arrivals to
   Android or big names (e.g. Rovio).

Or is it possible to sell good on Android market without having a
trial version?

   I think you misunderstand the purpose of a trial version in the
   context of the Android market.

   Keep in mind that the Android Market already implements a default time-
   limited trial version of your app - ANY user can download your app and
   

[android-developers] Re: LVL - Yay or Nay?

2010-11-23 Thread Sheado
Thanks for your feedback Zsolt,

We love working on Android apps, but at the end of the day we need to
be paid for our efforts. If LVL isn't going to result in increased
revenue for us, then we may not want to dedicate any time to it (it's
not just the time we worry about, but the potential bugs, obfuscation
issues, build management, etc).
As I do more research I become even more confused. For example some
scenarios after DRM was added (note not all of these are Android
apps):

Minor increase:
http://www.gamasutra.com/php-bin/news_index.php?story=17350

No difference:
http://games.slashdot.org/firehose.pl?op=viewtype=storysid=08/11/15/0239219

Increased sales (although there is some cross-promotion of DRM
technology here):
http://eddiekim.posterous.com/selling-shovels-to-android-gold-miners

Related Articles:
http://www.thunderboltgames.com/opinion/article/why-drm-doesnt-work-opinion-for-pc.html
http://www.androidguys.com/2009/12/22/rethinking-android-app-piracy/

At this point I'm leaning towards no DRM... hopefully that's the right
decision.

-Chad

On Nov 22, 10:00 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 Why would the sales increase by adding LVL?  The vast majority of
 pirates wouldn't pay for your app in the frist place, this has been
 shown many times since the very early days of personal computers.

 So I wouldn't add the LVL to increase sales, but to make it harder for
 people to simply steal my work.

 I had a pirate just yesterday having the nerve to send me a long
 feature request e-mail.  I looked up his name and I saw he pirated my
 app over a month ago.  So I asked him how come he's using the paid
 version of my app, and he actually responded saying that he canceled
 the purchase, but was considering buying it if I add feature X.  OK,
 right.

 These are the people I would like to stop with the LVL.

 On Nov 23, 5:17 am, Sheado chad...@gmail.com wrote:

  thanks for the feedback guys,

  Pent - have you noticed if your sales have increased since adding LVL?
  I know it's different on a case-by-case basis, but I always like
  hearing specific cases.

  JP - we're definitely going freemium with one of our apps, but the
  other niche ones we need to charge some $ upfront for since in-app
  payments or ads won't work well in those cases.

  It be great if there was a study linking (or not) app sale increase
  with LVL on Android (if anybody knows of one please let me know!)

  thanks!
  -Chad

  On Nov 20, 7:34 am, JP joachim.pfeif...@gmail.com wrote:

   In case you have the luxury to think concept - as far as I can tell,
   there's a seismic shift going on in what independent developers
   consider viable business approaches to the generation of revenue
   through apps. 'round where I live (San Francisco), you hear the high
   velocity, app market style app sales model declared dead, and you
   won't find many devs any more announcing apps that do not emphasize
   monetization through user engagement. This trend has a few drivers, $.
   99 a pop apps mostly, but also, in Android, the absence of a viable
   and convenient solution in Android Market to buy and sell apps the old
   fashioned way. Based on that, perhaps think about giving away the app
   for three, which serves as a vehicle for in-app payment that points
   back to you (and only your), and that allows you to control
   authorization at the point of payment.

   On Nov 19, 4:09 pm, Sheado chad...@gmail.com wrote:

Hi All,

Sorry for starting yet another post on this subject. We're trying to
decide on whether to go with LVL or just un-protect our apps
altogether (currently using the copy protection feature). So my
question:

* Are you copy protecting/DRM/LVL licensing your apps?

Some of our concerns include:
* ROI on time spent with LVL code/testing/bugs versus actual increase
in sales
* lack of copy protection in other markets

Some info we found in other posts:
* piracy breakdown of a popular app:http://keyeslabs.com/joomla/
projects/auto-app-licensing/152-a-global-piracy-heat-map
* some have mentioned going free (ad-only) - some of our apps are
niche apps, therefore this strategy will not work well for some of
those apps.

On a side note: we liked the deprecated copy-protection feature
because it involved no extra development work and seemed secure enough
to thwart a casual pirate from easily sharing an app with all of
their friends. (another side note: we have incurred the wrath of tons
android1.5 users after removing the copy protection feature - proceed
with caution if you do so)

any feedback would be awesome!
thanks,
Chad- Hide quoted text -

  - Show quoted text -

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

[android-developers] Re: Apps not showing in Market

2010-11-23 Thread mot12
If you expect anybody to help you here, then at least post your
manifest. How do you think anybody would know the answer to your
question? Magic?

Martin
mobitobi.com
Gentle Alarm, Sleep Now

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


[android-developers] IllegalStateException in MediaPlayer (Redux)

2010-11-23 Thread Jason Polites
Hi folks,

Some time ago I posted an issue relating to an IllegalStateException
in the Media Player (http://groups.google.com/group/android-developers/
browse_thread/thread/46c7c2cd4f4a6958/5551d47aac93632c)

I have just launched the app into the wild and this error is
flooding in.

I just can't seem to fathom why.. here's the code:

if(mp != null) {
   mp.stop();
   mp.prepareAsync();
}

(mp is a MediaPlayer instance BTW).

According to the doco, prepareAsync is valid for {Initialized,
Stopped} states.. but I just can't see how it could be in any state
other than stopped??

The trace is:

java.lang.IllegalStateException
  at android.media.MediaPlayer.prepareAsync(Native Method)
  .. the line of code mentioned above follows.

Is it possible that stop() is not synchronous?  Can't seem to see
anything in the doco stating this.

Anyone got any ideas?

P.S.

I'm seeing this on a wide range of devices, but all so far are version
2.1-update1

-- 
Droid Odyssey!  A new game for Android
http://www.carboncrystal.com/droid-odyssey/

-- 
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: LVL - Yay or Nay?

2010-11-23 Thread Jason
What's the status of the Google TC's in regard to this?  Last I read
you were allowed to promote anything in the app that wasn't
purchased via the Market.

From the Android Developer Distribution Agreement: (http://
www.android.com/us/developer-distribution-agreement.html)

You may not use the Market to distribute or make available any
Product whose primary purpose is to facilitate the distribution of
Products outside of the Market.

Or has this been pretty much ignored?

On Nov 21, 2:34 am, JP joachim.pfeif...@gmail.com wrote:
 In case you have the luxury to think concept - as far as I can tell,
 there's a seismic shift going on in what independent developers
 consider viable business approaches to the generation of revenue
 through apps. 'round where I live (San Francisco), you hear the high
 velocity, app market style app sales model declared dead, and you
 won't find many devs any more announcing apps that do not emphasize
 monetization through user engagement. This trend has a few drivers, $.
 99 a pop apps mostly, but also, in Android, the absence of a viable
 and convenient solution in Android Market to buy and sell apps the old
 fashioned way. Based on that, perhaps think about giving away the app
 for three, which serves as a vehicle for in-app payment that points
 back to you (and only your), and that allows you to control
 authorization at the point of payment.

 On Nov 19, 4:09 pm, Sheado chad...@gmail.com wrote:







  Hi All,

  Sorry for starting yet another post on this subject. We're trying to
  decide on whether to go with LVL or just un-protect our apps
  altogether (currently using the copy protection feature). So my
  question:

  * Are you copy protecting/DRM/LVL licensing your apps?

  Some of our concerns include:
  * ROI on time spent with LVL code/testing/bugs versus actual increase
  in sales
  * lack of copy protection in other markets

  Some info we found in other posts:
  * piracy breakdown of a popular app:http://keyeslabs.com/joomla/
  projects/auto-app-licensing/152-a-global-piracy-heat-map
  * some have mentioned going free (ad-only) - some of our apps are
  niche apps, therefore this strategy will not work well for some of
  those apps.

  On a side note: we liked the deprecated copy-protection feature
  because it involved no extra development work and seemed secure enough
  to thwart a casual pirate from easily sharing an app with all of
  their friends. (another side note: we have incurred the wrath of tons
  android1.5 users after removing the copy protection feature - proceed
  with caution if you do so)

  any feedback would be awesome!
  thanks,
  Chad

-- 
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] Help Needed on Android Widget

2010-11-23 Thread Dev Android
Good example but it doesn't help me to my requirement.

Guys,

Please suggest yours opinions.

--
Eng.

On Tue, Nov 23, 2010 at 1:34 PM, Rocky rkjhaw1...@gmail.com wrote:

 Hey,
 go thr this link, u may find the sol

 http://mobiforge.com/developing/story/sms-messaging-android



 On Tue, Nov 23, 2010 at 1:21 PM, Dev Android devandroid1...@gmail.comwrote:


 Rocky,

 Thanks for your reply. We don't have method
 startActivityForResult available in the android widget provider. We have to
 use pendingIntent only. Hope you can try to understand the problem.

 --
 Eng.
 On Tue, Nov 23, 2010 at 1:16 PM, Rocky rkjhaw1...@gmail.com wrote:

 use start activity for result, and from the next activity use bundle to
 pass the result to back

 On Tue, Nov 23, 2010 at 1:05 PM, Dev Android 
 devandroid1...@gmail.comwrote:

 In android widget,

 Is there any mechanism available to get the activity result.

 Scenario:

 On widget we have button and click of this button will launch the
 new activity and after destroying of this activity, this will send some
 results to widget. Is there any callback available to catch the information
 from the launched Activity.

 Thanks in advance!

 --
 Eng.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Thanks  Regards

 Rakesh Kumar Jha
 Software Developer
 Symphony Services Corp (India) Pvt Ltd
 Bangalore
 (O) +918030274295
 (R) +919886336619

  --
 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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Thanks  Regards

 Rakesh Kumar Jha
 Software Developer
 Symphony Services Corp (India) Pvt Ltd
 Bangalore
 (O) +918030274295
 (R) +919886336619

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


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

[android-developers] Re: IllegalStateException in MediaPlayer (Redux)

2010-11-23 Thread Jason
Whoa.. what's with the double post??

On Nov 23, 8:16 pm, Jason Polites jason.poli...@gmail.com wrote:
 Hi folks,

 Some time ago I posted an issue relating to an IllegalStateException
 in the Media Player (http://groups.google.com/group/android-developers/
 browse_thread/thread/46c7c2cd4f4a6958/5551d47aac93632c)

 I have just launched the app into the wild and this error is
 flooding in.

 I just can't seem to fathom why.. here's the code:

 if(mp != null) {
        mp.stop();
        mp.prepareAsync();

 }

 (mp is a MediaPlayer instance BTW).

 According to the doco, prepareAsync is valid for {Initialized,
 Stopped} states.. but I just can't see how it could be in any state
 other than stopped??

 The trace is:

 java.lang.IllegalStateException
       at android.media.MediaPlayer.prepareAsync(Native Method)
       .. the line of code mentioned above follows.

 Is it possible that stop() is not synchronous?  Can't seem to see
 anything in the doco stating this.

 Anyone got any ideas?

 P.S.

 I'm seeing this on a wide range of devices, but all so far are version
 2.1-update1

 --
 Droid Odyssey!  A new game for 
 Androidhttp://www.carboncrystal.com/droid-odyssey/

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

2010-11-23 Thread Jithin

Hi friends,

   As part of my project I need a spinner that should display
items like HTML select tag rather opening a new window.
   Is it possible...?

-- 
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] Change Activity in Tabs on Button Click

2010-11-23 Thread skink


Kumar Bibek wrote:
 Currently this is not supported.


 Kumar Bibek

Why not? If activity that is bound to Tab1 is ActivityGroup you can
easily do it.

pskink

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


Re: [android-developers] Help Needed on Android Widget

2010-11-23 Thread Kostya Vasilyev

AppWidgetProvider is a subclass of BroadcastReceiver.

You can have your Activity send an Intent with extras (for new data 
values) to the widget provider, whenever there is new data to display.


Another way is to update the widget directly from code that updates the 
data. You can use AppWidgetManager anywhere within your application's code.


-- Kostya

23.11.2010 12:22, Dev Android ?:

Good example but it doesn't help me to my requirement.

Guys,

Please suggest yours opinions.

--
Eng.

On Tue, Nov 23, 2010 at 1:34 PM, Rocky rkjhaw1...@gmail.com 
mailto:rkjhaw1...@gmail.com wrote:


Hey,
go thr this link, u may find the sol

http://mobiforge.com/developing/story/sms-messaging-android



On Tue, Nov 23, 2010 at 1:21 PM, Dev Android
devandroid1...@gmail.com mailto:devandroid1...@gmail.com wrote:


Rocky,

Thanks for your reply. We don't have method
startActivityForResult available in the android widget
provider. We have to use pendingIntent only. Hope you can try
to understand the problem.

--
Eng.
On Tue, Nov 23, 2010 at 1:16 PM, Rocky rkjhaw1...@gmail.com
mailto:rkjhaw1...@gmail.com wrote:

use start activity for result, and from the next activity
use bundle to pass the result to back

On Tue, Nov 23, 2010 at 1:05 PM, Dev Android
devandroid1...@gmail.com
mailto:devandroid1...@gmail.com wrote:

In android widget,

Is there any mechanism available to get the
activity result.

Scenario:

On widget we have button and click of this button will
launch the new activity and after destroying of this
activity, this will send some results to widget. Is
there any callback available to catch the information
from the launched Activity.

Thanks in advance!

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




-- 
Thanks  Regards


Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030274295
(R) +919886336619

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




-- 
Thanks  Regards


Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030274295
(R) +919886336619

-- 
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
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-developers%2bunsubscr...@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 

[android-developers] Re: Problem with AnimationDrawable

2010-11-23 Thread Serdel
Thank you for the reply. I really don't get this - following your
advice I moved the animation creating code out of OnCreate. Firstly I
overrided an 'OnStart()' method of the main activity - nothing. Then I
have put it in the OnTick() method of the timer in a simple if
condition to launch only at the first tick - still the same. The image
is loaded but the animation is not starting. But still what is funny
it works when I launch it at the end of timer countdown in the
'OnFinish' 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] Is that possible to print backtrace when debug native code

2010-11-23 Thread A.TNG
Hi All,

When I debug android app, if I work with Java, I can use Log.d(TAG,
, new Throwable()) to print backtrace of Java code. This is
really handy for me to find bugs. But when I work with native library
(e.g. libwebcore.so), there seems no way to print backtrace in
runtime. The only way to debug native code is use gdbserver.

I have a question. Is there any way to print backtrace in C/C++? If
you have any idea, please share with me. Thanks a lot.

-- 
Regards,
Jiyu

-- 
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] Inputtype for edit text not changing

2010-11-23 Thread umakantpatil
Hi..
I want to show edittext which will default show faint color text
written as Password. As soon as user focus on it then I want to
convert it from text to password type. I did that but its not
working..

On focus of the password box. I wrote as follows:


EditText tpassword = (EditText) v;


tpassword.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);

tpassword.setTextColor(getResources().getColor(R.color.black));
tpassword.setText();


Here it changes from grey color to black. All text is also cleared.
But it doesn't change to password type. Is this allowed to change
dynamically input type ?

-- 
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] Inputtype for edit text not changing

2010-11-23 Thread Kostya Vasilyev

You are missing a flag to tell EditText that its contents is text:

setInputType(InputType.TYPE_CLASS_TEXT
| InputType.TYPE_TEXT_VARIATION_PASSWORD);

or

setInputType(InputType.TYPE_CLASS_TEXT
| InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);

Note the use of TYPE_CLASS_TEXT.


You can also use android:hint in the XML file to specify text to display 
when the control is empty:


http://developer.android.com/reference/android/widget/TextView.html#attr_android:hint

Not sure if this works for password fields, but should be easy to check.

-- Kostya

23.11.2010 12:49, umakantpatil пишет:

Hi..
I want to show edittext which will default show faint color text
written as Password. As soon as user focus on it then I want to
convert it from text to password type. I did that but its not
working..

On focus of the password box. I wrote as follows:


EditText tpassword = (EditText) v;


tpassword.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);

tpassword.setTextColor(getResources().getColor(R.color.black));
tpassword.setText();


Here it changes from grey color to black. All text is also cleared.
But it doesn't change to password type. Is this allowed to change
dynamically input type ?




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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


[android-developers] Re: Apps not showing in Market

2010-11-23 Thread bagelboy
There's an app for that!

On Nov 23, 9:08 am, mot12 martin.hu...@gmail.com wrote:
 If you expect anybody to help you here, then at least post your
 manifest. How do you think anybody would know the answer to your
 question? Magic?

 Martin
 mobitobi.com
 Gentle Alarm, Sleep Now

-- 
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: Passing values from an Activity to a class that extends View Class

2010-11-23 Thread ΠΑΣΧΑΛΗΣ ΠΛΙΑΧΑΣ
Well i made this and it works for me
*This is the manifest file*

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=pas.Hari.com
  android:versionCode=1
  android:versionName=1.0
application android:icon=@drawable/icon
android:label=@string/app_name
activity android:name=.TestHari
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity
activity android:name=.DetList/
/application
uses-sdk android:minSdkVersion=4 /

/manifest

*THis is the DetList class*

package pas.Hari.com;


import android.app.Activity;
import android.os.Bundle;

public class DetList extends Activity{
 String i1;
 String i2;
 String i3;
 String i4;
 String i5;


 @Override
public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.details);

 }
}

*And this is the TestHari class*
package pas.Hari.com;



import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class TestHari extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button yes=(Button)findViewById(R.id.yes);
   yes.setOnClickListener(onYes);
}
private View.OnClickListener onYes=new View.OnClickListener()
   {
   public void onClick(View v)
   {
   Intent i=new Intent(TestHari.this, DetList.class);
   startActivity(i);
   }
   };
}

the *DetList *shows Ok on the emulator. the xml files are the same as you
provided



2010/11/23 hari hari.zla...@gmail.com

 i am still facing  a minor problem with this...

 I created the view... But i donno where i should enter the xml layout
 for it... Let me paste the code here... pls have a look n tell me what
 to do ...

 This is the initial code that will load a simple form

 --
 package hari.rts;

 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.view.View;
 import android.widget.Button;

 public class supermarket extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button yes=(Button)findViewById(R.id.yes);
yes.setOnClickListener(onYes);
}
private View.OnClickListener onYes=new View.OnClickListener()
{
public void onClick(View v)
{
Intent i=new Intent(supermarket.this, List.class);
startActivity(i);
}
};
 }

 This is the layout for the above code (main.xml):

 -
 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent

 TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=Welcome to the market
/
 TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=Do you want to use the easy-shopping service?
 /
 Button android:id=@+id/yes
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:text=Yes
 /
 Button android:id=@+id/no
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:text=No
 /
 /LinearLayout

 This is the 2nd form that gives a list of items with checkboxes:

 --
 package hari.rts;



 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.Button;
 import android.widget.CheckBox;
 public class List extends Activity
 {
String i1;
String i2;
String i3;
String i4;
String i5;
 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.details);
  final CheckBox checkbox1 = (CheckBox) findViewById(R.id.check1);
  final CheckBox checkbox2 = (CheckBox) findViewById(R.id.check2);
  final CheckBox checkbox3 = (CheckBox) findViewById(R.id.check3);
  final CheckBox checkbox4 = 

[android-developers] Creating JAR in Eclipse

2010-11-23 Thread Ravi Singh
HI,
I have a thirdparty.jar which I have to add into my Eclipse project
and make one combined JAR for my entire package.
I have added the thirdparty.jar into my pproject using Java Build
Path Libraries settings in eclipse.

But when I try to make jar for my entire project, the jar creation for
my project is success but the thirdparty.jar is not getting included
in my project.jar.

Any idea what could be the reason??

Thanks,
Ravi

-- 
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: guitar tuner

2010-11-23 Thread Yahel
Hi mate,

I worked on one recently but never finished the job.

I found this open source code directly in java code perfect for
Android and which works ok and is pretty easy to understand :

http://thesongeditor.com/ref/FFT.java

I had pretty good result with it.

Good luck.

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] Creating JAR in Eclipse

2010-11-23 Thread Daniel Drozdzewski
On Tue, Nov 23, 2010 at 10:05 AM, Ravi Singh rcsing...@gmail.com wrote:
 HI,
 I have a thirdparty.jar which I have to add into my Eclipse project
 and make one combined JAR for my entire package.
 I have added the thirdparty.jar into my pproject using Java Build
 Path Libraries settings in eclipse.

 But when I try to make jar for my entire project, the jar creation for
 my project is success but the thirdparty.jar is not getting included
 in my project.jar.

 Any idea what could be the reason??

Ravi,

How are you creating enitre_project.jar ?
You can export project as a JAR or EXECUTABLE JAR and from what I can
see, you need the later, which packages or expands all referenced
libraries into the resulting JAR file.

Separate question is, in why would you need this in the context of
Android development? You probably can achieve what you need, without
packaging the whole project into a single JAR file, but I am only
speculating here.

Daniel

-- 
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: LVL - Yay or Nay?

2010-11-23 Thread Yahel
 At this point I'm leaning towards no DRM... hopefully that's the right
 decision.

A good thing it is not an irreversible decision :D

Put your apps on the market with no DRM but a single call home via
http request at the very first start of the app.
In a month you'll be able to compare you're actual sales number to the
number of app which called home and estimate the piracy ratio of your
apps.

Then take the most pirated one, implement LVL just for this one. Wait
for a month and see if the piracy ratio changes enough to make it
worthwile to add LVL to your other apps.

And of course, be sure to report back here to us. I like beautiful
graphics and long analytic blog posts...Thank you very much :D

Good luck.

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


[android-developers] Re: Static Layout for whole app that must be in all Activity

2010-11-23 Thread Ganapathy.C
Thank you all,
But i need a ticker like Marquee in HTML 
and also for all page...

On Nov 22, 11:48 am, Doug beafd...@gmail.com wrote:
 I think the question is essentially asking how to have a view that
 stays on the screen at all times even between changes in active
 activity.

 If there is a way to do that, I don't know what it is.  The only thing
 I can see that stays on the screen uninterrupted is the status bar,
 and only if the active activity allows it to stay there.

 Doug

 On Nov 20, 10:42 pm, Ajay.kakumanu ajaykj...@gmail.com wrote:







  Hello Ganapathy,
  You can use Styles-Themes Concept in Android to acheive this.

  Regards
  Ajay kakumanu

  On Nov 20, 11:33 am, Ganapathy.C cganapa...@gmail.com wrote:

   hi,
   i want a ticker that must marquee for whole application.
   for all activity...
   what to do.

-- 
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] Advanced Device Administration

2010-11-23 Thread m88m
Hey!
 I want to extend the Device Administration framework for my
Enterprise needs, so for example I would be able to better control
which applications installed on the device.

Is there a way to it? (Without rooting the device)

Thanks
M

-- 
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] RTSP streaming using opencore

2010-11-23 Thread venu
Hi all,

I ported android using froyo 2.2.1. Now i want to stream video source
using opencore.I am not able to understand how to use opencore's
API's .  How to use opencore API's like streaming,3G  etc,..Please
give me suggestions how to work on opencore..






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] Re: Inputtype for edit text not changing

2010-11-23 Thread Sarwar Erfan
No need to create this effect manually on focus.
android:hint xml attribute is there for the effect you want.
You do not need to write a single line of code.

==
EditText
android:layout_width=100dip
android:layout_height=wrap_content
android:inputType=textPassword
android:hint=Password  /
==

http://developer.android.com/reference/android/widget/TextView.html#attr_android:hint

Regards
Sarwar Erfan


On Nov 23, 3:49 pm, umakantpatil umakantpat...@gmail.com wrote:
 Hi..
 I want to show edittext which will default show faint color text
 written as Password. As soon as user focus on it then I want to
 convert it from text to password type. I did that but its not
 working..

 On focus of the password box. I wrote as follows:

                                         EditText tpassword = (EditText) v;

                                         
 tpassword.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
                                         
 tpassword.setTextColor(getResources().getColor(R.color.black));
                                         tpassword.setText();

 Here it changes from grey color to black. All text is also cleared.
 But it doesn't change to password type. Is this allowed to change
 dynamically input type ?

-- 
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] Doubt regarding redirection of websites to mobile version and address bar of browser.

2010-11-23 Thread sat
Hi

1.

I am launching the browser in a normal way with URL supplied as
parameter,

Intent ln_intent = new Intent(Intent.ACTION_VIEW);
ln_intent.setDataAndType(Uri.parse(web_url), text/html);
startActivity(ln_intent);

here web_url is any web url.

This opens the browser with the mobile version of the
url(website) ,i.e. from the normal version it gets redirected to
mobile version.

Problem is when I press back address bar shows url of normal version
of the website but the page is blank , How can I overcome this problem.
(i.e. back should directly take me to last activity avoiding showing
the blank page)

2.
Is there any flag by which I can tell the browser to hide the address
bar ? (without using webview)

-- 
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 change color of ListView child items on focus

2010-11-23 Thread viktor
Why did you use complex item layout?

Use selector as TableLayout background.



On 20 Лис, 21:18, Francesco nolano...@gmail.com wrote:
 Hi all.

 i have a list View in my app (this is the xml layout):

 ?xml version=1.0 encoding=utf-8?
 ListView xmlns:android=http://schemas.android.com/apk/res/android;
         android:id=@+id/arrayList
         android:layout_width=fill_parent
 android:layout_height=fill_parent
         android:textFilterEnabled=true
         android:scrollbars=vertical
         android:drawSelectorOnTop=true
 /ListView

 Each item of my list View is composed of two TextView:

 ?xml version=1.0 encoding=utf-8?
 TableLayout android:layout_width=fill_parent
         xmlns:android=http://schemas.android.com/apk/res/android;
 android:id=@+id/row_container
         android:padding=5px android:layout_height=wrap_content
         android:background=@color/white android:shrinkColumns=0
                 TableRow
                 TextView android:layout_height=wrap_content
                         android:layout_width=wrap_content 
 android:layout_below=@+id/
 description
                         android:id=@+id/description
                         android:textColor=@color/black
                         android:scrollHorizontally=true
                         android:singleLine=true/TextView
         /TableRow
         TableRow
                 TextView android:layout_width=wrap_content
                         android:layout_height=wrap_content 
 android:id=@+id/result
                         android:textColor=@color/grey
                         android:maxLines=1
                         android:scrollHorizontally=true/TextView
         /TableRow

 /TableLayout

 I would like to change background color (and text color) of each item
 of my ListView on focus (and, if possibile on selection). How can i do
 it?

 Thanks to all
 francesco

-- 
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 api ajax webservice

2010-11-23 Thread sat
Assuming result = your JSON response.

JSONObject json = null;
JSONObject json_obj = null;
JSONArray json_arr = null;

json = new JSONObject(result.toString());
json_obj = json.getJSONObject(responseData);
json_arr = json_obj.getJSONArray(results);

That should help you.

On Nov 23, 1:12 pm, Atik atik0...@gmail.com wrote:
 hi guys,
 i m stuck with an issue..
 i have created json parser to parse the data  from 
 thishttp://ajax.googleapis.com/ajax/services/search/local?v=1.0sll=48.85...
 i want to parse this data and wanna show in list view in android.

 please give me sampple code. actually ihave done lot work on it but
 still its not giving any output.
 my contact mail id is atik0...@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


[android-developers] Re: Change Activity in Tabs on Button Click

2010-11-23 Thread manu_bet
I did that by static method in TabActivity

On 23 nov, 10:34, skink psk...@gmail.com wrote:
 Kumar Bibek wrote:
  Currently this is not supported.

  Kumar Bibek

 Why not? If activity that is bound to Tab1 is ActivityGroup you can
 easily do it.

 pskink

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


[android-developers] Re: java.lang.IllegalArgumentException: View not attached to window manager

2010-11-23 Thread viktor
You are dismissing dialog in a Runnable, thats why you have exception.

Try do it in UI Thread, I mean obtain message and send it to Handler.

On 20 Лис, 12:45, PaulJ pjablonsk...@gmail.com wrote:
 Hi there brainiacs,

 I'd like to ask about how to proper handle progressDialog in Thread,
 since gettings the error from subject.

 My code:

                                                                 Thread 
 logThread = new Thread()
                                                                 {
                                                                         
 String result = new String();

                                                                         
 @Override
                                                                         
 public void run()
                                                                         {
                                                                               
   Looper.prepare();

                                                                               
   try
                                                                               
   {
                                                                               
           result = ofsomesomeoperation();
                                                                               
   }
                                                                               
   catch (NoSuchAlgorithmException e)
                                                                               
   {

                                                                               
   }
                                                                               
   catch (IOException e)
                                                                               
   {

                                                                               
   }

                                                                               
   logHandler.post(new Runnable()
                                                                               
   {
                                                                               
           public void run()
                                                                               
           {
                                                                               
                   if (result.equals(something1))
                                                                               
                   {
                                                                               
                           dialogLogProg.dismiss();
                                                                               
                           showDialog(dialog_something1);
                                                                               
                   }
                                                                               
                   else if (result.equals(something2))
                                                                               
                   {
                                                                               
                           dialogLogProg.dismiss();
                                                                               
                           showDialog(something2);
                                                                               
                   }
                                                                               
                   else
                                                                               
                   {
                                                                               
                           dialogLogProg.dismiss();
                                                                               
                           Intent newint = new Intent(Example.this,
 NewInt.class);
                                                                               
                           startActivity(newint);
                                                                               
                           Example.this.finish();
                                                                               
                   }
                                                                               
           }
                                                                               
   });
                                                                               
   Looper.loop();
                                                                         }
                                                                 };
                                                                 
 logThread.start();

 Problem occurs when a dialog progress appears and I change my phone
 orientation, it freezes and crashes.

 

[android-developers] Re: google api ajax webservice

2010-11-23 Thread sat
Using JSON array from the previous post , one can do like this ,

String res = json_arr.get(0).toString();  //To get the first result.
obj = (JSONObject) new JSONTokener(res).nextValue();
String url = obj.getString(url);   //assuming url is one of the
field in JSON response.

Now u can display this in listview.

On Nov 23, 4:30 pm, sat sathvikm...@gmail.com wrote:
 Assuming result = your JSON response.

 JSONObject json = null;
 JSONObject json_obj = null;
 JSONArray json_arr = null;

 json = new JSONObject(result.toString());
 json_obj = json.getJSONObject(responseData);
 json_arr = json_obj.getJSONArray(results);

 That should help you.

 On Nov 23, 1:12 pm, Atik atik0...@gmail.com wrote:

  hi guys,
  i m stuck with an issue..
  i have created json parser to parse the data  from 
  thishttp://ajax.googleapis.com/ajax/services/search/local?v=1.0sll=48.85...
  i want to parse this data and wanna show in list view in android.

  please give me sampple code. actually ihave done lot work on it but
  still its not giving any output.
  my contact mail id is atik0...@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


[android-developers] Re: SharedPreferences are not stored

2010-11-23 Thread Bob Kerns
I would bet that you are accessing a different set of preferences than
the ones you're saving in the preference screen.

The Preference screen uses the preference file returned from
PreferenceManager.getDefaultSharedPreferences(context); (context will
typically be 'this' -- your activity).

If you call getPreferences() on the activity, it returns one that is
private to the activity, which isn't what you want here.



On Nov 21, 11:43 am, Claudio M. Camacho claudio...@gmail.com
wrote:
 Hello everybody,

 This is my first question. I tried to ask in android-beginners, but
 the group is discontinued.

 My problem is using SharedPreferences. I just created a
 PreferenceScreen which holds inside a ListPreference with an array
 of 5 different values. Very simple! The array of values are different
 numbers: 1, 2, 5, 10 and 30.

 Every time I change the setting, the application remembers  that and I
 can see the setting I chose when I access the preferences once again
 (as an user). Now, in the code, when I retrieve the setting using the
 key (e.g. getString(delay, default_delay);), I always get the
 default value, it seems that the SharedPreferences does not find my
 setting.

 Can anybody help? I have read about
 SharedPreferences.getEditor().commit(), but that should be used only
 when changing settings from the code, not from the UI preferences.

 Anyone had this problem before?

 P.S.- I use Froyo 2.2 to run the application (on a Samsung Galaxy S).

 --Claudio

-- 
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 change color of ListView child items on focus

2010-11-23 Thread sat
I dint go through ur xml , But I will give an idea.
implemet OnListItemClick handler of listview and we get access to the
child views , and u can change the background color using it.

On Nov 23, 4:23 pm, viktor victor.scherb...@gmail.com wrote:
 Why did you use complex item layout?

 Use selector as TableLayout background.

 On 20 Лис, 21:18, Francesco nolano...@gmail.com wrote:

  Hi all.

  i have a list View in my app (this is the xml layout):

  ?xml version=1.0 encoding=utf-8?
  ListView xmlns:android=http://schemas.android.com/apk/res/android;
          android:id=@+id/arrayList
          android:layout_width=fill_parent
  android:layout_height=fill_parent
          android:textFilterEnabled=true
          android:scrollbars=vertical
          android:drawSelectorOnTop=true
  /ListView

  Each item of my list View is composed of two TextView:

  ?xml version=1.0 encoding=utf-8?
  TableLayout android:layout_width=fill_parent
          xmlns:android=http://schemas.android.com/apk/res/android;
  android:id=@+id/row_container
          android:padding=5px android:layout_height=wrap_content
          android:background=@color/white android:shrinkColumns=0
                  TableRow
                  TextView android:layout_height=wrap_content
                          android:layout_width=wrap_content 
  android:layout_below=@+id/
  description
                          android:id=@+id/description
                          android:textColor=@color/black
                          android:scrollHorizontally=true
                          android:singleLine=true/TextView
          /TableRow
          TableRow
                  TextView android:layout_width=wrap_content
                          android:layout_height=wrap_content 
  android:id=@+id/result
                          android:textColor=@color/grey
                          android:maxLines=1
                          android:scrollHorizontally=true/TextView
          /TableRow

  /TableLayout

  I would like to change background color (and text color) of each item
  of my ListView on focus (and, if possibile on selection). How can i do
  it?

  Thanks to all
  francesco

-- 
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: Creating 2D games with Android and Blender

2010-11-23 Thread Ruben
Hi Miguel,

I'm getting solid 60 fps on my Samsung Galaxy Spica (800 mhz
processor) for most levels. I have heard that does not work so well in
the HTC Magic...
CPU load is quite balanced between updating the scene and rendering
it, thus I could improve performance by optimizing the update phase
(collision detection is a good candidate) without changing the canvas
approach. I am an OpenGL lover, but unfortunatelly my phone has poor
support for it :(

The biggest problem was the handling of input events. It hurts
performance a lot by default. My solution is to save every motion
event data in the same variable, and processing the most recent one in
the main render loop/thread. This, incidentally, avoids some thread
synchronization problems.

On 23 nov, 09:13, Miguel Morales therevolti...@gmail.com wrote:
 Nice, I enjoyed the part of content creation.  I'm going to keep your
 suggestion of using a single bitmap with all the sprites instead of
 individual images.
 Although it's not terrible it does indeed have a performance impact.

 Are you getting good performance using this approach with canvas alone?
 In either case, good job.





 On Sun, Nov 21, 2010 at 2:51 PM, Ruben ruben@gmail.com wrote:
  I have just written an in-depth article covering the workflow of 2D
  game creation for Android with blender, based in my own experience
  with the game Egg Savior. I hope you find it usefull.
  Feel free to share your knowledge and propose other alternatives to
  these ideas.

 http://organicandroid.blogspot.com/2010/11/creating-2d-games-with-and...

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

 --
 ~ Jeremiah:9:23-24
 Android 2D 
 MMORPG:http://developingthedream.blogspot.com/,http://www.youtube.com/user/revoltingx

-- 
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: Inputtype for edit text not changing

2010-11-23 Thread umakantpatil
Thanks Sarwar..
It works..


On Nov 23, 4:10 pm, Sarwar Erfan erfanonl...@gmail.com wrote:
 No need to create this effect manually on focus.
 android:hint xml attribute is there for the effect you want.
 You do not need to write a single line of code.

 ==
 EditText
 android:layout_width=100dip
 android:layout_height=wrap_content
 android:inputType=textPassword
 android:hint=Password  /
 ==

 http://developer.android.com/reference/android/widget/TextView.html#a...

 Regards
 Sarwar Erfan

 On Nov 23, 3:49 pm, umakantpatil umakantpat...@gmail.com wrote:







  Hi..
  I want to show edittext which will default show faint color text
  written as Password. As soon as user focus on it then I want to
  convert it from text to password type. I did that but its not
  working..

  On focus of the password box. I wrote as follows:

                                          EditText tpassword = (EditText) v;

                                          
  tpassword.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
                                          
  tpassword.setTextColor(getResources().getColor(R.color.black));
                                          tpassword.setText();

  Here it changes from grey color to black. All text is also cleared.
  But it doesn't change to password type. Is this allowed to change
  dynamically input type ?

-- 
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: Problem with AnimationDrawable

2010-11-23 Thread Serdel
Ok I have managed to launch the animation at activity startup by
putting it in the onWindowFocusChanged method. However I am still
struggling with the out of memory problems. I tried to use some
suggestions people give on the net like
analyseAnimation.setCallback(null)
oranalyseImage.setBackgroundDrawable(null) but nothing works. Does any
one know how to overcome this problem?

-- 
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: Problem with AnimationDrawable

2010-11-23 Thread Kumar Bibek
Reduce the size of your drawables. Make them 9patch if you can.


Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Tue, Nov 23, 2010 at 5:24 PM, Serdel adam.lichwierow...@gmail.comwrote:

 Ok I have managed to launch the animation at activity startup by
 putting it in the onWindowFocusChanged method. However I am still
 struggling with the out of memory problems. I tried to use some
 suggestions people give on the net like
 analyseAnimation.setCallback(null)
 oranalyseImage.setBackgroundDrawable(null) but nothing works. Does any
 one know how to overcome this problem?

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Re: How to embed an external Activity inside one of mine?

2010-11-23 Thread Francesco Vadicamo
Hi Kumar and thanks for your reply!
Yes, I mean an Activity inside another - external - Activity..! I'd
like to show a PDF with two buttons, accept or reject, below.
Is there any way for doing it?
Any ideas?

Thanks,
Francesco

On Nov 23, 7:32 am, Kumar Bibek coomar@gmail.com wrote:
 You mean, Activity inside an Activity? No way.

 At the most, you can setup an Activity inside a ViewGroup, but
 activity of another application?, that's too complex, have never even
 thought about it.

 On Nov 22, 4:14 pm, Francesco Vadicamo f.vadic...@gmail.com wrote:







  Hi all,
  I need an Activity showing a specified PDF and two buttons. Is
  possibile to embed an external PDF viewer - showing a specified URI -
  inside the view of my application?
  How can I do it?
  Thanks in advance,
  Francesco

-- 
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] Runtime Exception in MediaRecorder.setAudioSource() method

2010-11-23 Thread David_Fisher
Hi, I have a service that has a broadcast receiver which listens to
Phone state changes.
When i receive an incoming call, i get an instance of the AudioManager
class and set the speakerphone to true.
But right after this when i do the
mediaRecorder.setAudioSource(MediaRecorder.setAudioSource.MIC), I get
a RunTime exception. Why is this happening? What am I doing wrong.
I have a GUI based version and that works perfect when I do this.
Except that it does not have a service and a Phonestatelistner. Can
someone help me with this? Thanks
David

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


Re: [android-developers] How to push the code change to Android open source project.

2010-11-23 Thread Feng Chris
Many thanks for your help!!

Thanks,
Chris

2010/11/23 Kumar Bibek coomar@gmail.com

 Umm, there's a long long procedure for this. You should contact the team at
 source.android.com and wait for their response.

 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com



 On Mon, Nov 22, 2010 at 8:12 AM, Feng Chris chris@gmail.com wrote:

 Hi all,

 How to push the code change to Android open source project?
 Anyone could provide a push command for me?

 Many thanks for your help!

 Thanks,
 Chris

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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: 1.5 quits for apparently no reason whilst animating (WIN DEATH)

2010-11-23 Thread Jason
Can you post some code?  Specifically the portion that does the
drawing.

On Nov 23, 1:44 am, Muleskinner ja...@maturusmobile.com wrote:
 Hi,

 I have an app that is working fine in 1.6 and up but crashing for
 apparently no reason in 1.5. The app suddenly quits with the following
 message...

 I/WindowManager(  563): WIN DEATH: Window{43717218
 com.bitbull.meat.android/com.bitbull.meat.android.MEATActivity
 paused=false}
 I/WindowManager(  563): WIN DEATH: Window{4373f458 SurfaceView
 paused=false}
 D/Zygote  (  541): Process 723 terminated by signal (11)
 W/InputManagerService(  563): Got RemoteException sending
 setActive(false) notification to pid 723 uid 10019

 This error happens when the app is 'idling' (ie not doing anything
 other than redrawing the screen). There is no state change and no user
 input. The error occurs after the same amount of elapsed time whatever
 I set the frame rate of the app to and occurs both on the emulator and
 device. Changing what I display on screen can stop the error but there
 appears to be no logic to this (in one instance not drawing a large
 image stops the error but elsewhere just drawing some text causes the
 app to crash in the same manner).

 I am using SurfaceView for animations following the basic procedure in
 the Lunar Lander sample app.

 If anyone could help with this I would be *extremely* grateful as it
 has me completely stumped at the moment.

 best 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] Re: Need Help !!

2010-11-23 Thread Jason
Not sure if it's what you want.. but you could try using a
ViewFlipper...

http://developer.android.com/reference/android/widget/ViewFlipper.html

On Nov 22, 11:16 am, Anis Ben Nsir anis.benn...@gmail.com wrote:
 I'm using a TabActivity to run two activity.
 In the first activity I'm using GestureDetector.Fling for flipping
 between views of the first Activity.
 I have tested the first activity and it works well.
 But when I have add it into the TabHost using TasSpec  setContent(new
 Intent(this,MyFlipper.class).
 The problem that i'm no longer able to catch the fling.

 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: Initial position of scrollbar in ListView

2010-11-23 Thread Prateek Jain
Hi,

I think headers are the part of ListView (therefore 1st ListView
item), so you cannot make scrollbar at the top when the focus is on
the the next item. No so sure though.

Cheers,
Prateek

On Nov 18, 5:30 pm, lou louis.coq...@wopata.com wrote:
 Hi !
 I'm actually working on a ListView, which have two headers.
 The problem : the scrollbar starts to the first header, so when I'm on
 the first item, the scrollbar isn't at the top.
 Any idea?
 Thanks a lot.

-- 
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: Raising intent to child of tab activity

2010-11-23 Thread Anzi
But I want to switch from different activity to child activity of tab
activity and process the intent of which was raised from my child tab
activity.

On Nov 23, 11:26 am, Kumar Bibek coomar@gmail.com wrote:
 Instead of raising an Intent, just change the selected Tab to the one
 that contains your activity. The activity lifecycle for that would
 automatically start.

 On Nov 23, 10:16 am,Anzianji...@gmail.com wrote:



  Hi,

  How to raise an intent to child of tab activity, so that activity
  manager displays respective tab activity as a foreground activity to
  handle the intent in onNewIntent().

  I was tried raising an intent, but activity is displaying as a
  separate activity instead of child of my tab activity.

  Regards,
 Anzi.

-- 
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] https X509 webview

2010-11-23 Thread Seb
I need a webview which can connect and auth using x509 certs.

1. One idea which came to mind was that I could override or implement
some interface where I could use my own code for creating a secure
socket. However I cant seem to get started with this approche. I have
read the docs at 
http://developer.android.com/reference/android/webkit/WebViewClient.html
and AFAI can see this would be the class to override. However I'm not
sure which methods I should replace.

2. Another way would be implementing the following steps:
connect, auth and read the data (the body part of the http response)
and load it into a webview
intercept onclick or url loading and manually use httplib (or
whatever) to read the data and finally load it into the webview again


The first idea seems to be the best from a beautiful code
perspective... but I need some pointers before thats possible for me.
The second solution seems like a hack which actually isnt that big a
deal since client certs (most likely) will be supported in futhere
versions of the android browser. However I'm not 100% sure that it
will actually work. Cookies is one thing which needs to be support by
the httplib in question and also shared with the webview in case
someone wants to use js to read cookies.


Best regards,
Seb

-- 
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: Spinner Style

2010-11-23 Thread pedr0
Do you are looking a spinner wheel or a spinner menu?



On 23 Nov, 10:28, Jithin danijanuv...@gmail.com wrote:
 Hi friends,

            As part of my project I need a spinner that should display
 items like HTML select tag rather opening a new window.
            Is it possible...?

-- 
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: Andriod Trainer(10-15k per day)

2010-11-23 Thread Jason
lol

On Nov 23, 6:27 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 What are you, a slave driver?  I refuse to do for under 20k a day,
 sorry.

 On Nov 20, 12:49 pm, syed sameer sameer36...@gmail.com wrote:







  We need an Android trainer; the compensation will be 10-15k per day
  for a span of 2weeks, (this training can be extended for 4 months).
  Please send your profile to sameer36...@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


[android-developers] Re: Initial position of scrollbar in ListView

2010-11-23 Thread pedr0
You can use  this function:

http://developer.android.com/reference/android/widget/ListView.html#setSelection(int)

ListView.setSelection(int position)


It works?


On 23 Nov, 13:33, Prateek Jain mrprateekj...@gmail.com wrote:
 Hi,

 I think headers are the part of ListView (therefore 1st ListView
 item), so you cannot make scrollbar at the top when the focus is on
 the the next item. No so sure though.

 Cheers,
 Prateek

 On Nov 18, 5:30 pm, lou louis.coq...@wopata.com wrote:







  Hi !
  I'm actually working on a ListView, which have two headers.
  The problem : the scrollbar starts to the first header, so when I'm on
  the first item, the scrollbar isn't at the top.
  Any idea?
  Thanks a lot.

-- 
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: Is that possible to print backtrace when debug native code

2010-11-23 Thread DanH
There's no generic C/C++ facility for that -- it would be system-
specific (if it exists at all).

On Nov 23, 3:45 am, A.TNG tang.j...@gmail.com wrote:
 Hi All,

 When I debug android app, if I work with Java, I can use Log.d(TAG,
 , new Throwable()) to print backtrace of Java code. This is
 really handy for me to find bugs. But when I work with native library
 (e.g. libwebcore.so), there seems no way to print backtrace in
 runtime. The only way to debug native code is use gdbserver.

 I have a question. Is there any way to print backtrace in C/C++? If
 you have any idea, please share with me. Thanks a lot.

 --
 Regards,
 Jiyu

-- 
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 use Google Places API

2010-11-23 Thread Spiral123
Did you get accepted for the limited developer preview?

On Nov 18, 3:12 am, bluepig bluepi...@gmail.com wrote:
 I found the following note in The Google Places API (Developer
 Preview)

 http://code.google.com/apis/maps/documentation/places/#PlaceDetailsRe...

 Note: To use the Google Places API you must first request a Maps API
 client ID and cryptographic key which you must use to sign your
 request URLs. For information on signing URL requests, please see the
 URL Authentication documentation within the Web Service APIs home
 page.

 But followed the instruction, I still do not know how to get the Maps
 API client ID and cryptographic key.

 Could someone help?  Thanks

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


[android-developers] Android onClick seems to be blocking onFling

2010-11-23 Thread CB
I have an Activity that implements a Gesture Detector to catch the
user fling input for navigation to other screens. That was working
fine - but - I recently updated a class that derives from my
BaseActivity to add an onClick function and now that click event seems
to block the onFling from being hit. The onClick is tied to a TextView
area (in a LinearLayout) I have on my screen. The resultsClick method
is wired to the TextView using its onClick property in the XML layout.

I've tried changing the return values in onSingleTapUp and onDown
without luck. I've also tried adding log statements to all the
functions below as well. None of them fire when I fling in the
TextView area but they do on other areas of the screen.

Maybe I am using the wrong search terms, but I couldn't seem to find
an example that addressed this - yet I'm sure this problem has been
solved before.

public class DerivedActivity extends BaseActivity
{
   ...
   /**
* resultsClick - The user clicked on the Results area
* @param v
*/
   public void resultsClick(View v)
   {
  try
  {
 Log.i(this.toString(), resultsClick);
 startActivity(new Intent(this, Results_TabHost.class ));
  }
  catch (Exception e)
  {
 Log.e(this.toString(), Exception + e.toString());
  }

   }// end resultsClick
   ...
}

Here is the base class that implements the GestureListener code

public class BaseActivity extendsActivityGroup
  implements OnGestureListener
{
   ...
   private static final int SWIPE_MIN_DISTANCE = 120;
   private static final int SWIPE_MAX_OFF_PATH = 250;
   private static final int SWIPE_THRESHOLD_VELOCITY = 200;

   public boolean onFling(MotionEvent e1,
  MotionEvent e2,
  float velocityX,
  float velocityY)
   {
  try
  {
 Log.i(this.toString(), onFling);

 // jump right out if not a swipe/fling
 if (Math.abs( e1.getY() - e2.getY() )  SWIPE_MAX_OFF_PATH)
 {
return false;
 }

 // right to left swipe
 if (e1.getX() - e2.getX()  SWIPE_MIN_DISTANCE 
 Math.abs(velocityX)SWIPE_THRESHOLD_VELOCITY )
 {
Log.i(this.toString(), fling left);
rightArrowClick(null);

 }
 else if (e2.getX() - e1.getX()  SWIPE_MIN_DISTANCE 
  Math.abs(velocityX)SWIPE_THRESHOLD_VELOCITY )
 {
Log.i(this.toString(), fling right);
leftArrowClick(null);
 }
  }
  catch (Exception e)
  {
 Log.e(this.toString(), Exception + e.toString());
  }

  return true;

   }// end onFling

   // These next methods we are required to have - even if unused -
   // in order for the Gesture Handling to work

   @Override
   public boolean onTouchEvent(MotionEvent motionEvent)
   {
  if(this.gestureDetector.onTouchEvent(motionEvent))
  {
 return true;
  }

  //no gesture detected, let Activity handle touch event
  return super.onTouchEvent(motionEvent);
   }

   @Override
   public void onLongPress(MotionEvent e)
   {
  // Intentionally not handling - must be overridden by listener
class
   }

   @Override
   public boolean onScroll(MotionEvent e1, MotionEvent e2, float
distanceX, float distanceY)
   {
  // Intentionally not handling - must be overridden by listener
class
  // Intentionally returning true - per code examples
  return true;
   }

   @Override
   public void onShowPress(MotionEvent e)
   {
  // Intentionally not handling - must be overridden by listener
class
   }

   @Override
   public boolean onSingleTapUp(MotionEvent e)
   {
  // Intentionally not handling - must be overridden by listener
class
  // Intentionally returning true - per code examples
  return true;
   }

   @Override
   public boolean onDown(MotionEvent e)
   {
  // Intentionally not handling - must be overridden by listener
class
  // Intentionally returning true - per code examples
  return true;
   }
...
}

-- 
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] Having trouble setting custom TitleView for a Dialog

2010-11-23 Thread William Ferguson
I am trying to create a dialog with a custom title and content views
but am running into ResourceNotFoundExceptions when I try and inflate
the views.

final TextView titleView = (TextView) View.inflate(activity,
R.id.how_to_play_dialog_title, null);

final WebView contentView = (WebView) View.inflate(activity,
R.id.how_to_play_dialog_text, null);
contentView.loadData(htmlbodysome text/body/html,
text/html, utf-8);

final AlertDialog.Builder builder = new
AlertDialog.Builder(activity);
builder.setCustomTitle(titleView);
builder.setView(contentView);

The above code throws the ResourceNotFound on each of the View
inflates even though I have res/layout/how_to_play_dialog.xml as the
follwing:


?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=wrap_content
android:layout_height=wrap_content


TextView android:id=@+id/how_to_play_dialog_title
  android:layout_width=fill_parent
  android:layout_height=wrap_content
  android:text=@string/how_to_play_dialog_title
  style=@style/dialogTitle
/

WebView android:id=@+id/how_to_play_dialog_text
android:layout_width=wrap_content
android:layout_height=wrap_content
/
/LinearLayout


I can retrieve the Views (using findViewById) if I inflate the entire
layout first, but then I need to remove the views from the layout
before adding them to the Dialog.

Can't I just inflate the Views directly, using View#inflate?


The actual stacktrace is:
Caused by: android.content.res.Resources$NotFoundException: Resource
ID #0x7f0a000c type #0x12 is not valid
at
android.content.res.Resources.loadXmlResourceParser(Resources.java:
1874)
at android.content.res.Resources.getLayout(Resources.java:731)
at android.view.LayoutInflater.inflate(LayoutInflater.java:
318)
at android.view.LayoutInflater.inflate(LayoutInflater.java:
276)
at android.view.View.inflate(View.java:8665)
at
au.com.xandar.jumblee.widget.DialogFactory.createHowToPlayDialog(DialogFactory.java:
35)

-- 
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: Maps doesn't show

2010-11-23 Thread coy
Tommy,
Yes, it could be the problem.
But what is the right API KEY?

Moreover, I exported my app as a unsigned android app and then I
pushed it to the phone. Is that the problem??

thanks :)

On Nov 14, 9:57 pm, Tommy droi...@gmail.com wrote:
 Sounds like you don't have the right API key in. You need one for
 Developement and one for Production. So one for when you push it to the
 phone from Eclipse or whatever and one You use when you publish the
 application. That sounds like your issue right there. I had it happen to me
 where it shows the markers but it won't actually load the map tiles. Check
 that API key, if you don't have one you need one :)

 Hope that helps.

 Tommy

 Android Mobile Phone Application Developer
 Database Administrator
 .net Web Specialist







 -Original Message-
 From: android-developers@googlegroups.com

 [mailto:android-develop...@googlegroups.com] On Behalf Of coy
 Sent: Sunday, November 14, 2010 4:08 PM
 To: Android Developers
 Subject: [android-developers]Mapsdoesn't show

 Hello,
 I have map in my android app.
 On emulator is everything OK.
 But on device (Motorola Droid) the map shows marker but doesn't show
 real map in background!!
 The conection is OK and I held the INTERNET permission in my manifest.
 What is causing this problem? Any idea?

 thnks!

 --
 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 
 athttp://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] GPU

2010-11-23 Thread Daniel Drozdzewski
On Sat, Nov 20, 2010 at 1:40 AM, Nathaniel Warner
warner.nathan...@gmail.com wrote:
 How do I force my application to use the current devices GPU if one is
 available?

By using anything visual ... ?
Platform will utilise GPU without your interference.

Daniel

-- 
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 change color of ListView child items on focus

2010-11-23 Thread viktor
sat, it is not correct, because Francesco wants use a focus.

On 23 Лис, 13:47, sat sathvikm...@gmail.com wrote:
 I dint go through ur xml , But I will give an idea.
 implemet OnListItemClick handler of listview and we get access to the
 child views , and u can change the background color using it.

 On Nov 23, 4:23 pm, viktor victor.scherb...@gmail.com wrote:







  Why did you use complex item layout?

  Use selector as TableLayout background.

  On 20 Лис, 21:18, Francesco nolano...@gmail.com wrote:

   Hi all.

   i have a list View in my app (this is the xml layout):

   ?xml version=1.0 encoding=utf-8?
   ListView xmlns:android=http://schemas.android.com/apk/res/android;
           android:id=@+id/arrayList
           android:layout_width=fill_parent
   android:layout_height=fill_parent
           android:textFilterEnabled=true
           android:scrollbars=vertical
           android:drawSelectorOnTop=true
   /ListView

   Each item of my list View is composed of two TextView:

   ?xml version=1.0 encoding=utf-8?
   TableLayout android:layout_width=fill_parent
           xmlns:android=http://schemas.android.com/apk/res/android;
   android:id=@+id/row_container
           android:padding=5px android:layout_height=wrap_content
           android:background=@color/white android:shrinkColumns=0
                   TableRow
                   TextView android:layout_height=wrap_content
                           android:layout_width=wrap_content 
   android:layout_below=@+id/
   description
                           android:id=@+id/description
                           android:textColor=@color/black
                           android:scrollHorizontally=true
                           android:singleLine=true/TextView
           /TableRow
           TableRow
                   TextView android:layout_width=wrap_content
                           android:layout_height=wrap_content 
   android:id=@+id/result
                           android:textColor=@color/grey
                           android:maxLines=1
                           android:scrollHorizontally=true/TextView
           /TableRow

   /TableLayout

   I would like to change background color (and text color) of each item
   of my ListView on focus (and, if possibile on selection). How can i do
   it?

   Thanks to all
   francesco

-- 
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 calls to web service slow? Using .NET web service

2010-11-23 Thread Jason
I have a similar use case, although I am only POSTing data and it's a
simple RESTful service, but the data exchange mechanism is the same.
I haven't actually timed it but your times don't seem wildly out from
what I have seen.

One thing that stands out in your code is the timer.  You should
probably separate the timing for the execution of the web service (the
GET) and the data download.  You could also try (just as a test)
replacing the domain with an IP address to avoid the DNS overhead.

Basically I'm saying I think you need to break down the timings to
narrow down the scope of the problem.

IMO I don't think the while loop is the problem.. despite the fact
that it's pretty much the only way to get the data, I don't see how
just using a while loop would cause a delay, although you could try
reading raw bytes into a buffer and then encoding to a String at the
end.. but I doubt it would make much difference.

The final tip (if you aren't already) is to make this process
asynchronous.  800 milliseconds is an age when you're looking at the
UI waiting for a response, but if this can be done as an asynchronous
task while the user is kept busy with other things then it just ceases
to be a problem.  May not be suitable for your situation, but as a
general rule I always try to design apps (not just mobile) where
anything that may take some time is put off to one side while I keep
the user busy elsewhere.

Oh.. also.. if there are things that don't change frequently on your
server, you could consider implementing a simple local cache.  So you
only go to the web service after some sort of timeout, or if several
services relate to each other (ie same data from different service
endpoints) then you could just have one service that just a diff check
(ie. just asks if anything has changed) and if not uses local cache.
Just key the cache entry on the endpoint URL.

Good luck!

On Nov 23, 6:18 pm, Kumar Bibek coomar@gmail.com wrote:
 Well, my guess would be the long time can be attributed to the while loop
 you have. That is probably where your code is getting stuck.

 HttpResponse response = client.execute(request);

 Try putting the log after this line, and see the times. If its still quite a
 lot, then you have to worry.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com







 On Fri, Nov 19, 2010 at 4:30 AM, Wipeout 4.9fi...@gmail.com wrote:
  Hey guys,
  This is my first post to the Android Developers group. I have been
  working with HTTP communication in the Android SDK and have noticed
  that calls to a web service through my app are very slow (taking
  800+ms on high speed wifi). They take less than 100ms if I call the
  web service through the phone's browser. I am developing on a Google
  Nexus One. The size of the data returned is very small, 1K. I have
  tried enabling gzip compression, and that helps slightly but I assume
  there is another problem at hand. I have tried using SOAP with the
  ksoap2-android library, as well as making things simple using
  HttpClient and InputStreamReader. Below is my code for the fastest I
  can make the app perform; using no SOAP, and using GZIP compression. I
  apologize for the lengthy code -- I think all of it is beneficial for
  determining the best way to make this request and response happen
  faster.

  [code]
  public String GetRest()
         {

         long startTime = System.currentTimeMillis();
         String result = ;

         Log.v(time, Beginning rest:  + (System.currentTimeMillis() -
  startTime) + ms);

             try
             {
                 HttpClient client = new DefaultHttpClient();
                 HttpGet request = new HttpGet(https://usad.enlyght.com/ws/
  AndroidService.asmx/GetWebServiceVersion);
                 request.addHeader(Accept-Encoding, gzip);

                 Log.v(time, Before call:  + (System.currentTimeMillis()
  -
  startTime) + ms);
                 HttpResponse response = client.execute(request);
                 InputStream instream = response.getEntity().getContent();
                 Header contentEncoding = response.getFirstHeader(Content-
  Encoding);
                 if (contentEncoding != null 
  contentEncoding.getValue().equalsIgnoreCase(gzip)) {
                     instream = new GZIPInputStream(instream);
                 }
                 InputStreamReader isreader = new
  InputStreamReader(instream);
                 BufferedReader reader = new BufferedReader(isreader);
                 StringWriter sw = new StringWriter();

                 String read;
                 while ((read = reader.readLine()) != null) {
                         result += read;
                 }

                 client.getConnectionManager().shutdown();
         }
         catch (Exception e) {}
         Log.v(time, End rest:  + (System.currentTimeMillis() -
  startTime) + ms);

         return result;
         }
  [/code]

  Regards,
  Adam Smith
  Norsoft

  --
  You received this message because 

[android-developers] Re: GPU

2010-11-23 Thread Jason
Are you saying you want to use the GPU to process raw data.. or just
to render graphics?

If it's the former then you'd certainly have to do this from native
code, and I doubt you would be able to access this without root access
on the device.

If it's the latter then the previous poster is correct, however if you
want to offload some of the processing of images and coordinate
translation to the GPU then you may need to use OpenGL.  I'm not 100%
sure how much of the Canvas API is deferred to the GPU but definitely
things like matrix transformations and image buffers are in hardware
with OpenGL.

On Nov 24, 12:52 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com
wrote:
 On Sat, Nov 20, 2010 at 1:40 AM, Nathaniel Warner

 warner.nathan...@gmail.com wrote:
  How do I force my application to use the current devices GPU if one is
  available?

 By using anything visual ... ?
 Platform will utilise GPU without your interference.

 Daniel

-- 
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: Having trouble setting custom TitleView for a Dialog

2010-11-23 Thread viktor
You are on wrong way, you can inflate only layout (ViewGroup), but not
child view,
try to using View.inflate(activity, R.layout.how_to_play_dialog,
null);


On 23 Лис, 15:18, William Ferguson william.ferguson...@gmail.com
wrote:
 I am trying to create a dialog with a custom title and content views
 but am running into ResourceNotFoundExceptions when I try and inflate
 the views.

         final TextView titleView = (TextView) View.inflate(activity,
 R.id.how_to_play_dialog_title, null);

         final WebView contentView = (WebView) View.inflate(activity,
 R.id.how_to_play_dialog_text, null);
         contentView.loadData(htmlbodysome text/body/html,
 text/html, utf-8);

         final AlertDialog.Builder builder = new
 AlertDialog.Builder(activity);
         builder.setCustomTitle(titleView);
         builder.setView(contentView);

 The above code throws the ResourceNotFound on each of the View
 inflates even though I have res/layout/how_to_play_dialog.xml as the
 follwing:

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
     android:layout_width=wrap_content
     android:layout_height=wrap_content
     

     TextView android:id=@+id/how_to_play_dialog_title
               android:layout_width=fill_parent
               android:layout_height=wrap_content
               android:text=@string/how_to_play_dialog_title
               style=@style/dialogTitle
     /

     WebView android:id=@+id/how_to_play_dialog_text
         android:layout_width=wrap_content
         android:layout_height=wrap_content
     /
 /LinearLayout

 I can retrieve the Views (using findViewById) if I inflate the entire
 layout first, but then I need to remove the views from the layout
 before adding them to the Dialog.

 Can't I just inflate the Views directly, using View#inflate?

 The actual stacktrace is:
 Caused by: android.content.res.Resources$NotFoundException: Resource
 ID #0x7f0a000c type #0x12 is not valid
         at
 android.content.res.Resources.loadXmlResourceParser(Resources.java:
 1874)
         at android.content.res.Resources.getLayout(Resources.java:731)
         at android.view.LayoutInflater.inflate(LayoutInflater.java:
 318)
         at android.view.LayoutInflater.inflate(LayoutInflater.java:
 276)
         at android.view.View.inflate(View.java:8665)
         at
 au.com.xandar.jumblee.widget.DialogFactory.createHowToPlayDialog(DialogFact 
 ory.java:
 35)

-- 
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: Is that possible to print backtrace when debug native code

2010-11-23 Thread Jason
If you want to just print a log line, you can do this with the log.h
library:

#include android/log.h

__android_log_print(ANDROID_LOG_DEBUG, Category, Your message);

But you won't get a stack trace (I'm assume from backtrace you mean
stack trace?)

If you are trying to handle exceptions in C++ then I think you're
out of luck:

http://groups.google.com/group/android-ndk/browse_thread/thread/89db67ed1fbf6450/6f156e8cd5b27193

You can however parse and interpret the native error trace with some
degree of success:

http://code.google.com/p/android-ndk-stacktrace-analyzer/

On Nov 24, 12:15 am, DanH danhi...@ieee.org wrote:
 There's no generic C/C++ facility for that -- it would be system-
 specific (if it exists at all).

 On Nov 23, 3:45 am, A.TNG tang.j...@gmail.com wrote:







  Hi All,

  When I debug android app, if I work with Java, I can use Log.d(TAG,
  , new Throwable()) to print backtrace of Java code. This is
  really handy for me to find bugs. But when I work with native library
  (e.g. libwebcore.so), there seems no way to print backtrace in
  runtime. The only way to debug native code is use gdbserver.

  I have a question. Is there any way to print backtrace in C/C++? If
  you have any idea, please share with me. Thanks a lot.

  --
  Regards,
  Jiyu

-- 
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 missing from market on 2.2 devices.

2010-11-23 Thread Andreas
Hello,

i have received complaints from a number of customers that one of my
paid apps is missing from the market and they can't download it after
updating their phones to 2.2. I have no idea what the cause is and
unfortunately i also don't have access to a device with 2.2. Maybe
someone here can tell me what i'm doing wrong?

Here is the manifest:

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.eventkontor.networkcheckkey
  android:versionName=2.2 android:versionCode=4
android:installLocation=internalOnly 
application android:icon=@drawable/icon
android:label=@string/app_name android:debuggable=false
activity android:name=.StartUpActivity
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity

/application
uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4/
uses-feature android:name=android.hardware.telephony
android:required=false/
supports-screens android:normalScreens=true
android:largeScreens=true
android:resizeable=true android:smallScreens=true
android:anyDensity=true/supports-screens
/manifest

Thank you

Andreas

-- 
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] Reg: Accessing a service in other package.

2010-11-23 Thread Mark Murphy
On Mon, Nov 22, 2010 at 6:38 AM, Aluvala Suman aluvala.su...@gmail.com wrote:
 I am trying to access a service in other package, but not able to get the
 binder.

 Attached my file hierarchy.
 This is the manifest file for the ExampleService package
 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
     package=example.service android:versionCode=1
 android:versionName=1.0
     application android:icon=@drawable/icon
 android:label=@string/app_name
         service android:enabled=true android:label=ExampleService
             android:name=.ExampleService
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category android:name=android.intent.category.LAUNCHER /
             /intent-filter
         /service

A service should not have that intent-filter. Please use an
intent-filter like:

intent-filter
action android:name=my.totally.unique.NAME /
/intent-filter

 In the ExampleActivity i am accessing the service by doing

 import example.service.IExampleService;
 .

     ServiceIntent = new Intent();
     //ServiceIntent.setComponent(new ComponentName(example.service,
 example.service.IExampleService));
     ServiceIntent.setClassName(example.service,
 example.service.IExampleService);
     bindService(ServiceIntent, conn, BIND_AUTO_CREATE);

Use:

serviceIntent = new Intent(my.totally.unique.NAME);

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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] Add view to an layout by Z index?

2010-11-23 Thread Mark Murphy
Step #1: Get rid of AbsoluteLayout and use RelativeLayout, or possibly
FrameLayout.

Step #2: Add the child at the appropriate index. Later children are
higher on the Z axis than are earlier children.

On Mon, Nov 22, 2010 at 4:16 AM, dannylin chenkin...@gmail.com wrote:
 I have a project that needs to change the displayed content
 dynamically
 I know i can remove then add a new view to my layout.


 the problem in my project is we need to split the screen into
 different layers.
 for example:
 
 |          --     A       |
 |          |        B          |               |
 |          |                    |               |
 |          |___ |               |
 |___|

 and then dynamically change the View of layer A.

 At the layout is built, it works perfect.
 But when i programatically  remove the view and add a new view.
 the new view covers the layer B.

 I found there is no z index attribute for me to set in the viewGroup.
 could anyone tell me how to achieve this request ?
 I'm currently using the absolutelayout.


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




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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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] Advanced Device Administration

2010-11-23 Thread Mark Murphy
On Tue, Nov 23, 2010 at 6:04 AM, m88m m...@walla.com wrote:
  I want to extend the Device Administration framework for my
 Enterprise needs, so for example I would be able to better control
 which applications installed on the device.

 Is there a way to it? (Without rooting the device)

AFAIK, that can only be done by modifying the firmware.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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] Keeping a service alive till the phone is switched off

2010-11-23 Thread David_Fisher
Hi, once we call the startService() method, can we keep the service
alive until its explicitly stopped by the user? I want my service to
stay alive until the phone is switched off. How can i do this? The
idea is that when I receive an incoming call, I want to start
recording and once the status changes to idle, I want to stop the
recording. I am doing this inside my service. It does work sometimes
and sometimes it doesn't. How can I implement such a thing in a
service? Can someone help me with this? Thanks

David

-- 
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: Pubish: Target phones with fast hardware.

2010-11-23 Thread Warren
This is not a direct answer to your question, but have you tried
altering your models and images for less capable phones?

I've tried something like this with acceptable results. Probe the
screen size or do a CPU calculation check at startup, then reduce your
texture sizes or model detail accordingly.  Not ideal, but it works.

Warren


On Nov 20, 4:06 pm, Dutch Android Guru dutchandroidg...@gmail.com
wrote:
 What i need is target hardware like Memory, CPU, and OpenGL 2.

 I read a comment on this 
 articlehttp://androinica.com/2010/05/12/dear-google-please-let-android-devel...

 I really like this comment:

 *The problem here is not (and should never be) fixed by blocking specific
 devices. If anything, because the list of devices will soon be too large for
 a single person to handle. *
 *
 It should be handled by requiring the correct hardware, if the Market
 doesn't already support that. Barcode Scanner, for example, could require
 auto-focus camera (there are already means for requiring a camera, for
 example; we just need a requirement for auto-focus). Raging Thunder 2 should
 ask for OpenGL ES 2, or a certain amount of VRAM, or whatever.

 *
 *tl;dr the Market needs many improvements, but blacklisting or whitelisting
 devices is a horrible solution. Check for hardware capabilities.***
 *
 *
 Basically android already supports this partially with the uses-feature in
 the xml manifest. However there should be more support for the hardware
 types i mentioned.

 So: How should i do it now? And how is this going to be supported in the
 future?
 My only option now is to detect it on startup and give an alert box to the
 user that it doesnt work on their phone.
 However then my whole sale-model is ruined.

 2010/11/20 DutchAndroidGuru dutchandroidg...@gmail.com







  I have an application that loads a 3dmodel and renders it. These
  models are rather big and i can only get it to work fast on faster
  hardware phones such as the Nexus One. However there is no way to
  target faster hardware phones.
  Now i get very good ratings (on phones where it work) and very bad
  rating (on slow phones).

  Also: i would like to know the phone type when a user comments. In
  this way i can test it and check whether the user had a valid point or
  not.
  Could you please add this? Same for error reports.

-- 
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] Intent and extras

2010-11-23 Thread oriharel
Hi!
I set an PendingIntent on a Notification
(notification.setLatestEventInfo). this intent is actually the same
intent used to launch my app, only with a flag that I put in the extra
(intent.putExtra(TAB_INDEX_PARAM_NAME, UPDATES_TAB_INDEX)).

So my first activity launches, it queries it's intent's extras and
immediately navigates to an Alerts activity rather the normal activity
on a regular launch.

The problem:
from this point, every activation of my app navigates to this Alerts
activity. when debugged, I find that the flag is stuck in the intent
even though I removed/changed it. it just won't change.

do you know how can change an extra on a giving Intent?

Ori

-- 
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] ADB device name show invalid characters

2010-11-23 Thread Rogério de Souza Moraes
Do the following steps:

$sudo -s
$adb kill-server
$adb devices

Do not forget to logout from root.

Regards,

Rogerio

2010/11/23 Kumar Bibek coomar@gmail.com

 Drivers fro your devices are not installed properly. Once you do that, it
 will tell you your device name.

 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com




 On Mon, Nov 22, 2010 at 8:29 PM, Jim Qiu bluefishe...@gmail.com wrote:

 Hi all,

  I am using a Chinese version of android phone, when I type the
 $./adb devices

 it gives me the following:

  List of devices attached
  device

 My DEV computer is Ubuntu 10.10, locale is en_US.utf-8.

 Is there a way that I can rename my device to a name of only simple
 letters.

 regards,

 Jim



  --
 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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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: Market statistics stall

2010-11-23 Thread Evgeny V
Guys,

Any progress with this issue?
My Market data is still frozen :(

Thanks,
Evgeny


On Mon, Nov 22, 2010 at 10:37 PM, Kumar Bibek coomar@gmail.com wrote:

 Aah, Patience :)

 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com




 On Tue, Nov 23, 2010 at 2:06 AM, David Erosa García soul...@gmail.comwrote:

 I got the following response from Google:


 Hello,

 Thank you for taking the time to write to us.  Our team is currently
 investigating multiple reports of metrics in the Developer Console
 being out-of-date.

 We hope to have a resolution soon, and will contact you if we need
 further information.

 Thank you for your patience.

 On Sun, Nov 21, 2010 at 12:58 PM, Adam Hammer adamhamm...@gmail.com
 wrote:
  I think android attests to the fact that they get plenty of things
  right.
 
  I also however have had downloads stuck since the planned outtage.
 
  On Nov 21, 1:29 am, DraganA dand...@gmail.com wrote:
  Same here, it's a shame google cannot get the simplest things right.
 
  On Nov 21, 5:47 am, Peter Webb r.peter.w...@gmail.com wrote:
 
   Stalled for me as well. Still getting new comments as always, just
 the
   download numbers for my (free) app have been unchanged for the last 4
   days. Doubtless they will get round to updating them eventually.
 
   On Nov 21, 1:30 am, David Erosa García soul...@gmail.com wrote:
 
Hi all.
 
Does anyone else have their download statistics stalled? Mines are
showing the same number since the 17th. The apps are published and
 are
visible from the market's client, so I hope it's a(nother) temporal
problem from the Market...
 
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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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] Intent and extras

2010-11-23 Thread Mark Murphy
On Tue, Nov 23, 2010 at 9:27 AM, oriharel ori.ha...@gmail.com wrote:
 I set an PendingIntent on a Notification
 (notification.setLatestEventInfo). this intent is actually the same
 intent used to launch my app, only with a flag that I put in the extra
 (intent.putExtra(TAB_INDEX_PARAM_NAME, UPDATES_TAB_INDEX)).

 So my first activity launches, it queries it's intent's extras and
 immediately navigates to an Alerts activity rather the normal activity
 on a regular launch.

 The problem:
 from this point, every activation of my app navigates to this Alerts
 activity. when debugged, I find that the flag is stuck in the intent
 even though I removed/changed it. it just won't change.

 do you know how can change an extra on a giving Intent?

If you wish to modify the extras associated with an Intent in a
PendingIntent, you do so by passing FLAG_UPDATE _CURRENT or
FLAG_CANCEL_CURRENT to the getActivity() call on the PendingIntent
class. Otherwise, even though your Intent extras may change, Android
will ignore them and use the Intent already registered as a
PendingIntent.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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: help me understand: upper case characters in layout file names are disallowed

2010-11-23 Thread Leon Moreyn-Android Development
It a language structure concept. You just have to build around it. Its
kind of like saying why can i only pay with quarters into a vending
machine if I have two dimes and a nickel. The structure of the machine
is not designed to handle you dimes and nickels and this way the
machine can process faster with less distractions.

On Nov 21, 7:00 pm, Justin Collum jcol...@gmail.com wrote:
 I understand that these files map to R classes (generated). So I see
 why punctuation characters (most) are disallowed. But I can't for the
 life of me think of why main would be allowed but Main would not.
 Why not something like firstScreen?  Is there something about
 generated files that I'm missing? Do caps screw them up somehow? I'd
 like to make a view named defineNewList or something along those
 lines. Annoying to have to use underscores: define_new_list.

-- 
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] Keeping a service alive till the phone is switched off

2010-11-23 Thread Mark Murphy
On Tue, Nov 23, 2010 at 9:22 AM, David_Fisher davidfsh...@gmail.com wrote:
 Hi, once we call the startService() method, can we keep the service
 alive until its explicitly stopped by the user?

If you use startForeground(), that will help prevent the OS from
stopping your service. However:

-- this will not stop task killers, at least of the 2.1-and-earlier variety
-- for your circumstance, an everlasting service should not be needed

 The
 idea is that when I receive an incoming call, I want to start
 recording and once the status changes to idle, I want to stop the
 recording.

Please listen for the broadcast Intents about phone state changes.
Please do not use a PhoneStateListener for this, forcing you to keep
your service in memory all of the time.

Also, bear in mind that you have no access to the in-call audio, so
unless you are running in speakerphone mode, I fail to see how you can
accomplish your objectives.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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


Re: [android-developers] Re: How to change color of ListView child items on focus

2010-11-23 Thread Kumar Bibek
Changing the background color is too much code, however, although it works.

A better way to get this going is by using StateListDrawables. Create your
own state list drawable, and set it as the background to each of your items,
or the as the selector of the ListView.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Tue, Nov 23, 2010 at 7:25 PM, viktor victor.scherb...@gmail.com wrote:

 sat, it is not correct, because Francesco wants use a focus.

 On 23 Лис, 13:47, sat sathvikm...@gmail.com wrote:
  I dint go through ur xml , But I will give an idea.
  implemet OnListItemClick handler of listview and we get access to the
  child views , and u can change the background color using it.
 
  On Nov 23, 4:23 pm, viktor victor.scherb...@gmail.com wrote:
 
 
 
 
 
 
 
   Why did you use complex item layout?
 
   Use selector as TableLayout background.
 
   On 20 Лис, 21:18, Francesco nolano...@gmail.com wrote:
 
Hi all.
 
i have a list View in my app (this is the xml layout):
 
?xml version=1.0 encoding=utf-8?
ListView xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/arrayList
android:layout_width=fill_parent
android:layout_height=fill_parent
android:textFilterEnabled=true
android:scrollbars=vertical
android:drawSelectorOnTop=true
/ListView
 
Each item of my list View is composed of two TextView:
 
?xml version=1.0 encoding=utf-8?
TableLayout android:layout_width=fill_parent
xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/row_container
android:padding=5px android:layout_height=wrap_content
android:background=@color/white android:shrinkColumns=0
TableRow
TextView android:layout_height=wrap_content
android:layout_width=wrap_content
 android:layout_below=@+id/
description
android:id=@+id/description
android:textColor=@color/black
android:scrollHorizontally=true
android:singleLine=true/TextView
/TableRow
TableRow
TextView android:layout_width=wrap_content
android:layout_height=wrap_content
 android:id=@+id/result
android:textColor=@color/grey
android:maxLines=1
android:scrollHorizontally=true/TextView
/TableRow
 
/TableLayout
 
I would like to change background color (and text color) of each item
of my ListView on focus (and, if possibile on selection). How can i
 do
it?
 
Thanks to all
francesco

 --
 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.comandroid-developers%2bunsubscr...@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: Spinner Style

2010-11-23 Thread Kumar Bibek
Ummm, on mobile devices, it's not a good way to display a equivalent of HTML
select You cannot achieve what you are looking for by using the default
Spinner.

However, I think you can try and change the behaviour by extending the
Spinner class. Just my guess, never thought about it, and  never tried it.
:)

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Tue, Nov 23, 2010 at 6:35 PM, pedr0 pulsarpie...@gmail.com wrote:

 Do you are looking a spinner wheel or a spinner menu?



 On 23 Nov, 10:28, Jithin danijanuv...@gmail.com wrote:
  Hi friends,
 
 As part of my project I need a spinner that should display
  items like HTML select tag rather opening a new window.
 Is it possible...?

 --
 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.comandroid-developers%2bunsubscr...@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: Maps doesn't show

2010-11-23 Thread Kumar Bibek
Generate an API key which is tied to your keystore(publisher and not the
debug keystore).

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Tue, Nov 23, 2010 at 7:01 PM, coy cawe...@gmail.com wrote:

 Tommy,
 Yes, it could be the problem.
 But what is the right API KEY?

 Moreover, I exported my app as a unsigned android app and then I
 pushed it to the phone. Is that the problem??

 thanks :)

 On Nov 14, 9:57 pm, Tommy droi...@gmail.com wrote:
  Sounds like you don't have the right API key in. You need one for
  Developement and one for Production. So one for when you push it to the
  phone from Eclipse or whatever and one You use when you publish the
  application. That sounds like your issue right there. I had it happen to
 me
  where it shows the markers but it won't actually load the map tiles.
 Check
  that API key, if you don't have one you need one :)
 
  Hope that helps.
 
  Tommy
 
  Android Mobile Phone Application Developer
  Database Administrator
  .net Web Specialist
 
 
 
 
 
 
 
  -Original Message-
  From: android-developers@googlegroups.com
 
  [mailto:android-develop...@googlegroups.com] On Behalf Of coy
  Sent: Sunday, November 14, 2010 4:08 PM
  To: Android Developers
  Subject: [android-developers]Mapsdoesn't show
 
  Hello,
  I have map in my android app.
  On emulator is everything OK.
  But on device (Motorola Droid) the map shows marker but doesn't show
  real map in background!!
  The conection is OK and I held the INTERNET permission in my manifest.
  What is causing this problem? Any idea?
 
  thnks!
 
  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group athttp://
 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.comandroid-developers%2bunsubscr...@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: streaming mp4 from Internet

2010-11-23 Thread Ahmed Shoeib
as a conclusion
to stream mp4 video from internet i need to use MP4Box installed on my
device
Right ??

On Nov 22, 8:38 pm, Leon Moreyn-Android Development
lmor...@earthcam.com wrote:
 If this video is your video is stored locally on your computer. If its
 not video, ie you are trying to steam from Youtube or something like
 that that is streaming this video on the web then you will not be able
 to do so. You must have admin access to the video for it to be your
 video.  MP4Box is tool to repair the video file before it reaches
 your device. You do not run the repair on the device because while
 Android are robust the battery need to repair small video will consume
 too large a portion of battery.

 On Nov 21, 4:20 pm, Ahmed Shoeib ahmedelsayed.sho...@gmail.com
 wrote:

  what do you mean by this video is my video or not ??
  and how to start MP4Box on device ??

  On Nov 21, 10:55 pm, Mark Murphy mmur...@commonsware.com wrote:

   On Sun, Nov 21, 2010 at 3:52 PM, Ahmed Shoeib

   ahmedelsayed.sho...@gmail.com wrote:
but i tried it on areal device
how can MP4Box added to fix this problem ??

   You do not run MP4Box on the device.

   Either this is your video, or it is not.

   If it is your video, on your PC, run MP4Box on the video file, and
   arrange it so your device can download the repaired file.

   If this is not your video, you simply cannot play it streaming. You
   are welcome to download the video and play it locally.

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

   Android App Developer Books:http://commonsware.com/books

-- 
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: Problem with AnimationDrawable

2010-11-23 Thread Serdel

Well the draw9patch tool from android sdk had produced files 10 times
bigger than the jpg that I used originally. One animation consists of
7 files, each one is 28-40 kb. The 9.png files were starting from 300
kb : Although it doesn't seem much, and I saw people loading several
animation in one activity regarding on the action taken by the user.
Don't know where is my mistake since the code is practically the same..

-- 
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: streaming mp4 from Internet

2010-11-23 Thread Mark Murphy
On Tue, Nov 23, 2010 at 10:14 AM, Ahmed Shoeib
ahmedelsayed.sho...@gmail.com wrote:
 as a conclusion
 to stream mp4 video from internet i need to use MP4Box installed on my
 device
 Right ??

If by device you mean Android device, then no. MP4Box runs on a
Windows, OS X, or Linux computer. You use it to fix up an MP4 file,
such that it is safe for streaming. Then, you can upload that video
file to your Web server, and Android devices will be able to stream
it.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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 calls to web service slow? Using .NET web service

2010-11-23 Thread Hal
You may want to try Jt secure Web Services for Android:

-Java Pattern Oriented Framework, An application of the Messaging
Design Pattern
IBM Technical Library
http://www.ibm.com/developerworks/webservices/library/ws-designpattern/index.html

- Messaging Design Pattern and a distributed Component/Service Model
https://jt.dev.java.net/files/documents/5553/149793/MDPdistributedModel.pdf

The following code  is taken from the Jt.JtURL component (invoked by
the Jt.rest.JtRestService component)

private String doPost (String request) {
URLConnection urlConn;
URL destURL;
DataOutputStream outStream;
DataInputStream inStream;
int c;
StringBuffer sBuffer = new StringBuffer ();

if (request == null)
return null;

if (url == null)
return null;

handleTrace (request: + request);

try {

destURL = new URL (url);

urlConn = destURL.openConnection();
urlConn.setDoOutput(true);
urlConn.setDoInput(true);


urlConn.setRequestProperty(Content-length,
 + request.length());

outStream = new DataOutputStream (urlConn.getOutputStream());

outStream.writeBytes(request);

outStream.close ();

inStream = new DataInputStream (urlConn.getInputStream());

while ((c = inStream.read()) = 0) {
sBuffer.append((char) c);
}
} catch (Exception ex) {
handleException (ex);
}

return ((String) sBuffer.toString());

}

If feasible you may want to try without GZIP. It should be a bit
faster.

On Nov 18, 6:00 pm, Wipeout 4.9fi...@gmail.com wrote:
 Hey guys,
 This is my first post to the Android Developers group. I have been
 working with HTTP communication in the Android SDK and have noticed
 that calls to a web service through my app are very slow (taking
 800+ms on high speed wifi). They take less than 100ms if I call the
 web service through the phone's browser. I am developing on a Google
 Nexus One. The size of the data returned is very small, 1K. I have
 tried enabling gzip compression, and that helps slightly but I assume
 there is another problem at hand. I have tried using SOAP with the
 ksoap2-android library, as well as making things simple using
 HttpClient and InputStreamReader. Below is my code for the fastest I
 can make the app perform; using no SOAP, and using GZIP compression. I
 apologize for the lengthy code -- I think all of it is beneficial for
 determining the best way to make this request and response happen
 faster.

 [code]
 public String GetRest()
         {

         long startTime = System.currentTimeMillis();
         String result = ;

         Log.v(time, Beginning rest:  + (System.currentTimeMillis() -
 startTime) + ms);

             try
             {
                 HttpClient client = new DefaultHttpClient();
                 HttpGet request = new HttpGet(https://usad.enlyght.com/ws/
 AndroidService.asmx/GetWebServiceVersion);
                 request.addHeader(Accept-Encoding, gzip);

                 Log.v(time, Before call:  + (System.currentTimeMillis() -
 startTime) + ms);
                 HttpResponse response = client.execute(request);
                 InputStream instream = response.getEntity().getContent();
                 Header contentEncoding = response.getFirstHeader(Content-
 Encoding);
                 if (contentEncoding != null 
 contentEncoding.getValue().equalsIgnoreCase(gzip)) {
                     instream = new GZIPInputStream(instream);
                 }
                 InputStreamReader isreader = new InputStreamReader(instream);
                 BufferedReader reader = new BufferedReader(isreader);
                 StringWriter sw = new StringWriter();

                 String read;
                 while ((read = reader.readLine()) != null) {
                         result += read;
                 }

                 client.getConnectionManager().shutdown();
         }
         catch (Exception e) {}
         Log.v(time, End rest:  + (System.currentTimeMillis() -
 startTime) + ms);

         return result;
         }
 [/code]

 Regards,
 Adam Smith
 Norsoft

-- 
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 onClick seems to be blocking onFling

2010-11-23 Thread Leon Moreyn-Android Development
I think that onClick() is an Override event. I am not to familiar with
your onFling but if its a user created class it will most likely
remain dormant due to the the digitizer recognizing the onClick and
not registering your onFling.

On Nov 23, 8:17 am, CB cbu...@gmail.com wrote:
 I have an Activity that implements a Gesture Detector to catch the
 user fling input for navigation to other screens. That was working
 fine - but - I recently updated a class that derives from my
 BaseActivity to add an onClick function and now that click event seems
 to block the onFling from being hit. The onClick is tied to a TextView
 area (in a LinearLayout) I have on my screen. The resultsClick method
 is wired to the TextView using its onClick property in the XML layout.

 I've tried changing the return values in onSingleTapUp and onDown
 without luck. I've also tried adding log statements to all the
 functions below as well. None of them fire when I fling in the
 TextView area but they do on other areas of the screen.

 Maybe I am using the wrong search terms, but I couldn't seem to find
 an example that addressed this - yet I'm sure this problem has been
 solved before.

 public class DerivedActivity extends BaseActivity
 {
    ...
    /**
     * resultsClick - The user clicked on the Results area
     * @param v
     */
    public void resultsClick(View v)
    {
       try
       {
          Log.i(this.toString(), resultsClick);
          startActivity(new Intent(this, Results_TabHost.class ));
       }
       catch (Exception e)
       {
          Log.e(this.toString(), Exception + e.toString());
       }

    }// end resultsClick
    ...

 }

 Here is the base class that implements the GestureListener code

 public class BaseActivity extends    ActivityGroup
                           implements OnGestureListener
 {
    ...
    private static final int SWIPE_MIN_DISTANCE = 120;
    private static final int SWIPE_MAX_OFF_PATH = 250;
    private static final int SWIPE_THRESHOLD_VELOCITY = 200;

    public boolean onFling(MotionEvent e1,
                           MotionEvent e2,
                           float velocityX,
                           float velocityY)
    {
       try
       {
          Log.i(this.toString(), onFling);

          // jump right out if not a swipe/fling
          if (Math.abs( e1.getY() - e2.getY() )  SWIPE_MAX_OFF_PATH)
          {
             return false;
          }

          // right to left swipe
          if (e1.getX() - e2.getX()  SWIPE_MIN_DISTANCE 
              Math.abs(velocityX)    SWIPE_THRESHOLD_VELOCITY )
          {
             Log.i(this.toString(), fling left);
             rightArrowClick(null);

          }
          else if (e2.getX() - e1.getX()  SWIPE_MIN_DISTANCE 
                   Math.abs(velocityX)    SWIPE_THRESHOLD_VELOCITY )
          {
             Log.i(this.toString(), fling right);
             leftArrowClick(null);
          }
       }
       catch (Exception e)
       {
          Log.e(this.toString(), Exception + e.toString());
       }

       return true;

    }// end onFling

    // These next methods we are required to have - even if unused -
    // in order for the Gesture Handling to work

   �...@override
    public boolean onTouchEvent(MotionEvent motionEvent)
    {
       if(this.gestureDetector.onTouchEvent(motionEvent))
       {
          return true;
       }

       //no gesture detected, let Activity handle touch event
       return super.onTouchEvent(motionEvent);
    }

   �...@override
    public void onLongPress(MotionEvent e)
    {
       // Intentionally not handling - must be overridden by listener
 class
    }

   �...@override
    public boolean onScroll(MotionEvent e1, MotionEvent e2, float
 distanceX, float distanceY)
    {
       // Intentionally not handling - must be overridden by listener
 class
       // Intentionally returning true - per code examples
       return true;
    }

   �...@override
    public void onShowPress(MotionEvent e)
    {
       // Intentionally not handling - must be overridden by listener
 class
    }

   �...@override
    public boolean onSingleTapUp(MotionEvent e)
    {
       // Intentionally not handling - must be overridden by listener
 class
       // Intentionally returning true - per code examples
       return true;
    }

   �...@override
    public boolean onDown(MotionEvent e)
    {
       // Intentionally not handling - must be overridden by listener
 class
       // Intentionally returning true - per code examples
       return true;
    }
 ...



 }

-- 
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: Advanced Device Administration

2010-11-23 Thread m88m
Hey Mark!

The last thing I want to do is to change the firmware, but do you know
if there is an Android's framework component that the applications
asks for permission clearance  prior to\during executing? Which I
might wrap for this purpose?
Do you familiar with someone who tried to alter the security framework
of Android?

I just saw MobileDefense demo and they have some kind of security
control (they are require a reboot)...


Regards,
 M

On Nov 23, 3:08 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Nov 23, 2010 at 6:04 AM, m88m m...@walla.com wrote:
   I want to extend the Device Administration framework for my
  Enterprise needs, so for example I would be able to better control
  which applications installed on the device.

  Is there a way to it? (Without rooting the device)

 AFAIK, that can only be done by modifying the firmware.

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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: App missing from market on 2.2 devices.

2010-11-23 Thread stymie
If you have used the application locking option when you uploaded it
they will  they will not show.

On Nov 23, 6:09 am, Andreas platypu...@googlemail.com wrote:
 Hello,

 i have received complaints from a number of customers that one of my
 paid apps is missing from the market and they can't download it after
 updating their phones to 2.2. I have no idea what the cause is and
 unfortunately i also don't have access to a device with 2.2. Maybe
 someone here can tell me what i'm doing wrong?

 Here is the manifest:

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
       package=com.eventkontor.networkcheckkey
       android:versionName=2.2 android:versionCode=4
 android:installLocation=internalOnly 
     application android:icon=@drawable/icon
     android:label=@string/app_name android:debuggable=false
         activity android:name=.StartUpActivity
                   android:label=@string/app_name
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category
 android:name=android.intent.category.LAUNCHER /
             /intent-filter
         /activity

     /application
     uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4/
 uses-feature android:name=android.hardware.telephony
 android:required=false/
 supports-screens android:normalScreens=true
 android:largeScreens=true
 android:resizeable=true android:smallScreens=true
 android:anyDensity=true/supports-screens
 /manifest

 Thank you

 Andreas

-- 
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: Advanced Device Administration

2010-11-23 Thread Mark Murphy
On Tue, Nov 23, 2010 at 10:36 AM, m88m m...@walla.com wrote:
 The last thing I want to do is to change the firmware, but do you know
 if there is an Android's framework component that the applications
 asks for permission clearance  prior to\during executing?

I am rather short on sleep, so this might well be my fault, but that
sentence does not make much sense to me.

 Which I
 might wrap for this purpose?

If this purpose is prevent applications from being installed, I
know of no way to do this short of modifying the firmware.

 Do you familiar with someone who tried to alter the security framework
 of Android?

I am sure that there are plenty of people who have modified the
firmware, though I cannot name anyone specifically who I know
definitely worked on its security-related aspects.

 I just saw MobileDefense demo and they have some kind of security
 control (they are require a reboot)...

I am not aware that they prevent applications from being installed.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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: Send GPS Location Details to Server

2010-11-23 Thread Hal
You will probably need Messaging and Web services for this.
You may want to try Jt secure Web services for Android:

- Java Pattern Oriented Framework, An application of the Messaging
Design Pattern
IBM Technical Library
http://www.ibm.com/developerworks/webservices/library/ws-designpattern/index.html

- Messaging Design Pattern and a distributed Component/Service Model
https://jt.dev.java.net/files/documents/5553/149793/MDPdistributedModel.pdf

A Restful Web service invocation looks like the following:

String url = http://localhost:8080/JtPortal/JtRestService;;
JtContext context;
Object reply;
JtMessenger messenger = new JtMessenger ();

// Create an instance of JtRestService

service = (JtRestService) factory.createObject
(JtRestService.JtCLASS_NAME);

// Assign the URL for the REST service/resource

service.setUrl(url);
service.setClassname (Jt.examples.HelloWorldMessage);

// Invoke the remote service (Make the REST request to access
the remote resource/service).

sReply = (String) messenger.sendMessage (service, hi);

You message can be any data that you need to transfer to the server

On Nov 18, 3:49 am, jagan reddy saimohanj...@gmail.com wrote:
 Hello All,

 I am developing a GPS application.. By using the windowsXP OS and
 eclips IDE

 I am able to get the Longitude and Latitude of the current Position
 I want to sent those details to server by using the Http connection
 and for that sending, I will use gprs connection in my device
 how to do this, I am in big confusion. Here one more thing that GPRS
 connection is not available at that time we need to sent a SMS to the
 server.

 Any body help me in 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: Static Layout for whole app that must be in all Activity

2010-11-23 Thread TreKing
On Tue, Nov 23, 2010 at 4:38 AM, Ganapathy.C cganapa...@gmail.com wrote:

 But i need a ticker like Marquee in HTML 


Look into translation animations.


  and also for all page...


Reuse the same layout in each page.

-
TreKing http://sites.google.com/site/rezmobileapps/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: 1.5 quits for apparently no reason whilst animating (WIN DEATH)

2010-11-23 Thread Muleskinner
Hi Jason,

Thanks for the reply. It's quite difficult to post code as there's a
whole bunch of APIs I've ported over from JavaME that make up what's
going on. I am going to try and whittle everything down to a simple
test case.

The basic 'draw' loop is the same as in the 'Lunar Lander' source,
repeat the following within a 'run' loop...

private final void drawToScreen(Rect rect)
{
android.graphics.Canvas c = null;
try
{
//
// get a surface to draw on and notify that drawing is about to
begin
//
c = getHolder().lockCanvas(null);
synchronized (getHolder())
{
// do the drawing
onDraw(c);
}
}
finally
{
// do this in a finally so that if an exception is thrown
// during the above, we don't leave the Surface in an
// inconsistent state
if (c != null)
{
// ok - we've finishsed drawing
getHolder().unlockCanvasAndPost(c);
}
}
}

-- 
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: App missing from market on 2.2 devices.

2010-11-23 Thread Andreas
Ok, that's probably it. I didn't follow the discussion around the
licensing server and that's probably why i missed it.

I'll change it and get some of my customers to check for me :-)

Thank you!

Andreas

On 23 Nov., 16:38, stymie jamesty...@gmail.com wrote:
 If you have used the application locking option when you uploaded it
 they will  they will not show.

 On Nov 23, 6:09 am, Andreas platypu...@googlemail.com wrote:



  Hello,

  i have received complaints from a number of customers that one of my
  paid apps is missing from the market and they can't download it after
  updating their phones to 2.2. I have no idea what the cause is and
  unfortunately i also don't have access to a device with 2.2. Maybe
  someone here can tell me what i'm doing wrong?

  Here is the manifest:

  ?xml version=1.0 encoding=utf-8?
  manifest xmlns:android=http://schemas.android.com/apk/res/android;
        package=com.eventkontor.networkcheckkey
        android:versionName=2.2 android:versionCode=4
  android:installLocation=internalOnly 
      application android:icon=@drawable/icon
      android:label=@string/app_name android:debuggable=false
          activity android:name=.StartUpActivity
                    android:label=@string/app_name
              intent-filter
                  action android:name=android.intent.action.MAIN /
                  category
  android:name=android.intent.category.LAUNCHER /
              /intent-filter
          /activity

      /application
      uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4/
  uses-feature android:name=android.hardware.telephony
  android:required=false/
  supports-screens android:normalScreens=true
  android:largeScreens=true
  android:resizeable=true android:smallScreens=true
  android:anyDensity=true/supports-screens
  /manifest

  Thank you

  Andreas

-- 
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] Background error reporting on HttpPost

2010-11-23 Thread Leon Moreyn-Android Development
I am running a background service were data is posted to an online
site that process the information to post to online database. The
problem i am encountering is that with the data being posted if there
is an error there is not immediate way for me to know. i am
considering several options. First is having a handler on the website
to send me and email that there was error parsing the data. But the
problem here is that this has its own restriction with getting and
receiving data. Also if the site is down there would be no immediate
verifier for me. The idea would be that there is an critical fail post
to the phone. I execute the connection and there is no problem and the
data is passed to my parameter holder it then send the data to site.
Data is processed and even though there is an error on the side of the
side there is nothing to tell me so on the phone. I necessarily dont
need the user to know that it failed but I need something phone side
to tell me there is a problem. Any ideas?

-- 
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] creating diamond shape

2010-11-23 Thread TreKing
On Mon, Nov 22, 2010 at 1:35 AM, sunrises surya@gmail.com wrote:

 how can we create diamond shape view using 2D or 3D,I need to show the
 Images in that customized view instead of default ImageView class


Why does your view have to be shaped like a diamond? Can you just use a
diamond-shaped image on an ImageView?

-
TreKing http://sites.google.com/site/rezmobileapps/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: Online Image in SimpleExpandableList

2010-11-23 Thread Leon Moreyn-Android Development
So the SimpleExpandabeListAdapter is text base only? So I would need
to create new adapter style?

On Nov 23, 1:51 am, Kumar Bibek coomar@gmail.com wrote:
 Well, for this you will have to write a custom adapter for your list view,
 since the adapter you are using cannot be directly used to show an image.

 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 On Thu, Nov 18, 2010 at 3:50 AM, Leon Moreyn-Android Development 



 lmor...@earthcam.com wrote:
  Here is the code I am using. Currently I get and Location to appear
  but image doesnt.

     mAdapter = new SimpleExpandableListAdapter(
                                 this,
                                 groupData,

   android.R.layout.simple_expandable_list_item_2,
                                 new String[] {IMAGE, NAME},
                                 new int[] {R.id.image, android.R.id.text1 },
                                 childData,

   android.R.layout.simple_expandable_list_item_2,
                                 new String[] {IMAGE, NAME, LOCATION },
                                 new int[] {R.id.image, android.R.id.text1,
  android.R.id.text2 }
                                 );
                         Log.d(Leo's Tag, mAdapter.toString());
                         setListAdapter(mAdapter);

  So the IMAGE string is url to web address with a thumbnail size image.
  I think I am missing could to convert the URL into a image raw or an
  ImageView. If someone would be most kind and direct me in the proper
  direction to implement this or if someone knows how to convert online
  url to image and would share their code I would be most great full.

  --
  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.comandroid-developers%2bunsubs­cr...@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: help me understand: upper case characters in layout file names are disallowed

2010-11-23 Thread Diego Torres Milano
This limitation surely comes from supporting some filesystems on some
operating systems which are case insensitive.
BTW, you can name your View defineNewList but you cannot name your
layout, which is a filename, Main.
Leon Moreyn-Android Development wrote:
 It a language structure concept. You just have to build around it. Its
 kind of like saying why can i only pay with quarters into a vending
 machine if I have two dimes and a nickel. The structure of the machine
 is not designed to handle you dimes and nickels and this way the
 machine can process faster with less distractions.

 On Nov 21, 7:00 pm, Justin Collum jcol...@gmail.com wrote:
  I understand that these files map to R classes (generated). So I see
  why punctuation characters (most) are disallowed. But I can't for the
  life of me think of why main would be allowed but Main would not.
  Why not something like firstScreen?  Is there something about
  generated files that I'm missing? Do caps screw them up somehow? I'd
  like to make a view named defineNewList or something along those
  lines. Annoying to have to use underscores: define_new_list.

-- 
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 start activity on URLSpan click

2010-11-23 Thread Elias Mårtenson
In my application I have a TextView that contains text which (among
other things) contains links. When clicking on a link I need to open
specific activities.

What is the best way of solving this?

Currently, the only solution I have been able to come up with is to
set each URLSpan span to a URL with a special scheme, like
specialscheme:my_data_here, and then let the target activity have an
intent-filter that catches attempt to open links with such scheme.

Now, to me this is not the ideal solution. The Intents I actually want
to use are quite complex (lots of supplementary data passed in extras)
which makes it somewhat difficult to out in a URL. I also would like
to avoid the risk of some other application filtering on the same
scheme, thus causing problems to my application.

Any suggestions?

-- 
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] Help getting screen number

2010-11-23 Thread Diego Torres Milano
But if the user is seeing any desktop is not in your application.
What's your intention ?

Kumar Bibek wrote:
 There is no such API.

 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com



 On Sun, Nov 21, 2010 at 7:38 PM, Pedro Duque pmdu...@gmail.com wrote:

  Hi,
 
  I need to get the screen number a user is seeing and the total screens in
  home application. I can't find this info anywhere in the API.
 
  Can you help me?
 
  Thanks,
  Pedro Duque
 
  --
  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.comandroid-developers%2bunsubscr...@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: Market statistics stall

2010-11-23 Thread David Erosa García
On Tue, Nov 23, 2010 at 3:37 PM, Evgeny V evgen...@gmail.com wrote:
 Guys,
 Any progress with this issue?
 My Market data is still frozen :(

Mine are still stalled, too.


 Thanks,
 Evgeny

 On Mon, Nov 22, 2010 at 10:37 PM, Kumar Bibek coomar@gmail.com wrote:

 Aah, Patience :)

 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com



 On Tue, Nov 23, 2010 at 2:06 AM, David Erosa García soul...@gmail.com
 wrote:

 I got the following response from Google:


 Hello,

 Thank you for taking the time to write to us.  Our team is currently
 investigating multiple reports of metrics in the Developer Console
 being out-of-date.

 We hope to have a resolution soon, and will contact you if we need
 further information.

 Thank you for your patience.

 On Sun, Nov 21, 2010 at 12:58 PM, Adam Hammer adamhamm...@gmail.com
 wrote:
  I think android attests to the fact that they get plenty of things
  right.
 
  I also however have had downloads stuck since the planned outtage.
 
  On Nov 21, 1:29 am, DraganA dand...@gmail.com wrote:
  Same here, it's a shame google cannot get the simplest things right.
 
  On Nov 21, 5:47 am, Peter Webb r.peter.w...@gmail.com wrote:
 
   Stalled for me as well. Still getting new comments as always, just
   the
   download numbers for my (free) app have been unchanged for the last
   4
   days. Doubtless they will get round to updating them eventually.
 
   On Nov 21, 1:30 am, David Erosa García soul...@gmail.com wrote:
 
Hi all.
 
Does anyone else have their download statistics stalled? Mines are
showing the same number since the 17th. The apps are published and
are
visible from the market's client, so I hope it's a(nother)
temporal
problem from the Market...
 
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] Display Calendar Instance

2010-11-23 Thread TreKing
On Mon, Nov 22, 2010 at 5:47 AM, paresh mayani pareshmay...@gmail.comwrote:

 what i should do to display the same dialog box or Calendar instance in my
 application ??


Look through the Android source and see if that version of the date picker
is still in there somewhere, yank it out, and add it to your project.

-
TreKing http://sites.google.com/site/rezmobileapps/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

  1   2   3   >