[android-developers] Airplane mode Causing a problem

2010-06-10 Thread Alok Kulkarni
Hi,
I am having an HTC Magic device.

Scenario For the problem
I turn off airplane mode after putting it on for sometime.
Once i do that and make some network connection either programatically or
opening a browser, i get a Force Close dialog with process com.android.phone
not responding.
When i see the logcat i see the message :-
ERROR/AndroidRuntime(905): Uncaught handler: thread main exiting due to
uncaught exception
06-09 13:58:33.462: ERROR/AndroidRuntime(905):
a*ndroid.content.ActivityNotFoundException:
Unable to find explicit activity class
{com.android.phone/com.android.phone.NetworkListDialog}*; *have you declared
this activity in your AndroidManifest.xml?*
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1484)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:1458)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
android.app.ApplicationContext.startActivity(ApplicationContext.java:632)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
android.content.ContextWrapper.startActivity(ContextWrapper.java:236)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
com.android.phone.PhoneApp.networksListLoaded(PhoneApp.java:672)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
com.android.phone.PhoneApp.access$1100(PhoneApp.java:98)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
com.android.phone.PhoneApp$3.handleMessage(PhoneApp.java:421)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
android.os.Handler.dispatchMessage(Handler.java:99)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
android.os.Looper.loop(Looper.java:123)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
android.app.ActivityThread.main(ActivityThread.java:3948)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
java.lang.reflect.Method.invokeNative(Native Method)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
java.lang.reflect.Method.invoke(Method.java:521)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
06-09 13:58:33.462: ERROR/AndroidRuntime(905): at
dalvik.system.NativeStart.main(Native Method)
06-09 13:58:33.472: INFO/Process(55): Sending signal. PID: 905 SIG: 3
06-09 13:58:33.472: INFO/dalvikvm(905): threadid=7: reacting to signal 3


Important :- This is observed when i have a SIM card inserted in the device
.
Even if i use Wifi for connection , it is observed the if the SIM is not
present in the device , this issue does not come.
I googled for *com.android.phone.NetworkListDialog but *i aint getting any
results.
Is this a device specific problem ? I have a Moto Blurr to but its not
unlocked here for SIM services.
Please help . :)
Thanks ,
Alok.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Best way for web service calls ??

2010-06-10 Thread StillALearner
Thanks Paul,
 "Everything else seems a bit too heavy"
Thats the exact concern for why i have been hunting around different
forums to check out for a better option,  and as u said JSON with a
RESTful service is one option am closely looking at.

and other part which i need suggestion is on the Data
syncronization !! how is it implemented ?


On Jun 10, 10:44 am, paulb  wrote:
> I tend to make RESTful requests over HTTP and expect back JSON
> results. Everything else seems a bit too heavy.
>
>
>
> On Thu, Jun 10, 2010 at 3:15 PM, StillALearner  wrote:
> > Hello,
> > I have been trying to develop an android application for sometime now
> > and i would like to get some suggestion on the best way of making web
> > service calls or to be generic the best way of communication between
> > the android platform and web server.
> > Soap(using Ksoap) and HTTP(using POST) are two methodologies & XML and
> > JSON are the twodataformats that am aware of,(let me know if they
> > are few other options too..) and ,
> > i would like to know what is the best option ofdatatransfer when
> > i) thedatato transfer is Large andlessfrequent.
> > ii)morefrequentbutlessdatais being transfered.
>
> > Also when it comes todatasynchronization between server and our
> > app , how is that generally implemented ??
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > Formoreoptions, visit this group at
> >http://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -

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


Re: [android-developers] End activity

2010-06-10 Thread TreKing
On Thu, Jun 10, 2010 at 4:19 PM, Rohit  wrote:

> What I want is that when then user is done adding the item it should not
> take the user to activity A but directly to the desktop because that is
> where he invoked the activity (B) from
>

Wait ...are you saying that if you start B from the widget, then do what you
need to do and exit B, you end up going back to A, even though it was never
opened? That doesn't make any sense...

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Anyone know how to make "slide-to-activate"-buttons?

2010-06-10 Thread Zsolt Vasvari
I am sure the source code for the unlock screen is available, I would
start there.

On Jun 11, 7:55 am, Rijad Sacirovic  wrote:
> What i mean is "switches" whom you cannot click to activate but
> instead have to slide them on
>
> Illustration:
>
> [x]---x
> Off      On
>
> You need to slide the "box" (= [  ]) needs to the x to the right to
> activate this button to "on".
>
> Anyone know how to make this type of button?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Oracle Android App Store

2010-06-10 Thread Zsolt Vasvari
> you can see that any company
> getting into the Android app store space is competing on a uneven
> playing field from day 1 on devices where they aren't integrated into
> the firmware, which makes running a market an unattractive proposition
> for most businesses.


If they can offer paid apps in more countries than Google, a lot of
developers would use them by default.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 test onCreate with saved Bundle?

2010-06-10 Thread TreKing
On Thu, Jun 10, 2010 at 2:15 PM, Jeff  wrote:

> Is there anyway that I can simulate or test this case to make sure I
> am restoring correctly now?
>

Rotate the screen.

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Oracle Android App Store

2010-06-10 Thread Al Sutton
Do we need any more app stores? :)

We've been running AndAppStore since the G1 launch and the most common
reason we hear for developers not listing is that they don't want to
maintain multiple market listings, so I doubt that the creation of
multiple markets backed by large companies is viable. AndAppStore
gives 100% of app sales revenue to developers, making it as profitable
as possible for paid-apps, and we still hit the "multiple market
maintenance" issue (our revenue is from ads in the client &
customisation deals in case you're wondering).

If you also add in that Market does things that third party after-
market app stores can't (automatic updates, copy protection,
permissions-before-download installs), you can see that any company
getting into the Android app store space is competing on a uneven
playing field from day 1 on devices where they aren't integrated into
the firmware, which makes running a market an unattractive proposition
for most businesses.

Al.

P.S. In case you were wondering, we keep running AndAppStore because
people want us to and it doesn't drain the companies resources. There
are users of non-Google experience devices & developers of apps they'd
like to be paid for who live in non-Google approved countries, so
we're happy to keep it running.

On Jun 11, 5:26 am, Andy Savage  wrote:
> I think that it's highly possible for a competing App market to make a
> splash but it would have to come pre-installed on the phones. It could be
> possible though for a company who develops one to pre-install it if they
> make a deal with HTC for certain models of phones :-)
>
> Perhaps just pick 2 of the latest phones and make a deal with HTC to include
> it alongside the google one. Or perhaps HTC could cobrand (HTC store run by
> xyz company).
>
> --
> "The greatest challenge to any thinker is stating the problem in a way that
> will allow a solution"
> - Bertrand Russell
>
> Andy Savage
> Cell Phone: +852 936 34341
> Skype ID: andy_savage
> Linked In:http://www.linkedin.com/in/andysavage
>
>
>
> On Fri, Jun 11, 2010 at 12:21 PM, gosh  wrote:
> > HTC don't have the global reach.
> > Of the Taiwanese companies ACER is probably the most international in
> > reach and intent - although they are pretty much a Microsoft shop.
> > They have this annual pattern thats been going for years, where they
> > demonstrate some prototype typically running some variant of Linux
> > (including Android) at Computex and the like, while they are
> > negotiating a better annual deal for Windows XP/and now Windows7 from
> > Microsoft, as a bargaining chip. ASUS has become their student in this
> > - witness the EeePC which mainly comes installed with a Windows
> > variant these days, after making its splash in the market with Linux.
> > I don't think the answer to android app market invigoration likes in
> > Taiwan.
>
> > Steve
>
> > On Jun 11, 11:48 am, Chi Kit Leung  wrote:
> > > Maybe HTC can develop their own market. But I am doubtful about they are
> > > working closely with Google.
>
> > > On Fri, Jun 11, 2010 at 9:16 AM, Yahel  wrote:
> > > > Slight problem,
>
> > > > The pre-installed market in every phone is Google's.
>
> > > > How do you overcome that ?
>
> > > > Internet Explorer is still the most used browser in the world(70 % on
> > > > non-tech-savvy sites) 8 years after the launch of firefox which is way
> > > > better. Just because IE is pre-installed in every windows machine.
>
> > > > Same thing here. Other markets won't be able to compete because of
> > > > that.
>
> > > > 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 > > >  cr...@googlegroups.com> > cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Regards,
> > > Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > 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] Facebook Connection Issue

2010-06-10 Thread Sohan badaya
Hi All,

I want to get Facebook Friends List and online presence from my
android application.
For that i have got API_KEY and SECRET from facebook.
I am using this code.

Intent intent = new Intent("android.intent.action.VIEW",
Uri.parse("http://www.facebook.com/login.php?
api_key=API_KEY&connect_display=popup&v=1.0&next=http://
www.facebook.com/connect/login_success.html&cancle_url=http://www.facebook.com/connect/login_failure.html&fbconnect=true&return_session=true&req_perms=read_stream,publish_stream,offline_access";));

startActivity(intent);

So when i run this code first i get facebook login page. on filling
data, i got some error page
error is -

"Error while loading page from 
 is under construction. Please try again later.

Configuration errors:
To fix this error, please set your Connect URL in the application
settings editor. Once it has been set, users will be redirected to
that URL instead of this page after logging in."

If i directly hit url

http://www.facebook.com/login.php?api_key=API_KEY&connect_display=popup&v=1.0&next=http://www.facebook.com/connect/login_success.html&cancle_url=http://www.facebook.com/connect/login_failure.html&fbconnect=true&return_session=true&req_perms=read_stream,publish_stream,offline_access

I got same error page. So I thing i have done some configuration
error.
Please help me out what error i have done and how to solve it.

Thanks

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


RE: [android-developers] Re: How global is the app market?

2010-06-10 Thread 楊健
To: Brad Gies
I am sorry , I just means "安卓市場" is not the official market of China.
It is faster that reply from your letter than search the original letter from 
hundreds of developers group letters.

Good luck everyone.Hope your apps sell well!  

-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of Brad Gies
Sent: Friday, June 11, 2010 1:37 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Re: How global is the app market?



It may not be ideal... but you do know that you can put the URL into 
Google Translate and get a translated version of the web page... Expect 
to spend a little time deciphering the translation however :).



On 10/06/2010 3:05 AM, 楊健 wrote:
> Is it really? I think the mmarket is the only one official market of China!
> You can put your paid version app on mmarket now.
>
> -Original Message-
> From: android-developers@googlegroups.com 
> [mailto:android-develop...@googlegroups.com] On Behalf Of ko5tik
> Sent: Thursday, June 10, 2010 6:32 PM
> To: Android Developers
> Subject: [android-developers] Re: How global is the app market?
>
> Those markets aare cool,
>
> but without chinese knowlege there is no chance to put apps there...
>
>
> On 10 Jun., 05:28, NightGospel  wrote:
>
>> Hi Neilz,
>>
>> Be one of Asian people, AFAIK, mainland China people they have market
>> their own, it's name is "安卓市場"(Translation to English is "Android
>> Market"). Because Google doesn't open Asian area (except for Japan) to
>> let developers upload paid softwares, they are out of patience and
>> create one market to play. Their android market has many very qulified
>> and full-idea softwares I've never seen. But one drawback is that many
>> of them are Simplified-Chinese only. :(
>>
>> Their forum:http://hiapk.com/bbs/
>>
>> NightGospel
>>
>> On 6月10日, 上午2時27分, Neilz  wrote:
>>
>>  
>>> Hi. I'm UK based and I'm wondering how much of the world can see and
>>> download my apps from the market?
>>>
>>  
>>> For example, the chinese market, which I believe is quite large, can
>>> they see UK or US based apps? Or does some kind of specific
>>> translation need to be done for this to happen? Or is it a separate
>>> market place?
>>>
>>  
>>> Thanks.
>>>
>

-- 
Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.bistrobot.com
---

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

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

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


回复: [android-developers] Int to string

2010-06-10 Thread Jiang
Integer.toString(tmp)

--- 10年6月11日,周五, Jason Hensler  写道:

发件人: Jason Hensler 
主题: [android-developers] Int to string
收件人: android-developers@googlegroups.com
日期: 2010年6月11日,周五,上午11:58

It seems like in my code that my app is crashing because it is a int and not a 
string. This is my code:
I am assuming that tmp has a value.. For debugging what is the best way to 
check varibles for values? 
 
If i remove the line with the red text everything runs fine. 

EditText text;
text = (EditText) findViewById(R.id.EditText01);
SharedPreferences myPrefs = this.getSharedPreferences("muter", 
MODE_WORLD_READABLE);
SharedPreferences.Editor prefsEditor = myPrefs.edit(); 
int tmp = myPrefs.getInt("state", 0); 
text.setText(tmp);
 
Thanks in advance!
Jason



-- 

You received this message because you are subscribed to the Google

Groups "Android Developers" group.

To post to this group, send email to android-developers@googlegroups.com

To unsubscribe from this group, send email to

android-developers+unsubscr...@googlegroups.com

For more options, visit this group at

http://groups.google.com/group/android-developers?hl=en


  

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

Re: [android-developers] Re: How global is the app market?

2010-06-10 Thread Brad Gies



It may not be ideal... but you do know that you can put the URL into 
Google Translate and get a translated version of the web page... Expect 
to spend a little time deciphering the translation however :).




On 10/06/2010 3:05 AM, 楊健 wrote:

Is it really? I think the mmarket is the only one official market of China!
You can put your paid version app on mmarket now.

-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of ko5tik
Sent: Thursday, June 10, 2010 6:32 PM
To: Android Developers
Subject: [android-developers] Re: How global is the app market?

Those markets aare cool,

but without chinese knowlege there is no chance to put apps there...


On 10 Jun., 05:28, NightGospel  wrote:
   

Hi Neilz,

Be one of Asian people, AFAIK, mainland China people they have market
their own, it's name is "安卓市場"(Translation to English is "Android
Market"). Because Google doesn't open Asian area (except for Japan) to
let developers upload paid softwares, they are out of patience and
create one market to play. Their android market has many very qulified
and full-idea softwares I've never seen. But one drawback is that many
of them are Simplified-Chinese only. :(

Their forum:http://hiapk.com/bbs/

NightGospel

On 6月10日, 上午2時27分, Neilz  wrote:

 

Hi. I'm UK based and I'm wondering how much of the world can see and
download my apps from the market?
   
 

For example, the chinese market, which I believe is quite large, can
they see UK or US based apps? Or does some kind of specific
translation need to be done for this to happen? Or is it a separate
market place?
   
 

Thanks.
   
   


--
Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.bistrobot.com
---

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Root permission for application

2010-06-10 Thread saikiran n
Shall we give root permissions for android application?
My requirement is i want to execute a c program using jni
That contains some functions like umount etc.
I tried in the following way
static{
System.loadLibrary("myjni");
}
Process p=Runtime.getRuntime().exec("su");
int value=getValue();

where getValue() is a native method contains umount() function call.
But this is returning -1 means permissions problem

Any 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

Re: [android-developers] Re: Oracle Android App Store

2010-06-10 Thread Andy Savage
I think that it's highly possible for a competing App market to make a
splash but it would have to come pre-installed on the phones. It could be
possible though for a company who develops one to pre-install it if they
make a deal with HTC for certain models of phones :-)

Perhaps just pick 2 of the latest phones and make a deal with HTC to include
it alongside the google one. Or perhaps HTC could cobrand (HTC store run by
xyz company).


-- 
"The greatest challenge to any thinker is stating the problem in a way that
will allow a solution"
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Fri, Jun 11, 2010 at 12:21 PM, gosh  wrote:

> HTC don't have the global reach.
> Of the Taiwanese companies ACER is probably the most international in
> reach and intent - although they are pretty much a Microsoft shop.
> They have this annual pattern thats been going for years, where they
> demonstrate some prototype typically running some variant of Linux
> (including Android) at Computex and the like, while they are
> negotiating a better annual deal for Windows XP/and now Windows7 from
> Microsoft, as a bargaining chip. ASUS has become their student in this
> - witness the EeePC which mainly comes installed with a Windows
> variant these days, after making its splash in the market with Linux.
> I don't think the answer to android app market invigoration likes in
> Taiwan.
>
> Steve
>
> On Jun 11, 11:48 am, Chi Kit Leung  wrote:
> > Maybe HTC can develop their own market. But I am doubtful about they are
> > working closely with Google.
> >
> >
> >
> >
> >
> > On Fri, Jun 11, 2010 at 9:16 AM, Yahel  wrote:
> > > Slight problem,
> >
> > > The pre-installed market in every phone is Google's.
> >
> > > How do you overcome that ?
> >
> > > Internet Explorer is still the most used browser in the world(70 % on
> > > non-tech-savvy sites) 8 years after the launch of firefox which is way
> > > better. Just because IE is pre-installed in every windows machine.
> >
> > > Same thing here. Other markets won't be able to compete because of
> > > that.
> >
> > > 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 cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Regards,
> > Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Manulaly reset event on Android

2010-06-10 Thread Bob Kerns
Hmm, I wouldn't term the manually-reset event as a fundamental
construct. It's a composite.

It is a fairly common construct in unstructured event handling. Note
that it involves state with a global lifetime (that is, not tied to
the execution of any specific running code).

Java has a strong bias toward structured mechanisms. You can view this
as Java nudging you toward "more modern" synchronization techniques.

On Jun 10, 11:16 am, ls02  wrote:
> This is similar how I implemented it originally. I though there must
> be some original Java core object to implement such fundamental as
> manually reset event.
>
> On Jun 10, 2:01 pm, Bob Kerns  wrote:
>
>
>
> > This is trivial to do with Java. (I say "trivial" in the sense of how
> > simple the technique is. Knowing how to properly use ANY thread
> > synchronization, even trivial ones, is hard...).
>
> > Here's a rough sketch. It's been a long time since I've used the
> > windows Event object, and I'm just typing in the Java off the top of
> > my head. So take this rough explanation, not worked out code example,
> > please.
>
> > class WindowsEvent {
> >   private boolean signaled = false;
> >   public synchronized void signal() {
> >     signaled = true;
> >     notifyAll();  // I forget the Event behavior -- notify() might e
> > correct instead?
> >   }
>
> >   public synchronized void reset() {
> >     signaled = false;
> >   }
>
> >   public synchronized void waitOnEvent() {
> >     while (! signaled) {
> >       wait();
> >       try {
> >       } catch (InterruptedException ex) {
> >       }
> >     }
> >   }
>
> > }
>
> > On Jun 10, 5:11 am, ls02  wrote:
>
> > > I looked at both of them and I don't think either of them work as
> > > manually reset event. Semaphore and lock ussualy have matching lock
> > > and unlock called from the same thread, they do not provide way for
> > > another thread to unlock the thread waiting on object. Basic Java
> > > Object sync works fine but it does not seem to allow to manully reset
> > > object state to signaled or non-signaled.
>
> > > On Jun 10, 7:35 am, Mark Murphy  wrote:
>
> > > > ls02 wrote:
> > > > > Is there sync object on android similar to manually reset event on
> > > > > Windows?
>
> > > > > It must have signaled and non-signaled state both set manually. A
> > > > > thread must be able to wait on it and wait would return immediately if
> > > > > the object is in signaled state and block if it is in non signaled
> > > > > state until another thread sets it to signaled state. There must be
> > > > > way to reset the object back to non-signaled state.
>
> > > > Off the cuff, that sounds like java.util.concurrent.Semaphore, or
> > > > perhaps java.util.concurrent.locks.ReentrantLock.
>
> > > > You might wish to take a look at _Java Concurrency in Practice_, as your
> > > > questions have little to do with Android and everything to do with Java:
>
> > > >http://amzn.to/baqNfl
>
> > > > --
> > > > 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: Oracle Android App Store

2010-06-10 Thread gosh
HTC don't have the global reach.
Of the Taiwanese companies ACER is probably the most international in
reach and intent - although they are pretty much a Microsoft shop.
They have this annual pattern thats been going for years, where they
demonstrate some prototype typically running some variant of Linux
(including Android) at Computex and the like, while they are
negotiating a better annual deal for Windows XP/and now Windows7 from
Microsoft, as a bargaining chip. ASUS has become their student in this
- witness the EeePC which mainly comes installed with a Windows
variant these days, after making its splash in the market with Linux.
I don't think the answer to android app market invigoration likes in
Taiwan.

Steve

On Jun 11, 11:48 am, Chi Kit Leung  wrote:
> Maybe HTC can develop their own market. But I am doubtful about they are
> working closely with Google.
>
>
>
>
>
> On Fri, Jun 11, 2010 at 9:16 AM, Yahel  wrote:
> > Slight problem,
>
> > The pre-installed market in every phone is Google's.
>
> > How do you overcome that ?
>
> > Internet Explorer is still the most used browser in the world(70 % on
> > non-tech-savvy sites) 8 years after the launch of firefox which is way
> > better. Just because IE is pre-installed in every windows machine.
>
> > Same thing here. Other markets won't be able to compete because of
> > that.
>
> > 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 > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Regards,
> Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: RTP stream video decoding

2010-06-10 Thread Andy Savage
I don't have the answer for you sorry, but I do suggest you check out the
Sipdroid source code.

The source code is mostly a mess and the comments are non-existent but the
audio works well (with very little delay). I would suggest get an idea of
how they did it by looking at their code and comparing their method to
yours.

Link:
http://sipdroid.org/

-- 
"The greatest challenge to any thinker is stating the problem in a way that
will allow a solution"
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Wed, Jun 9, 2010 at 5:52 PM, silentpartner <
silentpartner...@googlemail.com> wrote:

> Hi everyone,
>
> Just a small question.
>
> Please tell me what is the a typical payload length in bytes of RTP
> packet containing voice data?
>
> I am sending RTP packets with raw PCM data using AudioRecord class,
> but the delay is very high at the receiver end !!!
>
> Best Regards
>
>
> On May 24, 8:44 am, Andy Savage  wrote:
> > Hi everyone,
> >
> > I need a little bit of help from some experts out there.
> >
> > Currently I am developing an application that will stream video using RTP
> > and SIP. I have this mostly working with audio working fine both ways
> using
> > Java (and native) codecs. I can stream out video also from the camera to
> a
> > windows client.
> >
> > The problem comes from when I want to receive and decode the video on the
> > android platform. I understand at this stage that Mediaplayer only
> supports
> > RTSP streams. Ironically it does what I need (by getting the SDP
> information
> > from using RTSP SETUP call and using that RTP/UDP information to receive
> the
> > stream). But I can't seem to access this functionality, all it takes as
> > input is a RTSP url. If you are unfamiliar the difference between RTSP
> using
> > RTP and SIP using RTP. You can read about the differences
> > here
> > .
> >
> > What I need to do is take an RTP stream encoded with h.263-1998 and
> somehow
> > pass it to the mediaplayer (or even a lower level api if somebody can
> > provide an example).
> >
> > The only way I can think around this is to write another service
> > to receive the RTP stream and provide an RTSP interface... but this is a
> > really ugly solution.
> >
> > I would really appreciate if anybody could offer any help with this.
> >
> > Kind regards,
> > Andy Savage
> >
> > --
> > "The greatest challenge to any thinker is stating the problem in a way
> that
> > will allow a solution"
> > - Bertrand Russell
> >
> > Andy Savage
> > Cell Phone: +852 936 34341
> > Skype ID: andy_savage
> > Linked In:http://www.linkedin.com/in/andysavage
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email 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
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Int to string

2010-06-10 Thread Jason Hensler
It seems like in my code that my app is crashing because it is a int and not
a string. This is my code:
I am assuming that tmp has a value.. For debugging what is the best way to
check varibles for values?

If i remove the line with the red text everything runs fine.

EditText text;

text = (EditText) findViewById(R.id.*EditText01*);

SharedPreferences myPrefs = *this*.getSharedPreferences("muter", *
MODE_WORLD_READABLE*);

SharedPreferences.Editor prefsEditor = myPrefs.edit();

*int* tmp = myPrefs.getInt("state", 0);

text.setText(tmp);



Thanks in advance!

Jason

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: TaskAffinity causes new instance being created when startActivity

2010-06-10 Thread Dianne Hackborn
If they are modelling separate applications, then they each need to have a
different task affinity.  Having the same affinity means that when you start
the activity, it will have an affinity for an existing task with the same
name.

On Thu, Jun 10, 2010 at 8:09 AM, James Wang  wrote:

> Dianne, You are right.
> We did want to make an activity like launcher.
>
> In fact, our product is more complicated than what I said above.
>
> Below is the real plan:
> 1)We made an activity as the launcher L;
> 2)A tells L to start B;
> 3)B does something and tells L starts A again.
>
> L,A,B have the same taskAffinity. And L starts B and A with NEW_TASK.
>
> BTW, I noticed such words in SDK reference:
> "Similarly, a new instance of a "singleTop" activity may also be
> created to handle a new intent. However, if the target task already
> has an existing instance of the activity at the top of its stack, that
> instance will receive the new intent (in an onNewIntent() call); a new
> instance is not created. In other circumstances — for example, if an
> existing instance of the "singleTop" activity is in the target task,
> but not at the top of the stack, or if it's at the top of a stack, but
> not in the target task — a new instance would be created and pushed on
> the stack."
>
> It says if A is singleTop, A gets created twice is supposed to be true
> because A is not on the top of task.
> But we did not set A as singleTop.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] addProxomityAlert firing repeatedly

2010-06-10 Thread sujit panda
ya that's right i am also facing the same problem .The proximityAlert is
being fired multiple time.

On Fri, Jun 11, 2010 at 7:35 AM, Prasanna Perera
wrote:

> Hello,
>
> I am adding a proximityAlert with an expiration of -1 (does not
> expire).  I am testing using an Evo.  The proximityAlert fires several
> times after entering the location and staying inside the location.  I
> was thinking that the proximity alert should fire once when you enter
> the location and fire once when you exit the location.  Should the
> proximity alert fire multiple times after you enter the location and
> stay inside of the location?
>
> Thanks,
> Prasanna
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Proprietary MIME headers getting deleted by the SDK?

2010-06-10 Thread FractalBob
Hi,

My app adds proprietary headers to a MimeMessage with setHeader() and
up until the point the message is sent, I've confirmed with the
debugger that the headers are in the message. But after the message is
sent and I looked at it, all my headers are gone. Is this a known bug
in the SDK? This doesn't happen with standard Java apps (I'm porting a
Java desktop app to Android, so this code should work since it works
on the desktop). TIA!

Bob

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Application visibility issues. Again...

2010-06-10 Thread blab
Hi,

I have just noticed that the casual game "Toss It" has disappeared
from the Android Market. The paid version is still there but free one
is missing.

What is going on?

Apparently the "application visibility issues" have NOT been fixed as
stated here 
http://android-developers.blogspot.com/2010/06/application-visibility-issues.html

Please do not "fall short of your own standard for customer support by
not communicating the issue to your developers and how your are
working to resolve it" this time.

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


[android-developers] Creating ContextMenu based on information from Cursor

2010-06-10 Thread julius
Hi,

I have a ListView which is populated with items and I would like to be
able to create the context menu based on some information fetched from
the Cursor used to create the row. Is there a preferred approach for
storing a boolean or flag associate with the row? Eg. should it be in
the View? I could make the decision when creating the menu too, but I
need to get a unique id from the row in the ListView

public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
ListView listView = (ListView) v;

Also listView.getSelectedItem() seems to return null,
listView.getSelectedItemId() gives a very negative number and
listView.getSelectedView() is null too.

I thought that the mSelectedItem in the listView would be populated
when creating the context menu. Or it could be some typo
somewhere... :)

Thank you for any ideas.


Regards,
Julius.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: TaskAffinity causes new instance being created when startActivity

2010-06-10 Thread 楊健
When L starts A at the step 3 ,you want only one A  or two instances of A?
If only one , use the flag " singleTask ",if two, do nothing .

Can you describe you problem more exactly?
I do not understand you want the L A B in the same task or not.
-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of James Wang
Sent: Friday, June 11, 2010 12:09 AM
To: Android Developers
Subject: [android-developers] Re: TaskAffinity causes new instance being 
created when startActivity

Dianne, You are right.
We did want to make an activity like launcher.

In fact, our product is more complicated than what I said above.

Below is the real plan:
1)We made an activity as the launcher L;
2)A tells L to start B;
3)B does something and tells L starts A again.

L,A,B have the same taskAffinity. And L starts B and A with NEW_TASK.

BTW, I noticed such words in SDK reference:
"Similarly, a new instance of a "singleTop" activity may also be
created to handle a new intent. However, if the target task already
has an existing instance of the activity at the top of its stack, that
instance will receive the new intent (in an onNewIntent() call); a new
instance is not created. In other circumstances — for example, if an
existing instance of the "singleTop" activity is in the target task,
but not at the top of the stack, or if it's at the top of a stack, but
not in the target task — a new instance would be created and pushed on
the stack."

It says if A is singleTop, A gets created twice is supposed to be true
because A is not on the top of task.
But we did not set A as singleTop.

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

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


[android-developers] addProxomityAlert firing repeatedly

2010-06-10 Thread Prasanna Perera
Hello,

I am adding a proximityAlert with an expiration of -1 (does not
expire).  I am testing using an Evo.  The proximityAlert fires several
times after entering the location and staying inside the location.  I
was thinking that the proximity alert should fire once when you enter
the location and fire once when you exit the location.  Should the
proximity alert fire multiple times after you enter the location and
stay inside of the location?

Thanks,
Prasanna

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: bmgr not working?

2010-06-10 Thread nglauber
Yes. I have the same problem.

has anybody the solition?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Oracle Android App Store

2010-06-10 Thread Chi Kit Leung
Maybe HTC can develop their own market. But I am doubtful about they are
working closely with Google.

On Fri, Jun 11, 2010 at 9:16 AM, Yahel  wrote:

> Slight problem,
>
> The pre-installed market in every phone is Google's.
>
> How do you overcome that ?
>
> Internet Explorer is still the most used browser in the world(70 % on
> non-tech-savvy sites) 8 years after the launch of firefox which is way
> better. Just because IE is pre-installed in every windows machine.
>
> Same thing here. Other markets won't be able to compete because of
> that.
>
> 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
>



-- 
Regards,
Michael Leung
http://www.itblogs.info
http://www.michaelleung.info

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: OutOfMemoryError

2010-06-10 Thread Eric F
Look at the dimensions of your images, not the file sizes. Because the
file sizes are the result of PNG compression. But let's assume that's
not the problem.

First place to look is any static data structure, view, or drawable
that you might be stashing somewhere and preventing the GC from
cleaning it up. Remember that many Android objects will hold an
internal reference to a context or other views which will keep your
entire view hierarchy in memory. So holding a reference to just one of
those could be the entire problem.

-E

On Jun 10, 11:00 am, svebee  wrote:
> "if you had a png that was mostly white so compressed very well
> you might have a 200KB png file that actually is using 6MB of RAM on
> your device" - I didn't know it can use so much space :/
>
> About 90% of images (in total application, about 60% of them (this one
> 1KB) are used per activity, so I would say approx. 50KB per activity)
> are 1KB (or less), 5% are 10-60KB and 5% are 1-5KB so I think image
> size isn't a problem.
>
> So I'm pretty sure it's A) but how to solve it? And yes, I'm
> constantly switching between two-three activities (and I disabled
> rotation for some other reasons).
>
> On Jun 10, 7:20 pm, Eric F  wrote:
>
>
>
> > First you need to figure out what is taking up all the space in your
> > memory as well as what is causing the OOM. Like is OOM caused when you
> > switch between two activities over and over again? or if you rotate
> > the phone over and over causing the activity to be re-created over and
> > over. In which case you are probably leaking a context. Or are you
> > running out of memory because you are loading just too many images? I
> > don't think you've really given us enough information to help. If you
> > use DDMS to inspect your heap, what's taking up all the space? If it's
> > images, how big are the images? Remember in order for them to be drawn
> > they need to be *uncompressed* into device's RAM. at say 24 bits per
> > pixel, if you had a png that was mostly white so compressed very well
> > you might have a 200KB png file that actually is using 6MB of RAM on
> > your device. It's just too big, and you might not think about it
> > because if you come from a desktop PC mindset it's just a 200KB png
> > file in your mind. At this point I am guessing that either:
>
> > A) you are leaking a context so the images aren't being recycled
> > B) your images are too large uncompressed
>
> > But without more information it's hard to be sure
>
> > -E
>
> > On Jun 10, 7:28 am, svebee  wrote:
>
> > > hello, as I'm beginner in Android I have problem with memory - after
> > > only 2-3 minutes I get Force Close and outOfMemory Error.
>
> > > I have only onCreate (I know, stupid, but I didn't knew for anything
> > > else as I started only few weeks ago) and inside I have...
>
> > > @Override
> > >  public void onCreate(Bundle savedInstanceState) {
> > >   super.onCreate(savedInstanceState);
> > >   setContentView(R.layout.main);
>
> > >   many lines of code...manipulating with SQLite databases...
>
> > > }
>
> > > inside main XML layout I have many images, small, big (background) and
> > > so on...How can I on every onCreate "delete" all content from memory
> > > that was before in it - so when I open activity again, it deletes all
> > > images and everything out and insert the new (old) one inside.
> > > "Little" awkward but that's only thing I have on mind.
>
> > > Also, inside "many lines of code" I don't declare any images!
>
> > > Or simply, how can I "bypass" outOfMemoryError? Do I have to do
> > > something like this?
>
> > > �...@override
> > >      public void onCreate(Bundle savedInstanceState) {
> > >       super.onCreate(savedInstanceState);
>
> > >         BitmapFactory.Options options=new BitmapFactory.Options();
> > >         options.inSampleSize = 8;
> > >         Bitmap buildingBitmap =
> > > BitmapFactory.decodeResource(null,R.drawable.background,options);
>
> > > if (buildingBitmap != null)
> > >         {
> > >         buildingBitmap.recycle();
> > >         System.gc();
> > >         buildingBitmap = null;
> > >         }
>
> > >       setContentView(R.layout.main);
>
> > >       many lines of code...manipulating with SQLite databases...
>
> > >     }
>
> > > or...? Also on other activity is everything "the same" except I have
> > > multiple overlays, how can I "erase" (recycle) them also? Thank you
> > > for any help.
>
> > > *currently, I'm not searching for fastest, most "correct" or better
> > > solution, I just want something that it's not crashing all the time

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


Re: [android-developers] Gmail app - part of system?

2010-06-10 Thread Dianne Hackborn
It is not part of the android "system" any more than maps is.  Now whether
it can update from market is a different question, with a lot of variables
-- whether it uses any private APIs, is signed with a certificate owned by
someone that is stable, etc.

On Thu, Jun 10, 2010 at 12:53 PM, Cheryl Sedota wrote:

> Is the gmail app part of the android "system", in that it is not able
> to be updated without a system-wide update?  Or is it possible for the
> gmail app to be periodically updated (thru market or some other
> mechanism?) without upgrading the platform itself?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Service gets killed (due to activity ?)

2010-06-10 Thread Dianne Hackborn
Also if this app is doing something for the user that they care about, by
all means use startForeground(), have a notification to tell them it is
running, and give them a UI to decide whether or not it should run.  Then
they can make that decision.

On Thu, Jun 10, 2010 at 5:20 PM, Mark Murphy wrote:

> Tejas wrote:
> > Now, my question is :  Will using the timer class, have the same effect
> > as using the AlarmManager ? or will it consume more resources.
>
> Generally speaking, your goal is to not have your code run and not have
> your code be in memory. The more your code runs, the more battery you
> consume. The more memory you take up, the more difficult it is for other
> applications to run. And, as Ms. Hackborn mentioned, your service will
> eventually be destroyed, anyway.
>
> The best way to do polling operations in Android is to use the
> AlarmManager and an IntentService. However, that does not work well with
> interfaces where you have to register listeners, such as SensorManager.
>
> Another way to do polling operations in Android is to use the
> AlarmManager and a regular service that does something like this:
>
> -- in onStart(), attaches itself to SensorManager and anything else
> listener-based
> -- as those listeners are called, collects data
> -- as soon as it gets data from all listeners and records it, the
> service calls stopSelf()
>
> So long as those listeners will do their work in a shorter time than
> your polling period, you should be fine.
>
> This keeps your code out of memory the vast majority of time.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android 2.2 Programming 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Service gets killed (due to activity ?)

2010-06-10 Thread Mark Murphy
Tejas wrote:
> Now, my question is :  Will using the timer class, have the same effect
> as using the AlarmManager ? or will it consume more resources.

Generally speaking, your goal is to not have your code run and not have
your code be in memory. The more your code runs, the more battery you
consume. The more memory you take up, the more difficult it is for other
applications to run. And, as Ms. Hackborn mentioned, your service will
eventually be destroyed, anyway.

The best way to do polling operations in Android is to use the
AlarmManager and an IntentService. However, that does not work well with
interfaces where you have to register listeners, such as SensorManager.

Another way to do polling operations in Android is to use the
AlarmManager and a regular service that does something like this:

-- in onStart(), attaches itself to SensorManager and anything else
listener-based
-- as those listeners are called, collects data
-- as soon as it gets data from all listeners and records it, the
service calls stopSelf()

So long as those listeners will do their work in a shorter time than
your polling period, you should be fine.

This keeps your code out of memory the vast majority of time.

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

Android 2.2 Programming 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: Oracle Android App Store

2010-06-10 Thread gosh
>Slight problem,
>The pre-installed market in every phone is Google's.
>How do you overcome that ?

Thats why I suggest its got to be an Oracle-level company - some
entity that carriers will do deals with at the pre-installed market
level and/or that the customer will type into the browser from memory.

Steve

On Jun 11, 9:16 am, Yahel  wrote:
> Slight problem,
>
> The pre-installed market in every phone is Google's.
>
> How do you overcome that ?
>
> Internet Explorer is still the most used browser in the world(70 % on
> non-tech-savvy sites) 8 years after the launch of firefox which is way
> better. Just because IE is pre-installed in every windows machine.
>
> Same thing here. Other markets won't be able to compete because of
> that.
>
> Yahel

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


Re: [android-developers] Re: Service gets killed (due to activity ?)

2010-06-10 Thread Tejas
Hi Guys,

Thanks for your inputs. I have one more question. Before I ask, here is in
brief, about what I'm doing.
I'm working on a research project in a university and we are trying to find
out the mobile users' context information. For this, we need to sense the
users' environment. So, the basic working of the service is as follows:

- Initialise on start : register call backs using Intent filters,
SensorManager and other System services
- The main thread sleeps for about 15 mins, wakes up collects info from
diff. classes and sends to a server. (i'm using the Java Timer class to do
this)

Now, my question is :  Will using the timer class, have the same effect as
using the AlarmManager ? or will it consume more resources.
Also, it would be great if someone can suggest better way of achieving what
I'm doing.

-- 
Cheers,
~Tejas

On Thu, Jun 10, 2010 at 5:46 PM, Dianne Hackborn wrote:

> Also note we are getting increasingly hard-core on such services.  In
> Eclair I think we tweaked things so that a long-running services' process
> will eventually get moved from the "service" bucket to "background," to
> basically guarantee it eventually gets killed (and the service restarted a
> little while later).
>
> Also since these services tend to be one of our more significant causes of
> poorly behaving devices, we are iteratively working on making them visible
> to the user so they can blame the correct apps, and I'd like to also have a
> way for users to report them to developers through the feedback mechanism.
>  I was also thinking of having a button the user could press to really
> easily jump to market to rate the app. ;)
>
>
> On Thu, Jun 10, 2010 at 1:46 PM, Mark Murphy wrote:
>
>> keyeslabs wrote:
>> > If you have a very good reason for doing so (one that you're willing
>> > to defend to users and the likes of Mark) then you can force the
>> > service to have the same priority as an activity use setForeground.
>> > The caveat is that you must keep a notification visible for your
>> > service.
>>
>> Note that it is startForeground() as of Android 2.0.
>>
>> You wouldn't typically use that for a boot-time, try-to-be-everlasting
>> service, though.
>>
>> Having an activity starting and stopping a service, using
>> startForeground() and a Notification, is a truly delightful pattern.
>>
>> I just cringe when developers try making services last forever,
>> particularly starting at boot. It is development anti-patterns like
>> everlasting services that cause all those industry pundits to say you
>> need to use task killers to have your Android devices run well.
>>
>> As with many anti-patterns, there are spots for which everlasting
>> services are valid (e.g., VOIP client waiting on a socket for an
>> incoming call). But those are the exception, not the rule.
>>
>> That's why I boo.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://github.com/commonsguy
>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>
>> Android Consulting: http://commonsware.com/consulting
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Anyone know how to make "slide-to-activate"-buttons?

2010-06-10 Thread Rijad Sacirovic
What i mean is "switches" whom you cannot click to activate but
instead have to slide them on

Illustration:

[x]---x
Off  On

You need to slide the "box" (= [  ]) needs to the x to the right to
activate this button to "on".

Anyone know how to make this type of button?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Oracle Android App Store

2010-06-10 Thread gosh
> When I look at BlackBerry App World it lists over 200 countries which
> seems high but I know they support almost everywhere by now so perhaps
> it's correct.  I find it crazy that Canada isn't supported considering
> NAFTA.

Yes, I also find it odd that there are four countries that they sell
to, but don't let developers/publishers sell from, as in:

Australia
Canada
New Zealand
Switzerland

I don't know about New Zealand but in those other 3, Google has its
own software development efforts, e.g. WAVE in Australia.
I suspect that they just didn't want any of their own programmers with
deep internal tech knowledge to jump-ship with start-ups selling
Android apps, in the year just gone. i.e. They take great pride in the
fact that they have a high retention rates of programmers, while
places like Microsoft have been losing good coders for some years now.

> Also I suspect that Apple wouldn't have passed MS in market cap if the
> app store had the same return policy as the android market.

Yes its a win-win-win situation (software publishers/Internet industry/
users). Before the Internet I used to publish software for a living.
In 1994/95 the www killed all that - the early-adopters who used to be
the buyers of software from those publishers other than the Microsofts
and Adobes of the world, all went to the big free download on the web.
Most people I know who contribute to free open source projects have
other jobs that pay their wages - e.g. academia. The App Store is the
first mechanism since 1994 that gives something back to software
developers, while also giving customers software for a few bucks
(versus the ridiculous price of games on the consoles our kids pay or
pirate), while also keeping the Internet healthy with activity and
innovation.

Apple has effectively tapped the great untapped resource that is
software developers and publishers, who don't have some other source
of income or some other activity they'd rather be doing. So yes, I
agree with you whole-heartedly - it is a large part of the reason
Apple have shot to the top in market cap. And I whole-heartedly wish
Android provided a similar future avenue - if not via Google, then via
some other worthy advocate for innovation and progress.

Steve

On Jun 11, 2:46 am, Leigh McRae 
wrote:
> When I look at BlackBerry App World it lists over 200 countries which
> seems high but I know they support almost everywhere by now so perhaps
> it's correct.  I find it crazy that Canada isn't supported considering
> NAFTA.
>
> I really don't think Google is all that interested in paid apps as they
> are in extending their ad network to handhelds.  You can't really blame
> them as it's their core business.
>
> Also I suspect that Apple wouldn't have passed MS in market cap if the
> app store had the same return policy as the android market.
>
> Leigh
>
> On 6/10/2010 11:51 AM, gosh wrote:
>
>
>
>
>
> > Oracle Android App Store
>
> > Here's the countries that developers can currently sell from via
> > Android Market:
> >http://www.google.com/support/androidmarket/bin/answer.py?answer=150324
>
> > Here's the countries that Android Market offers free apps to:
> >http://www.google.com/support/androidmarket/bin/answer.py?hl=en&answe...
>
> > Here's the countries that Android Market sells to:
> >http://www.google.com/support/androidmarket/bin/answer.py?hl=en&answe...
> > (i.e. the 13 countries down the bottom of the same page)
>
> > These haven't changed much for a long time - e.g. 9 countries in that
> > first list haven't changed since September 2009.
> > (Googles Knows why its not the same 13 where users can buy from)
>
> > How does this compare with the other mobile OS vendors?
>
> > Apple's App Store currently works in 90 countries. In Feb'2010 they
> > added: Armenia, Botswana, Bulgaria, Jordan, Kenya, Macedonia,
> > Madagascar, Mali, Mauritius, Niger, Senegal, Tunisia, and Uganda  ...
> > i.e. they are going to run out of global map real soon now. Say what
> > you like about them, but they take paid apps seriously.
> > I.e. see:  
> > http://developer.apple.com/iphone/news/archives/2010/february/#newspr...
>
> > Here's the 29 countries that Microsoft's Windows Phone Marketplace
> > developers can sell to (and upload from):
>
> >http://developer.windowsphone.com/help.aspx?id=fd9b5508-6436-4503-917...
>
> > ...when the forthcoming Windows7 Phone hits the market later this
> > year.
>
> > What both Android app developers and global Android users need is
> > another substantial app store run by a globally recognised ICT entity
> > with a global presence (not carrier app stores such as Motorola's), an
> > International commitment, and that uses more conventional payment
> > methods (PayPal/ the standard Credit Cards). It will happen eventually
> > given the gapping great gap in the Android Market service roll-out all
> > this time. I'd lay odds on Oracle setting up an Android App Store that
> > uses PayPal, which seems an odd possibility at first, but then when
> >

[android-developers] Re: Twitter app's popup aligned with ListView item - how did they do it?

2010-06-10 Thread Nerdrow
Sorry, haven't been here in a while

This is how you can do it in a nutshell, ugly and all in java :)

LayoutParams wrapParams = new
LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);

final LinearLayout contentView = new LinearLayout(this);
contentView.setLayoutParams(new
LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
contentView.setOrientation(LinearLayout.VERTICAL);
contentView.setGravity(Gravity.CENTER);
setContentView(contentView);

final TextView popupContent = new TextView(this);
popupContent.setLayoutParams(wrapParams);
popupContent.setText("Replace this TextView with your
layout");

// this is the only important part
final PopupWindow popupWindow = new PopupWindow(this, null,
android.R.style.Widget_PopupWindow);
 
popupWindow.setWindowLayoutMode(ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
// set according to your needs
 
popupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
// set according to your needs
popupWindow.setOutsideTouchable(false);
popupWindow.setContentView(popupContent);
// this is the only important part

final Button button = new Button(this);
button.setLayoutParams(wrapParams);
button.setText("Click Me");
contentView.addView(button);

button.setOnClickListener(
new OnClickListener() {
@Override public void onClick(View v) {
   popupWindow.showAsDropDown(v);
}
}
);
popupContent.setOnClickListener(
new OnClickListener() {
@Override public void onClick(View v) {
popupWindow.dismiss();
}
}
);



On May 27, 1:23 am, ionel  wrote:
> Can you put some code how you created PopupWindows?
>
> On May 21, 10:53 pm, Nerdrow  wrote:
>
>
>
> > I used the layouts, graphics, and animation from the default Contacts
> > app, which uses separate layouts for the header, body, and footer, but
> > you can merge them all into one.  Create a PopupWindow, set that
> > layout as the contentView, then use showAsDropDown(View anchor, int
> > xoff, int yoff) to show it.  The Contacts layout has a LinearLayout
> > inside a HorizontalScrollView w/ImageViews for the two grips, so just
> > stick your content in the LinearLayout between the grips and you're
> > set.  The QuickContactWindow class has a method to set the arrows and
> > everything, copy & paste.
>
> > On May 12, 7:58 pm, Adam  wrote:
>
> > > Is there a way to get that same popup layout like they have on twitter
> > > or in the quick contacts popup? Do we just combine the top, middle,
> > > bottom image resources as backgrounds in some sort of layout, or is
> > > there a simpler way?
>
> > > On May 10, 5:16 pm, skink  wrote:
>
> > > > Mark Murphy wrote:
> > > > > westmeadboy wrote:
> > > > > > Anyone any ideas?
>
> > > > > Ummm...figure out where the item is positioned on screen, then use 
> > > > > some
> > > > > margin tricks to position theirpopupto match, I suppose.
>
> > > > if you usePopupWindowyou don't have to use margins at all - you can
> > > > position yourpopupin any (x,y) location
>
> > > > moreover: using showAsDropDown you don't even have to locate anchor
> > > > view position
>
> > > > 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 
> > > > 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 
> > > 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 
> > 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 emai

[android-developers] Re: Twitter app's popup aligned with ListView item - how did they do it?

2010-06-10 Thread Yahel
Sorry to highjack the post,

Just to say "Good job", the twitter app is one of the most polished
i've seen on the market.

Keep up the good work and thanks for sharing.

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: StackOverflowError in UI redraw

2010-06-10 Thread Yahel
Salut Thierry,

Is it a a freebox control app that you are making ? Looks nice !!

Maybe you could post here your layout xml, to see if maybe using merge
or something, someone can help you reduce layers.

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] Using Android internal view

2010-06-10 Thread lman
Hello,

I am looking to use a custom View found in the Android source code.
Since it wasn't available in the public API I simply used the source
code to place the widget into my application. The View works
correctly, however, when I tried to make a slight modification within
my package that change did not take effect.

I do understand that using private API classes is considered bad
practice and comes with the high risk of breaking, but I am more
curious as to why the changes made to the class did not take effect in
my package.

The change I implemented to test this was simply dropping a Log.d into
the constructor. Let's assume for this question's sake that I am
constructing the component correctly in Java.

Some code as an example to supplement:
Original class taken from source:

package com.android.internal.widget;
class SampleWidget extends View {

public SampleWidget(Context context, AttributeSet attrs){
 super(context, attrs);
  // the rest of the constructor
}

// all the required methods to draw this view correctly,
unmodified from original source
}

My modification:
package com.custom.mypackage.widget;

class MySampleWidget extends View {

public MySampleWidget(Context context, AttributeSet attrs){
 super(context, attrs);
 Log.d("MySampleWidget", "");
  // the rest of the constructor
}

// all the required methods to draw this view correctly,
unmodified from original source
}

Any suggestions would be greatly appreciated. If further clarification
is required I would be happy to provide such.

Thank you.

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


Re: [android-developers] Re: Service gets killed (due to activity ?)

2010-06-10 Thread Dianne Hackborn
Also note we are getting increasingly hard-core on such services.  In Eclair
I think we tweaked things so that a long-running services' process will
eventually get moved from the "service" bucket to "background," to basically
guarantee it eventually gets killed (and the service restarted a little
while later).

Also since these services tend to be one of our more significant causes of
poorly behaving devices, we are iteratively working on making them visible
to the user so they can blame the correct apps, and I'd like to also have a
way for users to report them to developers through the feedback mechanism.
 I was also thinking of having a button the user could press to really
easily jump to market to rate the app. ;)

On Thu, Jun 10, 2010 at 1:46 PM, Mark Murphy wrote:

> keyeslabs wrote:
> > If you have a very good reason for doing so (one that you're willing
> > to defend to users and the likes of Mark) then you can force the
> > service to have the same priority as an activity use setForeground.
> > The caveat is that you must keep a notification visible for your
> > service.
>
> Note that it is startForeground() as of Android 2.0.
>
> You wouldn't typically use that for a boot-time, try-to-be-everlasting
> service, though.
>
> Having an activity starting and stopping a service, using
> startForeground() and a Notification, is a truly delightful pattern.
>
> I just cringe when developers try making services last forever,
> particularly starting at boot. It is development anti-patterns like
> everlasting services that cause all those industry pundits to say you
> need to use task killers to have your Android devices run well.
>
> As with many anti-patterns, there are spots for which everlasting
> services are valid (e.g., VOIP client waiting on a socket for an
> incoming call). But those are the exception, not the rule.
>
> That's why I boo.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Consulting: http://commonsware.com/consulting
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Handling events from one service for multiple activities

2010-06-10 Thread Mark Murphy
takyon wrote:
> If I can't do this then what is the right way for multiple activities
> in an application to get event notifications from a service.

Have them bind to the service and provide callback objects.

Or, have your TabActivity bind to the service, provide a single callback
object, and dispatch events to the appropriate tab.

There are other patterns as well, but I'd start with those.

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

_Android Programming Tutorials_ Version 2.0 Available!

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


[android-developers] Re: Handling events from one service for multiple activities

2010-06-10 Thread takyon
If I can't do this then what is the right way for multiple activities
in an application to get event notifications from a service.

On Jun 10, 1:37 pm, Mark Murphy  wrote:
> takyon wrote:
> > Can I call an activity function like the following in the stub handler
> > for the callback in my class S -
>
> > private Callback mEventListener = new OperationCallback.Stub()
> > {
> >   �...@override
> >    public void handleOperationEvent(Payload payload)
>
> >    {
> >       B objB = new B();   // Is this valid? Since B is an activity.
>
> No, that is not valid. Besides, there already is an instance of B. You
> need your callback to know of the already-existing instance of B.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Consulting:http://commonsware.com/consulting

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] End activity

2010-06-10 Thread Rohit
Hi,
  I have an activity A that has a list and a "+" button clicking on
which takes you to activity B. In B you can add an item and when
finish() is called it takes you back to activity A and shows the newly
added item (that you added in activity B).

Now I have a widget and I want to start activity B directly from the
widget. I can do that. What I want is that when then user is done
adding the item it should not take the user to activity A but directly
to the desktop because that is where he invoked the activity (B)
from

I tried to set flags on the intent that I was using from the widget
but maybe I am not using the correct combination of intent flags and
launchmodes (in the manifest).

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


[android-developers] Re: How to listen for changes on Calls.CallLog

2010-06-10 Thread curtis
Its actually a lot easier to do for CallLog content provider than it
is for SMS, just use CallLog.Calls.CONTENT_URI for the uri.

public PhoneTap(Handler handler, String myNumber, Context context){
super(handler);
this.myNumber = myNumber;
this.context = context;
}

@Override
public void onChange(boolean selfChange) {
if(cur==null){
cursorInit(context);
}

if (!cur.moveToNext()) {
//do we really want to close the cursor?
//cur.close();
return;
}

String number = cur.getString(numberColumn);
String id = cur.getString(idColumn);
String type = cur.getString(typeColumn);
String date = cur.getString(dateColumn);
String dur = cur.getString(durColumn);
Date dateN = new Date(Long.parseLong(date));
Date date2 = new Date();
Log.i("PHONETAP", date2+": "+dateN+":"+id+", "+number+", "+type
+", "+dur);
}

public void cursorInit(Context context){
String[] projection = new String[]{BaseColumns._ID,
CallLog.Calls.DATE, CallLog.Calls.NUMBER,
CallLog.Calls.DURATION, CallLog.Calls.TYPE};
ContentResolver resolver = context.getContentResolver();
cur = resolver.query(CallLog.Calls.CONTENT_URI, projection, 
null,
null,
"date ASC");

numberColumn = cur.getColumnIndex(CallLog.Calls.NUMBER);
typeColumn = cur.getColumnIndex(CallLog.Calls.TYPE);
dateColumn = cur.getColumnIndex(CallLog.Calls.DATE);
durColumn = cur.getColumnIndex(CallLog.Calls.DURATION);
idColumn = cur.getColumnIndex(CallLog.Calls._ID);
}


On Jun 1, 12:13 am, mike  wrote:
> hi Donal,
>
> this is what i have done for sms
>
>         protected void listeneNativeInbox() {
>                 String url = "content://sms/";
>                 Uri uri = Uri.parse(url);
>
> context.getContentResolver().registerContentObserver(CallLog.Calls.CONTENT_URI,
> true,
>                                 new MyInboxListener(handler));
>
>                 Uri Sms = Uri.parse("content://sms/inbox");
>                 Cursor c = context.getContentResolver().query(Sms, null, 
> null, null,
>                                 null);
>         }
>
>         class MyInboxListener extends ContentObserver {
>
>                 public MyInboxListener(Handler handler) {
>                         super(handler);
>                         // TODO Auto-generated constructor stub
>                 }
>
>                 @Override
>                 public boolean deliverSelfNotifications() {
>                         // TODO Auto-generated method stub
>                         return false;
>                 }
>
>                         public void onChange(boolean selfChange) {
>                         // TODO Auto-generated method stub
>                         Log.v("SMS", "Notification on SMS observer");
>
>                         Message msg = new Message();
>                         msg.obj = "xx";
>
>                         handler.sendMessage(msg);
>
>                         Uri uriSMSURI = Uri.parse("content://sms/");
>                         Cursor cur = getContentResolver().query(uriSMSURI, 
> null, null,
>                                         null, null);
>                         cur.moveToNext();
>                         String protocol = 
> cur.getString(cur.getColumnIndex("protocol"));
>                         if (protocol == null) {
>                                 Log.d("SMS", "SMS SEND");
>                                 int threadId = 
> cur.getInt(cur.getColumnIndex("thread_id"));
>                                 Log.d("SMS", "SMS SEND ID = " + threadId);
>                                 getContentResolver().delete(
>                                                 
> Uri.parse("content://sms/conversations/" + threadId),
>                                                 null, null);
>
>                         } else {
>                                 Log.d("SMS", "SMS RECIEVE");
>                                 int threadIdIn = 
> cur.getInt(cur.getColumnIndex("thread_id"));
>                                 getContentResolver().delete(
>                                                 
> Uri.parse("content://sms/conversations/" + threadIdIn),
>                                                 null, null);
>                         }
>                 }
>         }
>
> if i'm going to listen for CallLog changes what are the parameters for
> onChange method??
>
> regards,
> Randika

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

[android-developers] Weird contact behavior in 2.1 - adding phone number

2010-06-10 Thread Jay-andro
I am using the code below to add a phone number to a contact. The code
works in some cases and not others.

1. On the 2.1update1 emulator it works all the time
2. On a Nexus One 2.1update1 phone it works when I create a new
contact manually, then use my app with the code below to add a phone
number to said contact
3. On the same phone, when the app adds a phone number to a contact
that existed from before (tied to a gmail account), the api call
succeeds with no exception but it does not add the new number in to
the contact.
4. The update of one phone number to another works 100% of the time.

What gives with #3?
Jay


Adding phone number to existing contact (does not work in Case 3
above):
{
ArrayList ops = new
ArrayList();
ops.add(ContentProviderOperation.newInsert(Data.CONTENT_URI)
.withValue(Data.RAW_CONTACT_ID, 
rawcontactID)
.withValue(Data.MIMETYPE, 
Phone.CONTENT_ITEM_TYPE)
.withValue(Phone.NUMBER, PhoneNumber)
.withValue(Phone.TYPE, 
Phone.TYPE_MOBILE)
.build());
context.getContentResolver().applyBatch(ContactsContract.AUTHORITY,
ops);
}

Updating phone number in existing contact (works all the time):
{
ArrayList operation = new
ArrayList();
operation.add(ContentProviderOperation.newUpdate(Data.CONTENT_URI)
.withSelection(Data._ID+ "=?", new 
String[]
{String.valueOf(contactID)})
.withValue(Phone.TYPE, phonetype)
.withValue(Phone.NUMBER, PhoneNumber)
.build());
context.getContentResolver().applyBatch(ContactsContract.AUTHORITY,
operation);
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do move an button using scrollTo(x,y)???

2010-06-10 Thread Dixit Wadhwani


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Oracle Android App Store

2010-06-10 Thread Chi Kit Leung
I will vote any companies to setup alternative market! Android is for
openness.
I believe there is very a big market gap in there.

By the way, Java Store is still beta, Actually, I think more than a year.

On Fri, Jun 11, 2010 at 2:46 AM, Leigh McRae  wrote:

> When I look at BlackBerry App World it lists over 200 countries which seems
> high but I know they support almost everywhere by now so perhaps it's
> correct.  I find it crazy that Canada isn't supported considering NAFTA.
>
> I really don't think Google is all that interested in paid apps as they are
> in extending their ad network to handhelds.  You can't really blame them as
> it's their core business.
>
> Also I suspect that Apple wouldn't have passed MS in market cap if the app
> store had the same return policy as the android market.
>
> Leigh
>
>
>
> On 6/10/2010 11:51 AM, gosh wrote:
>
>> Oracle Android App Store
>>
>> Here's the countries that developers can currently sell from via
>> Android Market:
>> http://www.google.com/support/androidmarket/bin/answer.py?answer=150324
>>
>> Here's the countries that Android Market offers free apps to:
>>
>> http://www.google.com/support/androidmarket/bin/answer.py?hl=en&answer=138294
>>
>> Here's the countries that Android Market sells to:
>>
>> http://www.google.com/support/androidmarket/bin/answer.py?hl=en&answer=138294
>> (i.e. the 13 countries down the bottom of the same page)
>>
>> These haven't changed much for a long time - e.g. 9 countries in that
>> first list haven't changed since September 2009.
>> (Googles Knows why its not the same 13 where users can buy from)
>>
>> How does this compare with the other mobile OS vendors?
>>
>> Apple's App Store currently works in 90 countries. In Feb'2010 they
>> added: Armenia, Botswana, Bulgaria, Jordan, Kenya, Macedonia,
>> Madagascar, Mali, Mauritius, Niger, Senegal, Tunisia, and Uganda  ...
>> i.e. they are going to run out of global map real soon now. Say what
>> you like about them, but they take paid apps seriously.
>> I.e. see:
>> http://developer.apple.com/iphone/news/archives/2010/february/#newsprofile
>>
>> Here's the 29 countries that Microsoft's Windows Phone Marketplace
>> developers can sell to (and upload from):
>>
>>
>> http://developer.windowsphone.com/help.aspx?id=fd9b5508-6436-4503-9174-45bf532b9dfd
>>
>> ...when the forthcoming Windows7 Phone hits the market later this
>> year.
>>
>> What both Android app developers and global Android users need is
>> another substantial app store run by a globally recognised ICT entity
>> with a global presence (not carrier app stores such as Motorola's), an
>> International commitment, and that uses more conventional payment
>> methods (PayPal/ the standard Credit Cards). It will happen eventually
>> given the gapping great gap in the Android Market service roll-out all
>> this time. I'd lay odds on Oracle setting up an Android App Store that
>> uses PayPal, which seems an odd possibility at first, but then when
>> you think about it more seriously, it makes commercial sense from a
>> lot of different angles:
>> - Sun had a Java Store that used PayPal.
>> - They now control Java.
>> - They like making money from software.
>> - As Google moves to Web apps within the forthcoming Web Store, Oracle
>> could befriend Android developers (via global distribution) and
>> gradually try to move them towards JavaFX apps (whatever plans they
>> have for that).
>> - In building such an app store it could showcase their existing
>> Oracle Store product for building such things.
>> - They could entice Android app developers to develop 'services' for
>> their own apps on their own MySQL/Oracle DBMS servers (supplied by
>> Oracle), or via an Oracle cloud.
>>
>> Any votes for an Oracle Android App Store?
>> Any votes for a Yahoo! Android App Store?
>>  or
>> What other major ICT/media company could pull off such a marketing
>> coup?
>>
>>
>>
>
> --
> Leigh McRae
> www.lonedwarfgames.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
>



-- 
Regards,
Michael Leung
http://www.itblogs.info
http://www.michaelleung.info

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Handling events from one service for multiple activities

2010-06-10 Thread Mark Murphy
takyon wrote:
> Can I call an activity function like the following in the stub handler
> for the callback in my class S -
> 
> private Callback mEventListener = new OperationCallback.Stub()
> {
>@Override
>public void handleOperationEvent(Payload payload)
> 
>{
>   B objB = new B();   // Is this valid? Since B is an activity.

No, that is not valid. Besides, there already is an instance of B. You
need your callback to know of the already-existing instance of B.

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

Android Consulting: http://commonsware.com/consulting

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ListView

2010-06-10 Thread Sandy
I was thinking more along these lines i.e. have  a bunch of buttons
that are added to the list item and then move these items on a gesture
by repainting the list item couple of times but I dont know if this
will work.

1. Have a  custom list item component which has linear layout of
buttons.
2. Listen to horizontal gesture events in a ListVIew
3. Animate the list view programmatically to move the buttons on a
horizontal gesture

If you have ideas for how to make this work without using a second
listview or horizontalscrollview , please suggest.

Thanks,
Sandy

On Jun 10, 6:06 am, Mark Murphy  wrote:
> Sandy wrote:
> > Actually the link I was referring to was horizontalscrollview within a
> > scrollview (NOT a listview like i mentioned below). Here it is:
>
> >http://stackoverflow.com/questions/2646028/android-horizontalscrollvi...
>
> > This will not work for me because the functionality I desire to have
> > is a vertical ListView with 100 list items and the selected item will
> > have few buttons (around 10) which can be scrolled horizontally.
>
> I will be stunned if a HorizontalScrollView will work in a ListView row.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1
> Available!

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


[android-developers] streaming service example?

2010-06-10 Thread schwiz
Anyone know of a good code example of how to run a service that
streams music from the internet and also binds to an activity to give
a gui?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Service gets killed (due to activity ?)

2010-06-10 Thread Mark Murphy
keyeslabs wrote:
> If you have a very good reason for doing so (one that you're willing
> to defend to users and the likes of Mark) then you can force the
> service to have the same priority as an activity use setForeground.
> The caveat is that you must keep a notification visible for your
> service.

Note that it is startForeground() as of Android 2.0.

You wouldn't typically use that for a boot-time, try-to-be-everlasting
service, though.

Having an activity starting and stopping a service, using
startForeground() and a Notification, is a truly delightful pattern.

I just cringe when developers try making services last forever,
particularly starting at boot. It is development anti-patterns like
everlasting services that cause all those industry pundits to say you
need to use task killers to have your Android devices run well.

As with many anti-patterns, there are spots for which everlasting
services are valid (e.g., VOIP client waiting on a socket for an
incoming call). But those are the exception, not the rule.

That's why I boo.

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

Android Consulting: http://commonsware.com/consulting

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Handling events from one service for multiple activities

2010-06-10 Thread takyon
I have a class A which extends TabActivity and creates Activities B, C
and D as tabs in its onCreate() function. Also, class A initializes
another service handler class S which is responsible for establishing
a connection to a service and implementing callback handlers for the
service. Any of the Activities B, C and D should be able to receive
events from the service and update accordingly. If I receive any event
in class S from the the service then I want to call a function in
Activity B which would be responsible to update the UI elements in
Activity B based on the event received. You can assume that the user
is in Activity B when the event arrives.

Can I call an activity function like the following in the stub handler
for the callback in my class S -

private Callback mEventListener = new OperationCallback.Stub()
{
   @Override
   public void handleOperationEvent(Payload payload)

   {
  B objB = new B();   // Is this valid? Since B is an activity.
  B.postEventToHandler(payload);  // postEventToHandler() is a
method inside B

   }
};


Let me know I am doing the right thing to achieve what I want. Also,
let me know if you need more clarification.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ListView no longer responding to select when checkbox added to row view

2010-06-10 Thread Mark Murphy
Connick wrote:
> I'm sure this is an obvious one but I'm at a loss. I'm using my own
> layout for list rows, all well and fine ...but the moment I add a
> checkbox view to the rows layout only the checkbox responds to user
> selection. I'd like for the checkbox to change state if the user taps
> anywhere within a given row. (as with android prefs)

http://stackoverflow.com/questions/1518338/setonitemclicklistener-not-working-on-custom-listview-android

Try setItemsCanFocus(false);, then use onListItemClick() in your
ListActivity (or setOnItemClickListener() for a standalone ListView) to
toggle your CheckBox state.

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

_Android Programming Tutorials_ Version 2.0 Available!

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


[android-developers] Re: ListView

2010-06-10 Thread Bob Kerns
Prepare to be stunned, I think.

I faced a similar issue with horizontal SeekBar's in a vertical
scrolling list. I went through a number of iterations trying to get
these to play nice.

What finally worked, I think would work here, too:

An onTouchEvent(MotionEvent) method that tracks how much it has moved
horizontally and vertically. Beyond a threshold, it goes into "scroll"
mode, and starts scrolling the parent ScrollView with
ScrollView.scrollBy(int, int).

I tried to manage the flow of events in various ways, to route the
events to the scroller. That turned out to be a lot harder than I
expected. This turned out to be quite easy.

The situation here will be slightly different in that you need to pass
the events down to the children. I think super.onTouchEvent(event)
will handle this for you,  but I've found there's a few things about
the event handling that I don't fully understand and can't readily
reverse-engineer from simple observations. I haven't read the code...



On Jun 10, 4:06 am, Mark Murphy  wrote:
> Sandy wrote:
> > Actually the link I was referring to was horizontalscrollview within a
> > scrollview (NOT a listview like i mentioned below). Here it is:
>
> >http://stackoverflow.com/questions/2646028/android-horizontalscrollvi...
>
> > This will not work for me because the functionality I desire to have
> > is a vertical ListView with 100 list items and the selected item will
> > have few buttons (around 10) which can be scrolled horizontally.
>
> I will be stunned if a HorizontalScrollView will work in a ListView row.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1
> Available!

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


[android-developers] Re: Determining available internal memory

2010-06-10 Thread Farhan
I just found one answer here:
http://stackoverflow.com/questions/2652935/android-internal-phone-storage

On Jun 10, 12:41 pm, Farhan  wrote:
> Hello,
>
> Is there an API to determine available internal memory?
>
> Thanks,
> Farhan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Using a ListView and an Adapter: How to use notifyDataSetChanged()?

2010-06-10 Thread Mariano Kamp
Anybody?
:-)

On Thursday, June 3, 2010, Mariano Kamp  wrote:
> Hi.
> Just watched Google IO's "World Of ListView" presentation [1]. Awesome stuff. 
> I think every Android dev should watch it.
> One gotcha for me was to use BaseAdapter.notifyDataSetChanged[2]. I checked 
> code that I have written more than a year ago and found that I did try to use 
> that, but commented it out with '// doesn't work' and I use requery() 
> instead. That is of course much slower.
>
> I now tried to find out why I wrote that it didn't work and hoped that I am 
> meanwhile so much wiser that it would be easier to understand the proper use 
> of the API. So much for ambition:  The effect I see is that the list is not 
> updated after I call notifyDataSetChanged(), but works with requery() and I 
> am not so much wiser ;-(
>
> What could be the issue here? I use a ResourceCursorAdapter and only 
> implemented the bindView() Method. This method is called when I call 
> notifyDataSetChanged() on the RCAdapter. However the method is called with a 
> cursor that contains the stale data.
>
> Now there was a second gotcha from the presentation that I couldn't really 
> place. It was said that the data should be committed on the GUI thread too 
> (before calling notifyDataSetChanged()). I couldn't place it then, but I now 
> suspect that this may be the issue here. So the rule would be to do the 
> commit() on the Cursor on the UI thread?
> I do the updates to the database using a Service. This Service runs in the 
> background, sometimes the app is in the foreground at the same time, but most 
> often not. So I don't see how I should commit something in a UI thread? Is 
> this the issue here? There are two different Cursors and I could only use 
> notifyDataSetChanged when it would be the same cursor, otherwise requery() is 
> correct?
>
> Is that it? Any ideas?
> Is somebody going to write a book "The Android SDK - The missing manual"? ;-)
> Cheers,Mariano
>
> [1] http://code.google.com/events/io/2010/sessions/world-of-listview-android.html[2]
>  
> http://developer.android.com/reference/android/widget/BaseAdapter.html#notifyDataSetChanged()
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Determining available internal memory

2010-06-10 Thread Farhan
Hello,

Is there an API to determine available internal memory?

Thanks,
Farhan

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


[android-developers] how can we set the background of button with bitmap image........which is cre

2010-06-10 Thread Dixit Wadhwani
-->  for bitmap image..this code is not working

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
  Button bt1= (Button) findViewById(R.id.idd1);
  Bitmap bitmap =
BitmapFactory.decodeStream(getResources().openRawResource(R.drawable.image1));
  Bitmap Bitmap1;
  Bitmap1= Bitmap.createBitmap(bitmap, 0,0 ,100,100);
  bt1.setImageBitmap(Bitmap1);

}
}


--> for simple image: this is working

   public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
  Button bt1= (Button) findViewById(R.id.idd1);
  bt1.setBackgroundResource(R.drawable.image1);

}
}





the first one code is not working please help me out

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Gmail app - part of system?

2010-06-10 Thread Cheryl Sedota
Is the gmail app part of the android "system", in that it is not able
to be updated without a system-wide update?  Or is it possible for the
gmail app to be periodically updated (thru market or some other
mechanism?) without upgrading the platform itself?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ListView no longer responding to select when checkbox added to row view

2010-06-10 Thread Connick
I'm sure this is an obvious one but I'm at a loss. I'm using my own layout
for list rows, all well and fine ...but the moment I add a checkbox view to
the rows layout only the checkbox responds to user selection. I'd like for
the checkbox to change state if the user taps anywhere within a given row.
(as with android prefs)

Any pointers appreciated!
Stace

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Service gets killed (due to activity ?)

2010-06-10 Thread keyeslabs
If you have a very good reason for doing so (one that you're willing
to defend to users and the likes of Mark) then you can force the
service to have the same priority as an activity use setForeground.
The caveat is that you must keep a notification visible for your
service.

On Jun 10, 11:00 am, Tejas  wrote:
> Hi,
>
> I have a service running in the background. It starts on device boot.
> Also, I have one activity (that appears in the task launcher) in which
> I have provided buttons to start and stop the service.
>
> Now, I install the application on the phone and I start the service
> using this activity (and not on-device boot). As expected the service
> starts and starts doing its designated task. I no-longer need the
> activity. So it goes out of sight and may not be required for a long
> time now.
>
> My question is, now, if the android platform kills this activity, will
> it kill my service too ? (This is because I see that after few hours,
> my service is not running anymore.). If this is true, then will the
> service continue running longer if the service was started on device
> boot.
>
> Regards,
> Tejas

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 test onCreate with saved Bundle?

2010-06-10 Thread Jeff
My app launches the camera to allow the user to capture a picture.
Sometimes this causes the OS will kill my App to free up memory for
the camera. Once the picture is taken, my app starts back up where it
left off using the Bundle I saved in onSaveInstanceState().

My app had a bug where in the code that restores the state. Is there
anyway that I can simulate or test this case to make sure I am
restoring correctly now? It seems I am having trouble making this
happen when I want to test it.

Thanks,
Jeff

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] StackOverflowError in UI redraw

2010-06-10 Thread Thierry Legras
Ok, i give up, I tried everything i could to reduce layers, but i am only as
few as 5 so far :(( Seems to me impossible to do less, see screenshot
showing my current layout
here

With 5 layers, my application crashes randomly apparently when i try to add
a background on top level layout. Even if i remove this background, i am not
sure it will not crash because of something else. I saw for instance that
getTabHost().setBackgroundColor(Color.BLACK) that i just tried in
TabActivity also engenders crashes.

My conclusion is that TabHost with activities-in-tabs is just too limited
and seeing this unpredictable behaviour i think we can consider this as a
bug.

The only valid long term solution for me is to change all my application to
views-in-tabs approach thought i will require me a lot of rework.

This huge limitation should be clearly stated in the documentation and
ApiDemos sample because it is something that really should be taken into
account before developping an application.

Thanks everybody who tried to help me on this subject.
Thierry.


2010/6/7 Mark Murphy 

> Thierry Legras wrote:
> > I am facing rare StackOverflowError in my application during UI redraw.
> > Does it mean memory is exhausted?
>
> It means that stack space is exhausted.
>
> > How can i fix this?
>
> Your UI probably has too many layers in its hierarchy. Run the
> hierarchyviewer program and examine the chart showing your ViewGroups
> and what they all contain. Try to eliminate some layers (e.g., replace
> nested LinearLayouts with a single RelativeLayout, get rid of
> activities-in-tabs and switch to views-in-tabs).
>
> > And finally how
> > can i be sure the issue will be definitevly fixed??
>
> My very rough rule of thumb:
>
> -- If your hierarchy has <10 layers, you should have no problem
> -- If your hierarchy has 10-14 layers, I get nervous
> -- If your hierarchy has >=15 layers, it's gonna blow up sometimes
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.0 Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Thierry.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unwanted state changes of CheckBoxes in ListView

2010-06-10 Thread Ken Hughes
I'm trying to do something similar, but I can't get my custom view
class to see the click events (I set breakpoints in the constructor
and I get to those) but I never hit breakpoints in the toggle() or
setChecked() methods.

Ken

On Jun 1, 6:48 pm, zealot  wrote:
> Hi,
>
> I've encountered same problem. Solution is:
>
> Define your resource like this:
> 
>class="your.owner.view"
>   xmlns:android="http://schemas.android.com/apk/res/android";
>   android:orientation="horizontal"
>   android:layout_width="fill_parent"
>   android:layout_height="wrap_content">
>  android:focusable="false"
> android:clickable="false"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:gravity="center_vertical"
> android:layout_marginRight="5dip"
> android:id="android:id/checkbox"
> android:layout_marginLeft="5dip"/>
>  android:id="@+id/person_name"
> android:text="test"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:gravity="center_vertical"
> android:textSize="18dip"
> android:layout_marginLeft="5dip"/>
> 
>
> Define your view class
> public class your.owner.view extends LinearLayout implements Checkable
> {
>// Add your constructors
>
> @Override
> public boolean isChecked() {
> // TODO Auto-generated method stub
> return this.checked;
> }
>
> @Override
> public void setChecked(boolean checked) {
> // TODO Auto-generated method stub
> getCheckBox().setChecked(checked);
> this.checked = checked;
> refreshDrawableState();
>
>// Append your event handler here
> }
>
> @Override
> public void toggle() {
> // TODO Auto-generated method stub
> //getCheckBox().setChecked(!checked);
> setChecked(!checked);
> }
>
> private CheckBox getCheckBox()
> {
>
> if (checkbox == null)
> {
> checkbox = (CheckBox) 
> findViewById(android.R.id.checkbox);
> //  checkbox.setFocusable(false);
> //  checkbox.setClickable(false); // The 
> check box
> should decline the click event, hence the list item could be clicked.
> }
> return checkbox;
> }
>
> private CheckBox checkbox;
> private boolean checked;
>
> }
>
> zealot
>
> On 5月28日, 下午7时58分, praneet pandit  wrote:
>
> > and the romain guy video you looking 
> > forhttp://code.google.com/events/io/2009/sessions/TurboChargeUiAndroidFa...
>
> > regards,
> > Ravi - The PPite
> > PathPartner Tech
>
> > On May 25, 9:15 am, Paul  wrote:
>
> > > This has to do with the fact that ListView recycles views.  View
> > > Romain Guy's Google I/O talk about ListView when it comes out.  It is
> > > really good and explains exactly why you're seeing this happen.
>
> > > On Apr 30, 10:20 am, David  wrote:
>
> > > > Hey,
>
> > > > I am facing a very mysterious Problem. I am using a ListView with
> > > > CheckBoxes that can be clicked to select people.
> > > > The row layout is the following:
>
> > > > 
> > > >  > > >   xmlns:android="http://schemas.android.com/apk/res/android";
> > > >   android:orientation="horizontal"
> > > >   android:layout_width="fill_parent"
> > > >   android:layout_height="wrap_content">
> > > >  > > > android:focusable="false"
> > > > android:onClick="onSelectPerson"
> > > > android:layout_width="wrap_content"
> > > > android:layout_height="wrap_content"
> > > > android:gravity="center_vertical"
> > > > android:layout_marginRight="5dip"
> > > > android:layout_marginLeft="5dip"/>
> > > >  > > > android:id="@+id/person_name"
> > > > android:text="test"
> > > > android:layout_width="wrap_content"
> > > > android:layout_height="wrap_content"
> > > > android:gravity="center_vertical"
> > > > android:textSize="18dip" 
> > > > android:layout_marginLeft="5dip"/>
> > > > 
>
> > > > As long as the amount of rows doesen't exceed the screen size (-> no
> > > > scrolling) everything works just fine.
> > > > But as soon as I have more rows then the screen size (-> some rows are
> > > > hidden and have to be scrolled to).
> > > > I have a very mysterious phenomenon:
>
> > > > If I check the top row and scroll down some of the previously hidden
> > > > rows are randomly checked too. If I scroll up again, again some of the
> > > > before hidden rows are randomly vhecked (theCheckBoxI clicked in
> > > > f

[android-developers] Re: APIs to access email accounts or SMS/MMS messages

2010-06-10 Thread curtis
I can understand why this functionality was removed, but it's really
frustrating that I wasted several hours looking for a "dead" api.
Unless I'm missing something, the android documentation doesn't even
list it as deprecated.

Anyways, I had some success by registering a ContentObserver to the
content://sms/ ContentProvider. Its not officially supported but it
works, and it's not that hard to monitor SMS messages as they are
received and sent without stepping on the functionality of the default
Messaging app.

On Jun 7, 7:10 pm, Mark Murphy  wrote:
> curtis wrote:
> > This tutorial is dead. The  android.provider.Telephony.SMS_RECEIVED
> > intent appears to have been removed sometime ago and it doesn't look
> > like its been replaced by anything comparable
>
> Correct, there is no way to receive SMS messages and stick to the SDK,
> unfortunately.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1
> Available!

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


[android-developers] Re: Possible to create an ACTION_MEDIA_BUTTON?

2010-06-10 Thread curtis
I'm pretty sure that

sendBroadcast(new Intent(android.content.Intent.ACTION_MEDIA_BUTTON));

will do it;

On Jun 9, 3:08 am, duncan  wrote:
> Hello,
>
> I apologize in advance, since I've only gotten started developing for
> Android, so I'm not particularly familiar with what's possible/
> feasible to do. I would like to create a service that can "send" an
> ACTION_MEDIA_BUTTON intent, so media players and the phone can be
> react as if the user pressed the actual media button. I'm basically
> trying to create an alternative for headsets that don't have any
> buttons, so you could answer calls or pause music by shaking the
> phone, for example.
>
> So, is it possible for a service to broadcast the ACTION_MEDIA_BUTTON
> intent? If not, is there another immediately obvious approach to
> solving this problem? I intend to become more familiar with the
> Android API over the coming weeks, but it would be nice to know sooner
> than later whether this problem is simple or infeasible.
>
> Thank you very much!
> -Duncan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Manulaly reset event on Android

2010-06-10 Thread ls02
This is similar how I implemented it originally. I though there must
be some original Java core object to implement such fundamental as
manually reset event.

On Jun 10, 2:01 pm, Bob Kerns  wrote:
> This is trivial to do with Java. (I say "trivial" in the sense of how
> simple the technique is. Knowing how to properly use ANY thread
> synchronization, even trivial ones, is hard...).
>
> Here's a rough sketch. It's been a long time since I've used the
> windows Event object, and I'm just typing in the Java off the top of
> my head. So take this rough explanation, not worked out code example,
> please.
>
> class WindowsEvent {
>   private boolean signaled = false;
>   public synchronized void signal() {
>     signaled = true;
>     notifyAll();  // I forget the Event behavior -- notify() might e
> correct instead?
>   }
>
>   public synchronized void reset() {
>     signaled = false;
>   }
>
>   public synchronized void waitOnEvent() {
>     while (! signaled) {
>       wait();
>       try {
>       } catch (InterruptedException ex) {
>       }
>     }
>   }
>
> }
>
> On Jun 10, 5:11 am, ls02  wrote:
>
> > I looked at both of them and I don't think either of them work as
> > manually reset event. Semaphore and lock ussualy have matching lock
> > and unlock called from the same thread, they do not provide way for
> > another thread to unlock the thread waiting on object. Basic Java
> > Object sync works fine but it does not seem to allow to manully reset
> > object state to signaled or non-signaled.
>
> > On Jun 10, 7:35 am, Mark Murphy  wrote:
>
> > > ls02 wrote:
> > > > Is there sync object on android similar to manually reset event on
> > > > Windows?
>
> > > > It must have signaled and non-signaled state both set manually. A
> > > > thread must be able to wait on it and wait would return immediately if
> > > > the object is in signaled state and block if it is in non signaled
> > > > state until another thread sets it to signaled state. There must be
> > > > way to reset the object back to non-signaled state.
>
> > > Off the cuff, that sounds like java.util.concurrent.Semaphore, or
> > > perhaps java.util.concurrent.locks.ReentrantLock.
>
> > > You might wish to take a look at _Java Concurrency in Practice_, as your
> > > questions have little to do with Android and everything to do with Java:
>
> > >http://amzn.to/baqNfl
>
> > > --
> > > 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: Manulaly reset event on Android

2010-06-10 Thread Bob Kerns
This is trivial to do with Java. (I say "trivial" in the sense of how
simple the technique is. Knowing how to properly use ANY thread
synchronization, even trivial ones, is hard...).

Here's a rough sketch. It's been a long time since I've used the
windows Event object, and I'm just typing in the Java off the top of
my head. So take this rough explanation, not worked out code example,
please.

class WindowsEvent {
  private boolean signaled = false;
  public synchronized void signal() {
signaled = true;
notifyAll();  // I forget the Event behavior -- notify() might e
correct instead?
  }

  public synchronized void reset() {
signaled = false;
  }

  public synchronized void waitOnEvent() {
while (! signaled) {
  wait();
  try {
  } catch (InterruptedException ex) {
  }
}
  }
}

On Jun 10, 5:11 am, ls02  wrote:
> I looked at both of them and I don't think either of them work as
> manually reset event. Semaphore and lock ussualy have matching lock
> and unlock called from the same thread, they do not provide way for
> another thread to unlock the thread waiting on object. Basic Java
> Object sync works fine but it does not seem to allow to manully reset
> object state to signaled or non-signaled.
>
> On Jun 10, 7:35 am, Mark Murphy  wrote:
>
>
>
> > ls02 wrote:
> > > Is there sync object on android similar to manually reset event on
> > > Windows?
>
> > > It must have signaled and non-signaled state both set manually. A
> > > thread must be able to wait on it and wait would return immediately if
> > > the object is in signaled state and block if it is in non signaled
> > > state until another thread sets it to signaled state. There must be
> > > way to reset the object back to non-signaled state.
>
> > Off the cuff, that sounds like java.util.concurrent.Semaphore, or
> > perhaps java.util.concurrent.locks.ReentrantLock.
>
> > You might wish to take a look at _Java Concurrency in Practice_, as your
> > questions have little to do with Android and everything to do with Java:
>
> >http://amzn.to/baqNfl
>
> > --
> > 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: Problem using adb push

2010-06-10 Thread Jiss
Nobody has an idea ? :/




On 10 juin, 02:06, Jiss  wrote:
> Hello everyone !
>
> I am trying to port PC/SC on my G1 in order to develop on a smartcard.
> I am using the SEEK for Android tutorial 
> (http://code.google.com/p/seek-for-android/wiki/UsingPCSC
> )
>
> But when I get to
>
> "
> Create required directories (/data/pcsc and /data/pcscd) on the device
> and copy pcscd and testpcsc to /data/pcsc
>
> $ adb shell mkdir /data/pcsc
> $ adb shell mkdir /data/pcscd
> $ adb push src/pcscd /data/pcsc
> $ adb push src/testpcscd /data/pcsc
>
> "
>
> I simply can't push pcscd and testpcsc to the /data/pcsc folder on the
> G1.
>
> I've tried many things as giving all the rights to the folders, or
> trying to copy them on an other place on the phone, but I simply
> can't. When I push on of them, the console just waits until I
> press CTRL + C to abort the operation, then the device is no longer
> recognized by the system, I have to unplug it, plug it and restart adb
> root.
>
> A thing that is very strange, is that I can push .txt files to /data/
> pcsc, but it seems I can't push executable files
>
> Can someone help me please ?
>
> Thanks
>
> Jiss

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: OutOfMemoryError

2010-06-10 Thread svebee
"if you had a png that was mostly white so compressed very well
you might have a 200KB png file that actually is using 6MB of RAM on
your device" - I didn't know it can use so much space :/

About 90% of images (in total application, about 60% of them (this one
1KB) are used per activity, so I would say approx. 50KB per activity)
are 1KB (or less), 5% are 10-60KB and 5% are 1-5KB so I think image
size isn't a problem.

So I'm pretty sure it's A) but how to solve it? And yes, I'm
constantly switching between two-three activities (and I disabled
rotation for some other reasons).

On Jun 10, 7:20 pm, Eric F  wrote:
> First you need to figure out what is taking up all the space in your
> memory as well as what is causing the OOM. Like is OOM caused when you
> switch between two activities over and over again? or if you rotate
> the phone over and over causing the activity to be re-created over and
> over. In which case you are probably leaking a context. Or are you
> running out of memory because you are loading just too many images? I
> don't think you've really given us enough information to help. If you
> use DDMS to inspect your heap, what's taking up all the space? If it's
> images, how big are the images? Remember in order for them to be drawn
> they need to be *uncompressed* into device's RAM. at say 24 bits per
> pixel, if you had a png that was mostly white so compressed very well
> you might have a 200KB png file that actually is using 6MB of RAM on
> your device. It's just too big, and you might not think about it
> because if you come from a desktop PC mindset it's just a 200KB png
> file in your mind. At this point I am guessing that either:
>
> A) you are leaking a context so the images aren't being recycled
> B) your images are too large uncompressed
>
> But without more information it's hard to be sure
>
> -E
>
> On Jun 10, 7:28 am, svebee  wrote:
>
> > hello, as I'm beginner in Android I have problem with memory - after
> > only 2-3 minutes I get Force Close and outOfMemory Error.
>
> > I have only onCreate (I know, stupid, but I didn't knew for anything
> > else as I started only few weeks ago) and inside I have...
>
> > @Override
> >  public void onCreate(Bundle savedInstanceState) {
> >   super.onCreate(savedInstanceState);
> >   setContentView(R.layout.main);
>
> >   many lines of code...manipulating with SQLite databases...
>
> > }
>
> > inside main XML layout I have many images, small, big (background) and
> > so on...How can I on every onCreate "delete" all content from memory
> > that was before in it - so when I open activity again, it deletes all
> > images and everything out and insert the new (old) one inside.
> > "Little" awkward but that's only thing I have on mind.
>
> > Also, inside "many lines of code" I don't declare any images!
>
> > Or simply, how can I "bypass" outOfMemoryError? Do I have to do
> > something like this?
>
> > �...@override
> >      public void onCreate(Bundle savedInstanceState) {
> >       super.onCreate(savedInstanceState);
>
> >         BitmapFactory.Options options=new BitmapFactory.Options();
> >         options.inSampleSize = 8;
> >         Bitmap buildingBitmap =
> > BitmapFactory.decodeResource(null,R.drawable.background,options);
>
> > if (buildingBitmap != null)
> >         {
> >         buildingBitmap.recycle();
> >         System.gc();
> >         buildingBitmap = null;
> >         }
>
> >       setContentView(R.layout.main);
>
> >       many lines of code...manipulating with SQLite databases...
>
> >     }
>
> > or...? Also on other activity is everything "the same" except I have
> > multiple overlays, how can I "erase" (recycle) them also? Thank you
> > for any help.
>
> > *currently, I'm not searching for fastest, most "correct" or better
> > solution, I just want something that it's not crashing all the time
>
>

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


[android-developers] Re: Anyone using the new facebook sdk for android?

2010-06-10 Thread pacoder
Yeah I just did an integration using it for an app and ran into
similar issues, it's very beta (although they do state that).

It works 'ok' but as you point it can cause crashes. I had some weird
issues on the login screen also, specifically the left
button next to 'connect' appears to somehow have two words over top of
each other making it unreadable.

Good news, we have the source, bad news  (at least for me), it's a
side project and I haven't had time to go dig into it yet.

Its also slow imo, it wants to load a lot of webviews from Facebook
and it just take longer then it should.

Sean Overby


On Jun 10, 12:40 pm, Mark Wyszomierski  wrote:
> Hi,
>
> Anyone try using the facebook sdk for android?:
>
>  http://github.com/facebook/facebook-android-sdk
>
> there are a few problems with it, most frustrating is that they're not
> managing the login dialog correctly - rotating the device will hide
> the dialog and leak it, sigh.
>
> I was going to repackage it with correct management, just wondering if
> anyone else has done it before I try. Also wondering if anyone has a
> decent way of contacting the fb developers about it so at least the
> patch could be reused, if I make it,
>
> Thanks

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


Re: [android-developers] Re: java.lang.OutOfMemoryError

2010-06-10 Thread Stephen Eilert
On Thu, Jun 10, 2010 at 8:18 AM, Bob Kerns  wrote:
> What I was trying to get at is that if you're relying on System.gc(),
> you're skating on the edge, memory-wise, tweaking the exact behavior
> of the GC.
>
> I didn't mean to suggest it's not helpful; I've followed with interest
> your reports of your experience. But I'd characterize calling
> System.gc() as an optimization hack, not a workaround for a system
> problem.
>
> By all means, do the extra GC. It can make the difference between a
> useful and useless app.
>
> I was really responding to Stephen's comment:
> "Is Dalvik such a crappy virtual machine that it can't be bothered to
> run the garbage collector before spitting out an OutOfMemory
> exception? "
>
> To which the answer is, "no, detects it when it runs the GC. But
> sometimes in special cases, an extra GC can free up memory that the
> first one couldn't".
>
> Could DalvicVM handle bitmaps better? Yes. But I wouldn't call it a
> "crappy VM", and it runs the GC before failing.
>

And that was the whole point. In fact, the posted algorithm could try
to get into a loop, running the GC and trying to load the bitmap
again, until it succeeded (not likely) or the VM crashed and it would
be equally misguided. I was specifically objecting to that hopeful GC
run in an OutOfMemory situation, before allocating a huge data
structure again, while in a possibly non-recoverable state.

Catching OutOfMemoryError allows one to at least try to cleanup before
death - it is not a plugin system for the garbage collector.

Now, an explicit GC *before* big allocations could help. This would at
the very least allow the VM to free memory (if any) before the fact.
I'd take it as a hint to the virtual machine.


-- Stephen

Sent from my Emacs

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: App disappears from the Market after upgrade

2010-06-10 Thread Yuvi
Just FYI, I checked for Torque visibility on:
- HTC Hero (Android 2.1) --> both versions visible
- HTC Magic (Android 2.1) --> both versions visible
- HTC Hero (Android 1.5) --> both versions NOT visible
- HTC Magic (Android 1.6) --> both versions NOT visible


YuviDroid

On Thu, Jun 10, 2010 at 6:58 PM, piemm...@googlemail.com <
piemm...@googlemail.com> wrote:

> Hi, thankyou, they are still displaying in 2.1+
>
> But unfortunately though they're no longer visible in android 1.6
> which is a fair chunk of market I'm missing!
>
> Ian
>
> On Jun 10, 8:20 am, Scott STEPHEN - Better Contacts
>  wrote:
> > Ian,
> >
> > Just to confirm, I do see your apps.
> > Milestone & Desire 2.1-update1.
> >
> > Scott
> >
> > On Jun 10, 9:00 am, "piemm...@googlemail.com"
> >
> >  wrote:
> > > Hi, the apps are both versions of Torque.
> >
> > > I have found the visibility problem however - someone has changed the
> > > market system to exclude apps with the Bluetooth permission for
> > > Android 1.6 devices.
> >
> > > This behaviour is in my opinion wrong, because I might have added
> > > support for bluetooth in my app (for 2.0+ devices) but it must also
> > > work in 1.5/1.6 as the 'bluetooth' option in my app may be simply
> > > grayed out (This is not in the case of Torque however).
> >
> > > Adding the uses bluetooth permission should not *now* hide the app
> > > from the market when the previous incarnation of the market allowed it
> > > to be visible, even if it was 'incorrect'. For 1.5/1.6 devices that
> > > permission simply should not matter at all.
> >
> > > This is almost a case for a kind of '' (I
> > > currently do not know if this exists or is coming, correct me if I am
> > > wrong) as I may have an app designed for ALL versions of android,
> > > where bluetooth is a nice feature, but is not a *required* feature and
> > > I may have coded for that scenario.
> >
> > > Anyway, it seems that:
> >
> > > 
> >
> > > now hides apps for 1.5/1.6 devices whereby before the market upgrade,
> > > it didn't. (This is now a problem for me)
> >
> > > Thanks
> >
> > > Ian.
> >
> > > On Jun 10, 7:19 am, Scott STEPHEN - Better Contacts
> >
> > >  wrote:
> > > > Ian,
> >
> > > > What apps ? I will test here from France.
> >
> > > > Scott
> >
> > > > On Jun 10, 8:09 am, "piemm...@googlemail.com"
> >
> > > >  wrote:
> > > > > Similar problems here,
> >
> > > > > Before google did the market 'fix' for 2.1/2.2,  2 of my apps
> (Torque)
> > > > > appeared correctly in the Android Market for Android1.6 and upward
> > > > > (The MyTouch 3G as an example), after the upgrade, they are no
> longer
> > > > > visible apart from on Android 2.x+ devices
> >
> > > > > Regards,
> >
> > > > > Ian
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
YuviDroid
http://android.yuvalsharon.net

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: OutOfMemoryError

2010-06-10 Thread Eric F
First you need to figure out what is taking up all the space in your
memory as well as what is causing the OOM. Like is OOM caused when you
switch between two activities over and over again? or if you rotate
the phone over and over causing the activity to be re-created over and
over. In which case you are probably leaking a context. Or are you
running out of memory because you are loading just too many images? I
don't think you've really given us enough information to help. If you
use DDMS to inspect your heap, what's taking up all the space? If it's
images, how big are the images? Remember in order for them to be drawn
they need to be *uncompressed* into device's RAM. at say 24 bits per
pixel, if you had a png that was mostly white so compressed very well
you might have a 200KB png file that actually is using 6MB of RAM on
your device. It's just too big, and you might not think about it
because if you come from a desktop PC mindset it's just a 200KB png
file in your mind. At this point I am guessing that either:

A) you are leaking a context so the images aren't being recycled
B) your images are too large uncompressed

But without more information it's hard to be sure

-E

On Jun 10, 7:28 am, svebee  wrote:
> hello, as I'm beginner in Android I have problem with memory - after
> only 2-3 minutes I get Force Close and outOfMemory Error.
>
> I have only onCreate (I know, stupid, but I didn't knew for anything
> else as I started only few weeks ago) and inside I have...
>
> @Override
>  public void onCreate(Bundle savedInstanceState) {
>   super.onCreate(savedInstanceState);
>   setContentView(R.layout.main);
>
>   many lines of code...manipulating with SQLite databases...
>
> }
>
> inside main XML layout I have many images, small, big (background) and
> so on...How can I on every onCreate "delete" all content from memory
> that was before in it - so when I open activity again, it deletes all
> images and everything out and insert the new (old) one inside.
> "Little" awkward but that's only thing I have on mind.
>
> Also, inside "many lines of code" I don't declare any images!
>
> Or simply, how can I "bypass" outOfMemoryError? Do I have to do
> something like this?
>
> �...@override
>      public void onCreate(Bundle savedInstanceState) {
>       super.onCreate(savedInstanceState);
>
>         BitmapFactory.Options options=new BitmapFactory.Options();
>         options.inSampleSize = 8;
>         Bitmap buildingBitmap =
> BitmapFactory.decodeResource(null,R.drawable.background,options);
>
> if (buildingBitmap != null)
>         {
>         buildingBitmap.recycle();
>         System.gc();
>         buildingBitmap = null;
>         }
>
>       setContentView(R.layout.main);
>
>       many lines of code...manipulating with SQLite databases...
>
>     }
>
> or...? Also on other activity is everything "the same" except I have
> multiple overlays, how can I "erase" (recycle) them also? Thank you
> for any help.
>
> *currently, I'm not searching for fastest, most "correct" or better
> solution, I just want something that it's not crashing all the time

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


[android-developers] requestFocus() doesn't bring up soft keyboard for edittext

2010-06-10 Thread Mike Topper
Hello all,

I have a BroadcastReceiver and in the onReceive method it does some
stuff and when its done it should change the focus to a specific
EditText field in the ui.  This all works just fine with
requestFocus() but it doesn't actually bring up the soft keyboard when
that edittext receives focus.  What would I need to do in order to
bring up the soft keyboard in this situation?

-Mike

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Google Maps API: Catching zoom and panning events

2010-06-10 Thread Raymond C. Rodgers



On 6/9/2010 7:13 PM, Steve Howard wrote:
On Tue, Jun 8, 2010 at 9:03 PM, Raymond Rodgers 
mailto:raym...@badlucksoft.com>> wrote:




On Tue, Jun 8, 2010 at 7:14 PM, Steve Howard mailto:ste...@android.com>> wrote:

A simple solution is to add an Overlay, override the draw()
method, and not actually do any drawing, but simply use the
method as a hook to know anytime the map has potentially moved
or zoomed.  The problem is, this will get called more often
than necessary, so you'll need some custom logic to decide
when the viewport has changed "enough" for you to make a new
query.  This shouldn't be too difficult however -- you can
track the current center and zoom in your Overlay subclass --
and you'd probably need some kind of logic like this anyway.

Let me know how that works for you, or if it works at all.

Steve


Thanks Steve, I eventually came to give that very method a try,
although I haven't yet decided on how to avoid the excessive
updating. I may try to find out when the user's fingers are no
longer on the touch screen or when the trackball (if present) is
no longer moved.


Yeah, you do have to do some work here, which is unfortunate.  There 
are several options, you may already be aware of them.  One is to use 
Overlay.onTouchEvent() to detect ACTION_UP events, which could help 
detect when touch gestures have finished.  Another is to use a timeout 
mechanism in draw() itself.  On each draw() call, you can have a 
Handler to send a message at a specified time in the near future, 
after canceling any other such previously requested messages.  When 
you get the message, you know the user's been idle for that short 
period of time.  android.view.GestureDetector uses this approach for 
long press detection, among other things -- check out lines 456-7, 
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/GestureDetector.java.
Thanks for the tip, I was thinking about the touch interface route so 
I'll look in that direction.

Raymond

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 disappears from the Market after upgrade

2010-06-10 Thread piemm...@googlemail.com
Hi, thankyou, they are still displaying in 2.1+

But unfortunately though they're no longer visible in android 1.6
which is a fair chunk of market I'm missing!

Ian

On Jun 10, 8:20 am, Scott STEPHEN - Better Contacts
 wrote:
> Ian,
>
> Just to confirm, I do see your apps.
> Milestone & Desire 2.1-update1.
>
> Scott
>
> On Jun 10, 9:00 am, "piemm...@googlemail.com"
>
>  wrote:
> > Hi, the apps are both versions of Torque.
>
> > I have found the visibility problem however - someone has changed the
> > market system to exclude apps with the Bluetooth permission for
> > Android 1.6 devices.
>
> > This behaviour is in my opinion wrong, because I might have added
> > support for bluetooth in my app (for 2.0+ devices) but it must also
> > work in 1.5/1.6 as the 'bluetooth' option in my app may be simply
> > grayed out (This is not in the case of Torque however).
>
> > Adding the uses bluetooth permission should not *now* hide the app
> > from the market when the previous incarnation of the market allowed it
> > to be visible, even if it was 'incorrect'. For 1.5/1.6 devices that
> > permission simply should not matter at all.
>
> > This is almost a case for a kind of '' (I
> > currently do not know if this exists or is coming, correct me if I am
> > wrong) as I may have an app designed for ALL versions of android,
> > where bluetooth is a nice feature, but is not a *required* feature and
> > I may have coded for that scenario.
>
> > Anyway, it seems that:
>
> > 
>
> > now hides apps for 1.5/1.6 devices whereby before the market upgrade,
> > it didn't. (This is now a problem for me)
>
> > Thanks
>
> > Ian.
>
> > On Jun 10, 7:19 am, Scott STEPHEN - Better Contacts
>
> >  wrote:
> > > Ian,
>
> > > What apps ? I will test here from France.
>
> > > Scott
>
> > > On Jun 10, 8:09 am, "piemm...@googlemail.com"
>
> > >  wrote:
> > > > Similar problems here,
>
> > > > Before google did the market 'fix' for 2.1/2.2,  2 of my apps (Torque)
> > > > appeared correctly in the Android Market for Android1.6 and upward
> > > > (The MyTouch 3G as an example), after the upgrade, they are no longer
> > > > visible apart from on Android 2.x+ devices
>
> > > > Regards,
>
> > > > Ian

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Uploading Adult apps.

2010-06-10 Thread Shane Isbell
Sean's right. MiKandi is the app store for Adult applications. MiKandi has a
lot of good traction and partnerships in the industry. It's a very new
industry so it's taking time to work with content providers to get
compelling and fun apps out there. But I can say I expect this industry to
break wide open by the end of the year, with some very cool apps well before
that.

MiKandi is also working on a Virtual Currency platform, so devs might want
to start thinking along these lines for selling in-app virtual goods.


On Thu, Jun 10, 2010 at 8:39 AM, TreKing  wrote:

> On Thu, Jun 10, 2010 at 9:23 AM, Sean Hodges 
> wrote:
>
>> I still suggest the OP seeks an adult material-friendly market instead of
>> relying on this approach though, or offers the APK as a direct download from
>> a website.
>>
>
> Definitely - I hope I did not imply that anyone *should* do this - was just
> pointing out what some people currently do, at their own risk.
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Shane Isbell (Founder of ZappMarket)
http://twitter.com/sisbell
http://twitter.com/zappstore
http://zappmarket.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] Oracle Android App Store

2010-06-10 Thread Leigh McRae
When I look at BlackBerry App World it lists over 200 countries which 
seems high but I know they support almost everywhere by now so perhaps 
it's correct.  I find it crazy that Canada isn't supported considering 
NAFTA.


I really don't think Google is all that interested in paid apps as they 
are in extending their ad network to handhelds.  You can't really blame 
them as it's their core business.


Also I suspect that Apple wouldn't have passed MS in market cap if the 
app store had the same return policy as the android market.


Leigh


On 6/10/2010 11:51 AM, gosh wrote:

Oracle Android App Store

Here's the countries that developers can currently sell from via
Android Market:
http://www.google.com/support/androidmarket/bin/answer.py?answer=150324

Here's the countries that Android Market offers free apps to:
http://www.google.com/support/androidmarket/bin/answer.py?hl=en&answer=138294

Here's the countries that Android Market sells to:
http://www.google.com/support/androidmarket/bin/answer.py?hl=en&answer=138294
(i.e. the 13 countries down the bottom of the same page)

These haven't changed much for a long time - e.g. 9 countries in that
first list haven't changed since September 2009.
(Googles Knows why its not the same 13 where users can buy from)

How does this compare with the other mobile OS vendors?

Apple's App Store currently works in 90 countries. In Feb'2010 they
added: Armenia, Botswana, Bulgaria, Jordan, Kenya, Macedonia,
Madagascar, Mali, Mauritius, Niger, Senegal, Tunisia, and Uganda  ...
i.e. they are going to run out of global map real soon now. Say what
you like about them, but they take paid apps seriously.
I.e. see:  
http://developer.apple.com/iphone/news/archives/2010/february/#newsprofile

Here's the 29 countries that Microsoft's Windows Phone Marketplace
developers can sell to (and upload from):

http://developer.windowsphone.com/help.aspx?id=fd9b5508-6436-4503-9174-45bf532b9dfd

...when the forthcoming Windows7 Phone hits the market later this
year.

What both Android app developers and global Android users need is
another substantial app store run by a globally recognised ICT entity
with a global presence (not carrier app stores such as Motorola's), an
International commitment, and that uses more conventional payment
methods (PayPal/ the standard Credit Cards). It will happen eventually
given the gapping great gap in the Android Market service roll-out all
this time. I'd lay odds on Oracle setting up an Android App Store that
uses PayPal, which seems an odd possibility at first, but then when
you think about it more seriously, it makes commercial sense from a
lot of different angles:
- Sun had a Java Store that used PayPal.
- They now control Java.
- They like making money from software.
- As Google moves to Web apps within the forthcoming Web Store, Oracle
could befriend Android developers (via global distribution) and
gradually try to move them towards JavaFX apps (whatever plans they
have for that).
- In building such an app store it could showcase their existing
Oracle Store product for building such things.
- They could entice Android app developers to develop 'services' for
their own apps on their own MySQL/Oracle DBMS servers (supplied by
Oracle), or via an Oracle cloud.

Any votes for an Oracle Android App Store?
Any votes for a Yahoo! Android App Store?
  or
What other major ICT/media company could pull off such a marketing
coup?

   


--
Leigh McRae
www.lonedwarfgames.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] Anyone using the new facebook sdk for android?

2010-06-10 Thread Mark Wyszomierski
Hi,

Anyone try using the facebook sdk for android?:

  http://github.com/facebook/facebook-android-sdk

there are a few problems with it, most frustrating is that they're not
managing the login dialog correctly - rotating the device will hide
the dialog and leak it, sigh.

I was going to repackage it with correct management, just wondering if
anyone else has done it before I try. Also wondering if anyone has a
decent way of contacting the fb developers about it so at least the
patch could be reused, if I make it,

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] Oracle Android App Store

2010-06-10 Thread gosh
Oracle Android App Store

Here's the countries that developers can currently sell from via
Android Market:
http://www.google.com/support/androidmarket/bin/answer.py?answer=150324

Here's the countries that Android Market offers free apps to:
http://www.google.com/support/androidmarket/bin/answer.py?hl=en&answer=138294

Here's the countries that Android Market sells to:
http://www.google.com/support/androidmarket/bin/answer.py?hl=en&answer=138294
(i.e. the 13 countries down the bottom of the same page)

These haven't changed much for a long time - e.g. 9 countries in that
first list haven't changed since September 2009.
(Googles Knows why its not the same 13 where users can buy from)

How does this compare with the other mobile OS vendors?

Apple's App Store currently works in 90 countries. In Feb'2010 they
added: Armenia, Botswana, Bulgaria, Jordan, Kenya, Macedonia,
Madagascar, Mali, Mauritius, Niger, Senegal, Tunisia, and Uganda  ...
i.e. they are going to run out of global map real soon now. Say what
you like about them, but they take paid apps seriously.
I.e. see:  
http://developer.apple.com/iphone/news/archives/2010/february/#newsprofile

Here's the 29 countries that Microsoft's Windows Phone Marketplace
developers can sell to (and upload from):

http://developer.windowsphone.com/help.aspx?id=fd9b5508-6436-4503-9174-45bf532b9dfd

...when the forthcoming Windows7 Phone hits the market later this
year.

What both Android app developers and global Android users need is
another substantial app store run by a globally recognised ICT entity
with a global presence (not carrier app stores such as Motorola's), an
International commitment, and that uses more conventional payment
methods (PayPal/ the standard Credit Cards). It will happen eventually
given the gapping great gap in the Android Market service roll-out all
this time. I'd lay odds on Oracle setting up an Android App Store that
uses PayPal, which seems an odd possibility at first, but then when
you think about it more seriously, it makes commercial sense from a
lot of different angles:
- Sun had a Java Store that used PayPal.
- They now control Java.
- They like making money from software.
- As Google moves to Web apps within the forthcoming Web Store, Oracle
could befriend Android developers (via global distribution) and
gradually try to move them towards JavaFX apps (whatever plans they
have for that).
- In building such an app store it could showcase their existing
Oracle Store product for building such things.
- They could entice Android app developers to develop 'services' for
their own apps on their own MySQL/Oracle DBMS servers (supplied by
Oracle), or via an Oracle cloud.

Any votes for an Oracle Android App Store?
Any votes for a Yahoo! Android App Store?
 or
What other major ICT/media company could pull off such a marketing
coup?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Making broadcast receiver post of UI/main thread

2010-06-10 Thread Mark Murphy
Andreas Agvard wrote:
> Are we guaranteed that Application.onCreate() runs in the UI/main
> thread? 

Yes.

> When I receive a broadcast I want to post a message onto the UI/main
> thread.

You are on the UI/main thread already. Pretty much all callbacks from
Android to your code will be on the UI/main thread.

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

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

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


Re: [android-developers] Uploading Adult apps.

2010-06-10 Thread TreKing
On Thu, Jun 10, 2010 at 9:23 AM, Sean Hodges wrote:

> I still suggest the OP seeks an adult material-friendly market instead of
> relying on this approach though, or offers the APK as a direct download from
> a website.
>

Definitely - I hope I did not imply that anyone *should* do this - was just
pointing out what some people currently do, at their own risk.

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: WebView not loading enough JavaScript that the full Android Browser can.

2010-06-10 Thread theSealPortalTeam
Does anyone have a clue what might be going on?

On Jun 8, 11:26 am, theSealPortalTeam 
wrote:
> Context: I'm creating an application that allows the back office
> system to access android information and vica-verca. However the
> backoffice system contains huge amounts of javascript that need to be
> loaded. Because the backoffice is a 'backoffice' I can't give just
> anyone access. So I decided to use the FireBug Lite as testing, its a
> considerable amount of JavaScript and the same effect occurs.
>
> Problem: The Andorid Browser loads the FireBug Lite from the 
> pagehttp://kscserver.com/main-leap-slim.htmlbut my application's WebView
> does not display the lite bug. In both the Test Maps, work. They both
> appear to create the pop up for viewing a map without a problem. The
> map is considerable a smaller file. Just in case your wondering, the
> FireBug Lite works and is fully functional in the Android Browser.
>
> Theory: I'm assuming somewhere the browser has a higher priority of
> something than my application is set. Maybe it has better access to
> load JavaScript in memory, I don't know. All I know is that the
> JavaScript of my webview is enabled but I can't get it to load the
> complicated JavaScript objects that the Browser is loading.
>
> Additional Info: I've posted a StackOverflow Question that contains a
> screen shot and a good recent version of my source 
> code,http://stackoverflow.com/questions/2968936/android-webview-not-loadin
> Any help you can give me with be to help me diagnose this problem will
> be greatly appreciated.
>
> Thank you, TSPT.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Calculating jitter and dropped packets

2010-06-10 Thread PrajakataChaudhari
Dear All:


I need to calculate network stats for streaming video : jitter and
dropped packets. Is there any way i can calculate the parameters for
the mediaplayer or the videoView class.

Any help will be highly appreciated.

Thank you,
Prajakta

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Uploading Adult apps.

2010-06-10 Thread Sean Hodges
Quite the contrary, I gave one example in an earlier post to this thread.

I believe these app markets are relatively new, which is one of the
main reasons they have had little exposure.

Anyway, as Fred suggested this discussion would probably be more
suited on the discuss list.


On Thu, Jun 10, 2010 at 4:06 PM, John T. Haggerty  wrote:
> Ive heard rumors of things like that however never seen anything proving
> this even with exploratory web searches.one would assume they are very much
> unadvertised
>
> On Jun 10, 2010 8:24 AM, "Sean Hodges"  wrote:
>> On Thu, Jun 10, 2010 at 3:08 PM, TreKing  wrote:
>>> On Thu, Jun 10, 2010 at 4:15 AM, Sean
>>> Hodges  wrote:

 I don't think you can upload it to the Android Market,
>>>
>>> Well, you *can*, as evidenced by the plethora of adult apps already on
>>> the
>>> Market.
>>> You just risk being pulled for violating the TOS.
>>
>> This is true, I should have been more clear. There is a difference
>> between being allowed to upload it, and being physically able to do
>> it.
>>
>> I would argue that the Android Market is policed: I have heard of a
>> fair number of occasions, both on and off the mailing lists, where
>> people have had their apps pulled due to violating the TOS (usually
>> without a proper explanation from Google). However, as TreKing points
>> out, it is not foolproof so you might get away with it for a while.
>>
>> I still suggest the OP seeks an adult material-friendly market instead
>> of relying on this approach though, or offers the APK as a direct
>> download from a website.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: How to listen on socket port 80?

2010-06-10 Thread mah
Socket ports below 1024 require the ROOT user id in order to establish
a server. If you're building an application intended to go on random
devices, you're not going to have any success opening a server on port
80. This is not an Android constraint, it's the way sockets have been
in *nix for a very long time (if not always). It's a security issue to
prevent malicious applications from spoofing a service on a machine
that doesn't already provide the service.


On Jun 4, 1:32 am, Alex Xin  wrote:
> Hi, guys
>
> I'm new to Android development, now I'm working on a simple HTTP server
> project. I  try to use ServerSocket to listen on port 80 but I failed. There
> will have an exception if I did this. I have already set INTERNET premission
> in manifest.
>
> I found that everything is Okay if I use port 8080, that's strange for me,
> why I cannot use port 80? I don't want my users to use another port to
> connect  my server.
>
> Thanks very much
>
> Alex

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Making broadcast receiver post of UI/main thread

2010-06-10 Thread Andreas Agvard
Are we guaranteed that Application.onCreate() runs in the UI/main
thread? I want to assume so but I can't find any information to make
me 100 % sure.

When I receive a broadcast I want to post a message onto the UI/main
thread. Currently I've added a function in my Application class to
return a handler (created in it's onCreate), is this a good solution?
If not, what would be a better solution?

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


[android-developers] Re: Service gets killed (due to activity ?)

2010-06-10 Thread Tejas
Thanks for Bo-ing me Mark. With every booo, I learn something ! :)

On Jun 10, 11:17 am, Mark Murphy  wrote:
> Tejas wrote:
> > I have a service running in the background. It starts on device boot.
>
> Boo!
>
> http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-a...
>
> > My question is, now, if the android platform kills this activity, will
> > it kill my service too ?
>
> When your activity is destroyed, if you used startService(), the service
> will continue running. However, there is no guarantee that the service
> will run forever.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 2.2 Programming 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: TaskAffinity causes new instance being created when startActivity

2010-06-10 Thread James Wang
Dianne, You are right.
We did want to make an activity like launcher.

In fact, our product is more complicated than what I said above.

Below is the real plan:
1)We made an activity as the launcher L;
2)A tells L to start B;
3)B does something and tells L starts A again.

L,A,B have the same taskAffinity. And L starts B and A with NEW_TASK.

BTW, I noticed such words in SDK reference:
"Similarly, a new instance of a "singleTop" activity may also be
created to handle a new intent. However, if the target task already
has an existing instance of the activity at the top of its stack, that
instance will receive the new intent (in an onNewIntent() call); a new
instance is not created. In other circumstances — for example, if an
existing instance of the "singleTop" activity is in the target task,
but not at the top of the stack, or if it's at the top of a stack, but
not in the target task — a new instance would be created and pushed on
the stack."

It says if A is singleTop, A gets created twice is supposed to be true
because A is not on the top of task.
But we did not set A as singleTop.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Service gets killed (due to activity ?)

2010-06-10 Thread Mark Murphy
Tejas wrote:
> I have a service running in the background. It starts on device boot.

Boo!

http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/

> My question is, now, if the android platform kills this activity, will
> it kill my service too ?

When your activity is destroyed, if you used startService(), the service
will continue running. However, there is no guarantee that the service
will run forever.

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

Android 2.2 Programming 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


Re: [android-developers] Uploading Adult apps.

2010-06-10 Thread John T. Haggerty
Ive heard rumors of things like that however never seen anything proving
this even with exploratory web searches.one would assume they are very much
unadvertised

On Jun 10, 2010 8:24 AM, "Sean Hodges"  wrote:
> On Thu, Jun 10, 2010 at 3:08 PM, TreKing  wrote:
>> On Thu, Jun 10, 2010 at 4:15 AM, Sean
>> Hodges  wrote:
>>>
>>> I don't think you can upload it to the Android Market,
>>
>> Well, you *can*, as evidenced by the plethora of adult apps already on
the
>> Market.
>> You just risk being pulled for violating the TOS.
>
> This is true, I should have been more clear. There is a difference
> between being allowed to upload it, and being physically able to do
> it.
>
> I would argue that the Android Market is policed: I have heard of a
> fair number of occasions, both on and off the mailing lists, where
> people have had their apps pulled due to violating the TOS (usually
> without a proper explanation from Google). However, as TreKing points
> out, it is not foolproof so you might get away with it for a while.
>
> I still suggest the OP seeks an adult material-friendly market instead
> of relying on this approach though, or offers the APK as a direct
> download from a website.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Service gets killed (due to activity ?)

2010-06-10 Thread Tejas
Hi,

I have a service running in the background. It starts on device boot.
Also, I have one activity (that appears in the task launcher) in which
I have provided buttons to start and stop the service.

Now, I install the application on the phone and I start the service
using this activity (and not on-device boot). As expected the service
starts and starts doing its designated task. I no-longer need the
activity. So it goes out of sight and may not be required for a long
time now.

My question is, now, if the android platform kills this activity, will
it kill my service too ? (This is because I see that after few hours,
my service is not running anymore.). If this is true, then will the
service continue running longer if the service was started on device
boot.

Regards,
Tejas

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Uploading Adult apps.

2010-06-10 Thread Fred Grott(Android Expert, http://mobilebytes.wordpress.com)
ask on the discuss list, I forget the chaps name but he just started
such a market about 6 months ago he follows that list so you should
have your answer shortly after posting



On Jun 10, 9:23 am, Sean Hodges  wrote:
> On Thu, Jun 10, 2010 at 3:08 PM, TreKing  wrote:
> > On Thu, Jun 10, 2010 at 4:15 AM, Sean
> > Hodges  wrote:
>
> >> I don't think you can upload it to the Android Market,
>
> > Well, you *can*, as evidenced by the plethora of adult apps already on the
> > Market.
> > You just risk being pulled for violating the TOS.
>
> This is true, I should have been more clear. There is a difference
> between being allowed to upload it, and being physically able to do
> it.
>
> I would argue that the Android Market is policed: I have heard of a
> fair number of occasions, both on and off the mailing lists, where
> people have had their apps pulled due to violating the TOS (usually
> without a proper explanation from Google). However, as TreKing points
> out, it is not foolproof so you might get away with it for a while.
>
> I still suggest the OP seeks an adult material-friendly market instead
> of relying on this approach though, or offers the APK as a direct
> download from a website.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] OutOfMemoryError

2010-06-10 Thread Adrian Vintu
What does logcat say?

see
http://developer.android.com/intl/de/guide/developing/tools/adb.html
and
http://www.adrianvintu.com/blogengine/post/Colored-Logcat-Script-for-Windows.aspx
if you don't know what logcat is.

BR,
Adrian Vintu
http://www.adrianvintu.com


On Thu, Jun 10, 2010 at 4:28 PM, svebee  wrote:

> hello, as I'm beginner in Android I have problem with memory - after
> only 2-3 minutes I get Force Close and outOfMemory Error.
>
> I have only onCreate (I know, stupid, but I didn't knew for anything
> else as I started only few weeks ago) and inside I have...
>
> @Override
>  public void onCreate(Bundle savedInstanceState) {
>  super.onCreate(savedInstanceState);
>  setContentView(R.layout.main);
>
>  many lines of code...manipulating with SQLite databases...
>
> }
>
> inside main XML layout I have many images, small, big (background) and
> so on...How can I on every onCreate "delete" all content from memory
> that was before in it - so when I open activity again, it deletes all
> images and everything out and insert the new (old) one inside.
> "Little" awkward but that's only thing I have on mind.
>
> Also, inside "many lines of code" I don't declare any images!
>
> Or simply, how can I "bypass" outOfMemoryError? Do I have to do
> something like this?
>
>  @Override
> public void onCreate(Bundle savedInstanceState) {
>  super.onCreate(savedInstanceState);
>
>BitmapFactory.Options options=new BitmapFactory.Options();
>options.inSampleSize = 8;
>Bitmap buildingBitmap =
> BitmapFactory.decodeResource(null,R.drawable.background,options);
>
> if (buildingBitmap != null)
>{
>buildingBitmap.recycle();
>System.gc();
>buildingBitmap = null;
>}
>
>  setContentView(R.layout.main);
>
>  many lines of code...manipulating with SQLite databases...
>
>}
>
> or...? Also on other activity is everything "the same" except I have
> multiple overlays, how can I "erase" (recycle) them also? Thank you
> for any help.
>
> *currently, I'm not searching for fastest, most "correct" or better
> solution, I just want something that it's not crashing all the time
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] OutOfMemoryError

2010-06-10 Thread svebee
hello, as I'm beginner in Android I have problem with memory - after
only 2-3 minutes I get Force Close and outOfMemory Error.

I have only onCreate (I know, stupid, but I didn't knew for anything
else as I started only few weeks ago) and inside I have...

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

  many lines of code...manipulating with SQLite databases...

}

inside main XML layout I have many images, small, big (background) and
so on...How can I on every onCreate "delete" all content from memory
that was before in it - so when I open activity again, it deletes all
images and everything out and insert the new (old) one inside.
"Little" awkward but that's only thing I have on mind.

Also, inside "many lines of code" I don't declare any images!

Or simply, how can I "bypass" outOfMemoryError? Do I have to do
something like this?

 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

BitmapFactory.Options options=new BitmapFactory.Options();
options.inSampleSize = 8;
Bitmap buildingBitmap =
BitmapFactory.decodeResource(null,R.drawable.background,options);

if (buildingBitmap != null)
{
buildingBitmap.recycle();
System.gc();
buildingBitmap = null;
}

  setContentView(R.layout.main);

  many lines of code...manipulating with SQLite databases...

}

or...? Also on other activity is everything "the same" except I have
multiple overlays, how can I "erase" (recycle) them also? Thank you
for any help.

*currently, I'm not searching for fastest, most "correct" or better
solution, I just want something that it's not crashing all the time

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


Re: [android-developers] Uploading Adult apps.

2010-06-10 Thread Sean Hodges
On Thu, Jun 10, 2010 at 3:08 PM, TreKing  wrote:
> On Thu, Jun 10, 2010 at 4:15 AM, Sean
> Hodges  wrote:
>>
>> I don't think you can upload it to the Android Market,
>
> Well, you *can*, as evidenced by the plethora of adult apps already on the
> Market.
> You just risk being pulled for violating the TOS.

This is true, I should have been more clear. There is a difference
between being allowed to upload it, and being physically able to do
it.

I would argue that the Android Market is policed: I have heard of a
fair number of occasions, both on and off the mailing lists, where
people have had their apps pulled due to violating the TOS (usually
without a proper explanation from Google). However, as TreKing points
out, it is not foolproof so you might get away with it for a while.

I still suggest the OP seeks an adult material-friendly market instead
of relying on this approach though, or offers the APK as a direct
download from a website.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 global is the app market?

2010-06-10 Thread Alex Xin
All connections to google.cn now forward to google.com.hk


On Thu, Jun 10, 2010 at 10:19 PM, Alex Xin  wrote:

> Ok, Google has decided to close their local website http://www.google.cn/due 
> to the Internet censorship in China. You could still use google global
> service site like google.com or gmail.com. But if you try to search some
> keywords within China you'll find that google.com cannot access for some
> minutes.
>
> Do you know that http://developer.android.com/ is completely blocked in
> China? So our Chinese developer couldn't update our SDK using the normal
> ways
>
> It's Google's official announcement for this, by David Drummond, SVP,
> Corporate Development and Chief Legal Officer
> http://www.google.com/press/new-approach-to-china/update.html
>
> FYI
>
>
> On Thu, Jun 10, 2010 at 8:27 PM, Kaj Bjurman wrote:
>
>> What do you mean when you say that google closed their site. What
>> site?
>>
>> I used gmail, google search and google reader when I visited China
>> last month (and I didn't use a proxy)
>>
>>
>> On 10 Juni, 13:12, Alex Xin  wrote:
>> > First of all, I'm a Chinese adn I want to tell you guys the truth about
>> this
>> > fast growing market. I know that most of android powered phones sells in
>> > this market has no google market pre-installed in their device. In my
>> Lenovo
>> > LePhone, which is a Android 1.6 based system, even has no google search
>> > built-in but with a baidu search instead. You may ask why, see Google's
>> > statement in the previous months, they have already closed their website
>> in
>> > China. That's why we cannot see google market in some of phones.
>> >
>> > There's too many “illegal phones" in China, I mean, they'r all smuggled
>> to
>> > China. So some of Chines users could see google market in those phones
>> and
>> > of course, buy apps there.
>> >
>> >
>> >
>> > On Thu, Jun 10, 2010 at 6:18 PM, Kaj Bjurman 
>> wrote:
>> > > I don't know why, where or how, but I know that my free Android app,
>> > > that I only have published on Android market has Chinese users, so
>> > > they must be able to see my app.
>> >
>> > > On 9 Juni, 20:27, Neilz  wrote:
>> > > > Hi. I'm UK based and I'm wondering how much of the world can see and
>> > > > download my apps from the market?
>> >
>> > > > For example, the chinese market, which I believe is quite large, can
>> > > > they see UK or US based apps? Or does some kind of specific
>> > > > translation need to be done for this to happen? Or is it a separate
>> > > > market place?
>> >
>> > > > 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> 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
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 global is the app market?

2010-06-10 Thread Alex Xin
Ok, Google has decided to close their local website
http://www.google.cn/due to the Internet censorship in China. You
could still use google global
service site like google.com or gmail.com. But if you try to search some
keywords within China you'll find that google.com cannot access for some
minutes.

Do you know that http://developer.android.com/ is completely blocked in
China? So our Chinese developer couldn't update our SDK using the normal
ways

It's Google's official announcement for this, by David Drummond, SVP,
Corporate Development and Chief Legal Officer
http://www.google.com/press/new-approach-to-china/update.html

FYI


On Thu, Jun 10, 2010 at 8:27 PM, Kaj Bjurman  wrote:

> What do you mean when you say that google closed their site. What
> site?
>
> I used gmail, google search and google reader when I visited China
> last month (and I didn't use a proxy)
>
>
> On 10 Juni, 13:12, Alex Xin  wrote:
> > First of all, I'm a Chinese adn I want to tell you guys the truth about
> this
> > fast growing market. I know that most of android powered phones sells in
> > this market has no google market pre-installed in their device. In my
> Lenovo
> > LePhone, which is a Android 1.6 based system, even has no google search
> > built-in but with a baidu search instead. You may ask why, see Google's
> > statement in the previous months, they have already closed their website
> in
> > China. That's why we cannot see google market in some of phones.
> >
> > There's too many “illegal phones" in China, I mean, they'r all smuggled
> to
> > China. So some of Chines users could see google market in those phones
> and
> > of course, buy apps there.
> >
> >
> >
> > On Thu, Jun 10, 2010 at 6:18 PM, Kaj Bjurman 
> wrote:
> > > I don't know why, where or how, but I know that my free Android app,
> > > that I only have published on Android market has Chinese users, so
> > > they must be able to see my app.
> >
> > > On 9 Juni, 20:27, Neilz  wrote:
> > > > Hi. I'm UK based and I'm wondering how much of the world can see and
> > > > download my apps from the market?
> >
> > > > For example, the chinese market, which I believe is quite large, can
> > > > they see UK or US based apps? Or does some kind of specific
> > > > translation need to be done for this to happen? Or is it a separate
> > > > market place?
> >
> > > > 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 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
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Uploading Adult apps.

2010-06-10 Thread TreKing
On Thu, Jun 10, 2010 at 2:33 AM, Zaid  wrote:

> how do people manage to upload adult apps?


They do it anyway, since no one really polices the Market.

On Thu, Jun 10, 2010 at 4:15 AM, Sean Hodges 
 wrote:

> I don't think you can upload it to the Android Market,


Well, you *can*, as evidenced by the plethora of adult apps already on the
Market.
You just risk being pulled for violating the TOS.

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Scrollable widgets in alternative Home applications.

2010-06-10 Thread James Morrissey
Is there any more ongoing discussion about this?  I've been highly
interested in this ever since I got a HTC Hero back in July last year
and noticed that HTC had custom scrollable widgets.

Francois, I've also purchased your calendar and messenger widgets and
for a short time I was using the scrollable messenger widget with Home+
+, however I've stopped using Home++ as I've found LauncherPro to be a
much better alternative.

I'm quite interested in developing my own scrollable widgets, so if an
API is created and used in some of the more prominent launchers (ie.
the ones you listed) then that would be fantastic!


Cheers,
James


On May 31, 10:00 pm, Koxx  wrote:
> Hi devs,
>
> Many people would like to see scrollable widgets on their Home.
> As you may know, current Android stock Home doesn't support it, and
> HTC Sense doesn't provide any API.
>
> We propose to create an open source standard for an Home extension
> code allowing devs to create 3rd party widgets which support scrolling
> (list view).
>
> The principe have been implemented, and succesfully tested in Home++
> and Pure messenger widget.
>
> Now, after discussing with other Home creators, we'd like to
> generalize this and include it in other Home applications.
> Few other Home applications devs are already integrating the Home++
> code to evaluate this (FreedHome, Tag Home and HelixLauncher 1).
>
> Here is the list of interested parteners:
> - Helix Launcher
> - FreedHome
> - Tag Home
> - ADW Launcher
> - LauncherPro beta
> - GDE
>
> During this first phase we'd like to focus on scrollable widgets but
> other extensions could be imagined (animations, gestures ...)
>
> Please devs, join us to discuss this and create a new standard for
> alternative Home.
>
> If Google wants to use it for the next Android release, we would be
> very happy, but for now, the goal is to include it in a large number
> of alternative Home applications.
>
> Thanks,
> Francois DESLANDES (creator of Pure widgets)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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   >