Re: [android-developers] Re: Push Notification

2009-11-11 Thread tauntz
That one is tricky - Android does not support something like the
PushRegistry in J2ME-land. Also there's no support for listening only
to one specific port and there's also no way to get the destination
port of the SMS via a public API(it's there but @hidden for some
reason..) so you'd have to parse the PDU and get the port from there
manually. That being said, you can listen to all SMS messages, parse
the PDU of each incoming message and see if the destination port
matches the one that you are expecting. But so can other apps.. so
there's no way to ensure that just one specific app gets to know about
an incoming SMS to a specific port.

Related feature requests:
http://code.google.com/p/android/issues/detail?id=3826
http://code.google.com/p/android/issues/detail?id=3825

(To be honest, I guess somebody inside Google is already working on a
better push solution (eg automate the SMS port thingie and provide a
clean interface for apps to use) - but that's just speculation
and if it's true, we'll find out about it a week before the devices
with that start to ship.. )

Tauno

On Tue, Nov 10, 2009 at 4:29 PM, zero  wrote:
> port sms maybe ?
>
> On Nov 10, 2:14 pm, "Mark Murphy"  wrote:
>> > If two or more applications are installed on the  phone and those are
>> > using broadcast receiver to listen and some message comes .Now in case
>> > of push notification how can we distinguish the incoming message is
>> > for which application?
>>
>> What exactly are you considering a "push notification" with respect to
>> Android?
>>
>> --
>> Mark Murphy (a Commons Guy)http://commonsware.com
>> Android App Developer Books:http://commonsware.com/books.html
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2009-11-11 Thread tauntz
This has maybe changed then at some point - last time I tried the same
filter, I still received all SMS messages that came to other ports
also.

Tauno

On Wed, Nov 11, 2009 at 1:27 PM, armand dos santos
 wrote:
> It seems to me that by doing something like this:
>
> 
>  
>  
>  
>  
> 
>
> your application is only notified when a sms is received on the port .
>
> Armand
>
> On Wed, Nov 11, 2009 at 9:34 AM, tauntz  wrote:
>>
>> That one is tricky - Android does not support something like the
>> PushRegistry in J2ME-land. Also there's no support for listening only
>> to one specific port and there's also no way to get the destination
>> port of the SMS via a public API(it's there but @hidden for some
>> reason..) so you'd have to parse the PDU and get the port from there
>> manually. That being said, you can listen to all SMS messages, parse
>> the PDU of each incoming message and see if the destination port
>> matches the one that you are expecting. But so can other apps.. so
>> there's no way to ensure that just one specific app gets to know about
>> an incoming SMS to a specific port.
>>
>> Related feature requests:
>> http://code.google.com/p/android/issues/detail?id=3826
>> http://code.google.com/p/android/issues/detail?id=3825
>>
>> (To be honest, I guess somebody inside Google is already working on a
>> better push solution (eg automate the SMS port thingie and provide a
>> clean interface for apps to use) - but that's just speculation
>> and if it's true, we'll find out about it a week before the devices
>> with that start to ship.. )
>>
>> Tauno
>>
>> On Tue, Nov 10, 2009 at 4:29 PM, zero  wrote:
>> > port sms maybe ?
>> >
>> > On Nov 10, 2:14 pm, "Mark Murphy"  wrote:
>> >> > If two or more applications are installed on the  phone and those are
>> >> > using broadcast receiver to listen and some message comes .Now in
>> >> > case
>> >> > of push notification how can we distinguish the incoming message is
>> >> > for which application?
>> >>
>> >> What exactly are you considering a "push notification" with respect to
>> >> Android?
>> >>
>> >> --
>> >> Mark Murphy (a Commons Guy)http://commonsware.com
>> >> Android App Developer Books:http://commonsware.com/books.html
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Copy protection bug statuses

2009-11-12 Thread tauntz
>> When a bug is marked as "FutureRelease" it usually means it will be
>> fixed in the next release at the time the bug is closed.

http://code.google.com/p/android/issues/detail?id=2263 was marked as
"FutureRelease" @ Mar 21, 2009 so it should be fixed in Android 1.5 -
that was the next version after this date (first SDK released on 13
April 2009).

http://code.google.com/p/android/issues/detail?id=2047 was marked as
"FutureRelease" @ Apr 20, 2009 so it should be fixed in Android 1.6 -
that was the next version after this date (released on 15 September
2009).


Tauno

On Thu, Nov 12, 2009 at 10:28 PM, Matt Hall  wrote:
> So can I take that to mean that that the bug exists in all current
> releases including 2.0? I could really use some concrete info on this
> particular issue as it affects most of our apps and the enlarged
> bundle size is becoming a real problem on Droid.
>
> Thanks very much,
> Matt
>
> On Nov 12, 3:22 pm, Romain Guy  wrote:
>> When a bug is marked as "FutureRelease" it usually means it will be
>> fixed in the next release at the time the bug is closed. Anyhow, it
>> means the bug has been fixed and will eventually reach users phones :)
>>
>>
>>
>>
>>
>> On Thu, Nov 12, 2009 at 9:07 AM, Neiman Buffard  
>> wrote:
>> > ok for starters im pretty sure im not doin this right but i wanted to throw
>> > an idea at anyone who would take the time to read/listen for upgrades to
>> > come if it cant make the cut for the next one. I would like to see this 
>> > done
>> > in an upgrade instead of an app only because i feel that this is somthin
>> > everyone would enjoy. BIG PICTURES i feel that  When ur favorite
>> > contacts/friends call and u have a customized ring tone and possibly an
>> > assigned contact photo would it be askin to much to utilize the  3.2-inch
>> > TFT-LCD flat touch-sensitive screen with 320 x 480 (HVGA) resolution for
>> > that photo. Very simple yes i know however we are limited to that small
>> > picture with out even being givin the option as to weather you' like it 
>> > that
>> > small or not.
>> > just a thought i've had for some time now that i wanted to share thanks for
>> > listening follow android but more specificly G1 users
>> > On Thu, Nov 12, 2009 at 12:02 PM, Matt Hall  wrote:
>>
>> >> Can anyone from Google comment on the status of the following copy
>> >> protection related bugs:
>>
>> >>http://code.google.com/p/android/issues/detail?id=2047
>> >>http://code.google.com/p/android/issues/detail?id=2263
>>
>> >> They're marked fixed in a future release, but I don't know what
>> >> release (if any) that means.
>>
>> >> I'd love to revert to no copy protection on our games for a number of
>> >> pressing reasons, but these bugs bit us pretty bad last time I tried.
>>
>> >> Any info much appreciated, thanks.
>> >> Matt
>>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "Android Developers" group.
>> >> To post to this group, send email to android-developers@googlegroups.com
>> >> To unsubscribe from this group, 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
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  All such questions should be posted on
>> public forums, where I and others can see and answer them
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Android Market Anti-Piracy

2009-11-20 Thread tauntz
Just saying that an IMEI is not "personal data".. in the country where
I live in, at least (and that's in the EU). An IMEI alone can uniquely
identify a mobile device, not the actual person who is using it. In
broad terms, it's the same as the serial number on the back of your TV
or fridge. (quoting wikipedia (not saying that it's accurate :P) "the
IMEI is only used to identify the device, and has no permanent or
semi-permanent relation to the subscriber."). Since it's not personal
data but just some device-specific number that can't be linked to you
directly, it's free-for-all to use with or without your consent. And
http://europa.eu/legislation_summaries/information_society/l14012_en.htm
also does NOT apply to the IMEI (since again, it's not "personal
data").

(just my personal non-lawyer opinion as an end user - since it's only
my opinion and understanding of this, don't take it as a fact and ask
a lawyer instead :) )

Tauno



On Fri, Nov 20, 2009 at 12:34 PM, LambergaR  wrote:
> Here we are talking about an EU legislation that is valid in all EU
> states, but similar laws exist in US and other countries. Keeping and
> processing some person data without their knowledge and allowance is
> simply not allowed - and I definitely think that IMEI is something
> that can identify me as an individual. All my expenses, everything I
> buy using my telephone is stored at my operator using the unique
> identifier (IMEI + phone number) an later on linked to all the
> remaining data they have. As I don't really mind if some programs have
> access to my IMEI number, storing and publishing it (without informing
> me) will not be tolerated.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] How to highlight list item

2009-11-20 Thread tauntz
> Can any one tell me how can I highlight any item of my list when mouse
> cursor passes through that particular item.

That is not possible. Android has no mouse cursor.


> Is this possible to
> highlight any particular option/item using soft keys??
>
> If yes, please tell me how it can be done??
>
> Thnx
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] default screenwidth of android

2009-11-20 Thread tauntz
There is no "default" screen width - different devices will have
different screen sizes.


On Fri, Nov 20, 2009 at 2:21 PM, Jags  wrote:
> whats the default screen width of android devices ? I took a 320 x 460
> image for my splash screen, it did not cover the entire screen !
>
> regards
> Jagat
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread tauntz

I just hope that this time the release date for the official SDK will
be BEFORE the update hits the masses. Not like it was with the 1.1SDK
- it was released way after 1.1 was released to end-users (the
argument from Google was something in the lines of "Hey, this is a
small release with no mayor changes so don't whine that you get it so
late"). Maybe I'm the only one who thinks that this is ridiculous..
One of the reasons why we don't have the official 1.5 (or cupcake or
however it will be officially called) SDK is that "It's not stable
enough" - fair enough but I really hope that you guys @ Google will
release it as soon as the code is stable enough (eg the code is tested
and ready to be released to the operators). That would give us a week
(maybe more) before the operators push it to the end-users.

And don't come with the "you can build your own SDK from the
opensource tree if you want" - the last releases didn't come from the
opensource tree so even if I wanted, i couldn't build the SDK based on
the code that's shipped to the end-users. And even if this release
will actually come from the public tree, you can't expect all app
developers to build their own SDK, can you? We need an official SDK -
and we need it as soon as the tree is stable enough (and way before
it's pushed to the carriers/end-users)


Tauno


On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp  wrote:
>
> Not if you stay anonymous (hint, hint) ;-)
>
> On Mar 23, 7:58 pm, Anonymous Anonymous 
> wrote:
>> " Someone from Google? " makes it official i guess :D
>>
>> On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp  wrote:
>>
>> > Can someone capable just compile the SDK and post it online for
>> > everyone? Someone from Google? I dont really care if it's not
>> > official, i just dont want to download the source tree just to build
>> > the SDK, plus i need to do the tricks you mentioned to make it work on
>> > windows.
>>
>> > On Mar 23, 1:11 pm, Marco Nelissen  wrote:
>> > > I certainly hope there aren't "a lot" of applications that use
>> > > reflection and private APIs.
>>
>> > > On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel 
>> > wrote:
>>
>> > > > Cupcake is coming, and as you know it will break a lot of apps in the
>> > > > market, those that use reflection & private api. So where is the
>> > > > Cupcake SDK/emulator for us to try our apps?
>>
>> > > > I know we can download the source codes and build it, and I know apps
>> > > > wont break if they dont use undocumented api, blah blah blah, but we
>> > > > should get an official SDK/emulator for cupcake, dont you think,
>> > > > google?
> >
>

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



[android-developers] Re: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread tauntz

Did you just say that Google is not pushing code/releases to tmo and
that tmo pulls the public source at random points in time, adds dream
specific bits and releases it to end-users? You do realize that all
releases till today have come from a closed source project and not
AOSP?


(Even if Google doesn't actually push the code/release to tmo, they
certainly do tell tmo (and other carriers) when the code in the repo
is "stable enough" so they can pull and release. What I'm asking for,
is that at this point in time (eg Google has designated the code as
"stable enough to release") we get an official SDK - is that too much
to ask?)

Tauno

On Tue, Mar 24, 2009 at 1:47 PM, Mark Murphy  wrote:
>
> tauntz wrote:
>> We need an official SDK -
>> and we need it as soon as the tree is stable enough (and way before
>> it's pushed to the carriers/end-users)
>
> Please understand that Android is open source. There is no "pushed to
> the carriers/end users" -- hardware manufacturers are welcome to pull
> from the tree whenever they see fit.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android App Developer Books: http://commonsware.com/books.html
>
> >
>

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



[android-developers] Re: Alert dialog in Android-SDK-1.1-Release 1

2009-03-27 Thread tauntz

Are you using dialog titles?

Somebody from the Android team decided that dialog titles can't be
longer than 2 lines anymore. That means they can not be longer than 2
words in some cases/languages. And no, nobody has explained the
reasoning behind this move (other than - why are you using so long
titles? don't use them!). It's also not documented at
http://d.android.com/sdk/android-1.1.html why changes like this are
not listed? Ask someone who knows :)

Tauno

On Fri, Mar 27, 2009 at 1:54 PM, Zhubham  wrote:
>
> Hi all,
>
> Alert dialogs which were properly displaying the full text (around 15
> words) in SDK-1.0 , are trimming down the text to around 5 words in
> SDK-1.1.
>
> eg.
>
> SDK1.0 = "Welcome. This is an android based application. SDK used is
> 1.1-Release 1."
>
> SDK1.1 = " Welcome. This is an android based app..."
>
> Can someone help me with this??
>
> Thanks in advance.
>
> Regards,
> Zhubham.
> >
>

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

2009-03-27 Thread tauntz

If you are actually using your dialog title for the title and it won't
fit, then I suggest you file a bug report
(http://code.google.com/p/android/issues/ ) since for me this is a bug
(eg dialog titles can be only 2 lines.. really - that's a problem in
some languages where common words are way longer than in english). If
enough people have this issue that they can't use the dialog title for
titles anymore, then this might be changed in a future release.

If you are using it for showing general messages, then don't use the
title for this, use setMessage(message) (in AlertDialog.Builder or
AlertDialog).


Tauno




On Fri, Mar 27, 2009 at 2:52 PM, Sahil Arora  wrote:
> Yes, i m using dialog titles. So going ahead do i need to replace my alert
> dialog with something else?? What is the suitable replacement u recommend??
> Thanks.
>
>
> On Fri, Mar 27, 2009 at 5:41 AM, tauntz  wrote:
>>
>> Are you using dialog titles?
>>
>> Somebody from the Android team decided that dialog titles can't be
>> longer than 2 lines anymore. That means they can not be longer than 2
>> words in some cases/languages. And no, nobody has explained the
>> reasoning behind this move (other than - why are you using so long
>> titles? don't use them!). It's also not documented at
>> http://d.android.com/sdk/android-1.1.html why changes like this are
>> not listed? Ask someone who knows :)
>>
>> Tauno
>>
>> On Fri, Mar 27, 2009 at 1:54 PM, Zhubham  wrote:
>> >
>> > Hi all,
>> >
>> > Alert dialogs which were properly displaying the full text (around 15
>> > words) in SDK-1.0 , are trimming down the text to around 5 words in
>> > SDK-1.1.
>> >
>> > eg.
>> >
>> > SDK1.0 = "Welcome. This is an android based application. SDK used is
>> > 1.1-Release 1."
>> >
>> > SDK1.1 = " Welcome. This is an android based app..."
>> >
>> > Can someone help me with this??
>> >
>> > Thanks in advance.
>> >
>> > Regards,
>> > Zhubham.
>> > >
>> >
>>
>>
>
>
> >
>

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

2009-03-27 Thread tauntz

I don't know if this is a bug somewhere but I have observer the
following odd behavior:

Installed an app called "Bar Control" and made a shortcut to an app
called "Barcode Scanner" (Bar Control puts the "shortcut" to the
notification bar so you can launch random apps directly from there)
Once out of ten times this happens:
* Open notification bar (portrait mode)
* Click on "Barcode Scanner"
* Barcode Scanner is opened (in landscape, fullscreen) but it has the
expanded-notification bar displayed on top of it (it does not have the
usual bar with the battery etc indicators)
(Screenshot: http://tinypic.com/view.php?pic=23jg315&s=5)

If this is a bug then I don't know in what component (Bar Control,
Barcode Scanner, Notification bar itself or WindowManager etc) so I
can't file a bug report for the correct project. If it's in the core
components, then this issue might need some attention because it can
apply to other fullscreen apps that are launched from the notification
bar as well.

Tauno

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



[android-developers] Re: Is it possible to have 2 launcher Activity in a single apk?

2009-02-05 Thread tauntz

On Tue, Feb 3, 2009 at 10:37 AM, Romain Guy  wrote:
> Yes :) Just put two activities in your manifest, both with the
> LAUNCHER category.

I tried that but it seems I'm still doing something wrong (see code at
the end of the message). The results I get are:
* Two launcher entries (Ativity A and Activity B) are placed in the
activity list in Home
* Clicking first on Activity A will start Activity A.
* Going back and clicking on Activity B will start Activity A again.
* If I click on Activity B the first time after install, B is started
and going back -> clicking on A, starts B again

Any hints on what I'm doing wrong?


LogCat:
INFO/ActivityManager(55): Starting activity: Intent {
action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER} flags=0x1020
comp={test.activity/test.activity.ActivityA} }
INFO/ActivityManager(55): Start proc test.activity for activity
test.activity/.ActivityA: pid=13716 uid=10036 gids={}
INFO/jdwp(13716): received file descriptor 10 from ADB
INFO/ActivityManager(55): Displayed activity test.activity/.ActivityA: 872 ms
INFO/ActivityManager(55): Starting activity: Intent {
action=android.intent.action.MAIN
categories={android.intent.category.HOME} flags=0x1020
comp={com.android.launcher/com.android.launcher.Launcher} }
INFO/ActivityManager(55): Starting activity: Intent {
action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER} flags=0x1020
comp={test.activity/test.activity.ActivityB} }

Code:

http://schemas.android.com/apk/res/android";
  package="test.activity"
  android:versionCode="1"
  android:versionName="1.0.0">




















public class ActivityA extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("ActivityA");
setContentView(tv);
}

}


public class ActivityB extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("ActivityB");
setContentView(tv);
}
}

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



[android-developers] Re: Is it possible to have 2 launcher Activity in a single apk?

2009-02-05 Thread tauntz

Thanks Dianne.

Just for the record (if someone else needs the solution and finds this thread):
If you want to have two different applications in one .apk then you
need to have both launcher Activities with the LAUNCHER category as
Romain said.
You also need to add different task affinities to these activities.
Otherwise you might bump into the problems that I described (and as
far as I understand, this is designed to behave like that :) )

One more note - don't believe
http://code.google.com/android/intro/appmodel.html entirely - you
can't have task affinities in the form "append your .apk's package
name with a colon separated string" - colons are not supported
characters there. Also replace the words "you will probably want to"
with "you have to" in your head when reading this :)

Tauno


On Thu, Feb 5, 2009 at 8:02 PM, Dianne Hackborn  wrote:
> If you want two fully distinct apps, you need to give them different task
> affinities.  Please read this before you go farther:
>
> http://code.google.com/android/intro/appmodel.html
>
> On Thu, Feb 5, 2009 at 7:56 AM, tauntz  wrote:
>>
>> On Tue, Feb 3, 2009 at 10:37 AM, Romain Guy  wrote:
>> > Yes :) Just put two activities in your manifest, both with the
>> > LAUNCHER category.
>>
>> I tried that but it seems I'm still doing something wrong (see code at
>> the end of the message). The results I get are:
>> * Two launcher entries (Ativity A and Activity B) are placed in the
>> activity list in Home
>> * Clicking first on Activity A will start Activity A.
>> * Going back and clicking on Activity B will start Activity A again.
>> * If I click on Activity B the first time after install, B is started
>> and going back -> clicking on A, starts B again
>>
>> Any hints on what I'm doing wrong?
>>
>>
>> LogCat:
>> INFO/ActivityManager(55): Starting activity: Intent {
>> action=android.intent.action.MAIN
>> categories={android.intent.category.LAUNCHER} flags=0x1020
>> comp={test.activity/test.activity.ActivityA} }
>> INFO/ActivityManager(55): Start proc test.activity for activity
>> test.activity/.ActivityA: pid=13716 uid=10036 gids={}
>> INFO/jdwp(13716): received file descriptor 10 from ADB
>> INFO/ActivityManager(55): Displayed activity test.activity/.ActivityA: 872
>> ms
>> INFO/ActivityManager(55): Starting activity: Intent {
>> action=android.intent.action.MAIN
>> categories={android.intent.category.HOME} flags=0x1020
>> comp={com.android.launcher/com.android.launcher.Launcher} }
>> INFO/ActivityManager(55): Starting activity: Intent {
>> action=android.intent.action.MAIN
>> categories={android.intent.category.LAUNCHER} flags=0x1020
>> comp={test.activity/test.activity.ActivityB} }
>>
>> Code:
>> 
>> http://schemas.android.com/apk/res/android";
>>  package="test.activity"
>>  android:versionCode="1"
>>  android:versionName="1.0.0">
>>
>>
>>
>>
>>
>>> />
>>
>>
>>
>>
>>
>>
>>> />
>>
>>
>>
>>
>> 
>>
>>
>> public class ActivityA extends Activity {
>>
>>@Override
>>public void onCreate(Bundle savedInstanceState) {
>>super.onCreate(savedInstanceState);
>>TextView tv = new TextView(this);
>>tv.setText("ActivityA");
>>setContentView(tv);
>>}
>>
>> }
>>
>>
>> public class ActivityB extends Activity {
>>
>>@Override
>>public void onCreate(Bundle savedInstanceState) {
>>super.onCreate(savedInstanceState);
>>super.onCreate(savedInstanceState);
>>TextView tv = new TextView(this);
>>tv.setText("ActivityB");
>>setContentView(tv);
>>}
>> }
>>
>>
>
>
>
> --
> 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.  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
-~--~~~~--~~--~--~---



[android-developers] Re: SlidingDrawer not working with RC33

2009-02-09 Thread tauntz

Hi Dianne and anyone else who might care about this,

I'm a little (ok, more than a little) disappointed regarding RC33 and
the lack of communicating UI look/behavior changes to developers.
The specific reason is that RC33 seems to also have one more UI change
- Dialog titles can't be longer than 2 lines.
The change itself is reasonable and I'm fine with it but the problem
is that I'm finding out about this change by an email from a US user
of my app who said he can't read the text of some Dialogs. For him
(and all other US users who have received the update), my app suddenly
broke after he received the OTA update. And that's not because I used
JNI, undocumented code or internal classes that you all seem to be
very worried about :)
In my opinion it broke because:
a) I used titles that are longer than 2 lines
b) a subtle change in the UI behavior in RC33
c) the failure to warn developers before this update was pushed out

For this case - all I can say to the end-user is that the OTA update
broke the app and he should blame Google and/or t-mobile for it.
Of course I should never use dialog titles longer than one or two
lines but that's not my point :) I'm not talking about this specific
change.  I'm complaining and whining about the lack of any warning
and/or changelog and/or updated SDK BEFORE the end-users get the
update and see that things are broken.

Providing the changelog or SDK AFTER the update is kind of pointless
since people start having problems right after they receive the
update.

I'm not asking for ponies here, really. Just some kind of
communication with the developers about upcoming changes.
Currently the app lifecycle for the user is:
Download app -> get OTA -> broken app -> wait for app update ->
download app update -> working app -> get OTA -> broken app -> wait
for app update -> download app update -> working app -> ..
How it should be (in a perfect world):
Download app -> download app update -> get OTA update -> download app
update -> get OTA update ->..and the app is always working for the
user.

Anyway - it would be nice to know beforehand if someone decides that
the correct length for dialog titles is 1 line instead of 2 in a
future update so I could update my apps BEFORE they break again ;)

Tauno


> If there are actual places where you can use internal Java APIs, we
> definitely want to hear about them (with sample code) to fix them.  So far,
> I am not clear if that is what is going on here, or if it is just a matter
> of taking advantage of the layout file to access an internal class, which as
> I say is outside the bounds of what I think we can protect against.
>
> That said, I don't think we can make any assurances of an application
> working "flawlessly" on a platform update even if it completely sticks to
> the SDK.  We are certainly going to do what we can to keep things working,
> and definitely don't want to just break things, but:
>
> (a) The platform code -is- changing and there can be situations where some
> select application is relying on some behavior that has changed, which may
> result in some issue for it.
> (b) In some very rare circumstances it may be necessary to change something
> for larger good of the platform, for example in Cupcake applications can't
> modify the "data roaming" setting so if someone is relying on that their
> call will no longer do anything (though we made sure to not through an
> exception and just crash the app).
>
>> One other example I noticed - the text on the tab buttons - in RC30
>> if it is longer  - it wraps, in RC33 - the same text is displayed in a
>> "marquee").
>> Is this an API change? While the tab text is probably not significant
>> issue,
>> it points that you really don't know about it until
>> you get the RC33 and realize that your UI may be a bit off here and
>> there.
>
> Yeah this was a change made for internationalization purposes, to make the
> tabs more flexible about the text in them so that localizing it wouldn't
> break the UI.  While this is certainly a change in behavior, it is not clear
> whether this is really an API change or not. :)  (Falls in my (a) category
> above.)  This is also kind-of part of a larger issue we will all be dealing
> with, that as we move forward hardware vendors are going to want to
> customize the Android UI for their device.  We need to be careful that this
> doesn't cause applications to break, but if you are using standard widgets
> you do need to do that with the expectation that you don't know -exactly-
> what you will get, but rather that your UI will match the UI of the rest of
> the device.
>
>>
>> The truth is API changes happen - sometimes they are big and obvious,
>> sometimes
>> small and less obvious. In my opinion the smart thing to do is to give
>> developers
>> the information and tools to react to the changes and update our
>> applications as
>> soon as possible.
>
> If you've been following along since before 1.0, you've seen the SDK updates
> we've done as the pl

[android-developers] Re: Porting JavaME Midlet to android.

2009-01-29 Thread tauntz

You may want to take a look at MicroEmulator or J2ME runner. They are
both projects aimed at running J2ME applications on Android without
any (significant) rewrite.

http://microemu.blogspot.com/2008/11/running-java-me-applications-on-android.html
and
http://www.netmite.com/android/index.html

Tauno

On Thu, Jan 29, 2009 at 11:33 AM, Daniel Janev  wrote:
>
>Hi Guys,
>
> I hope that in the next android release the DexFile (something like
> class loader) will work without any hacks. Having this "feature" will
> allow anyone to implement the MIDP/CLDC APIs over Android ones. Also
> having a simple backend system, which converts the Java classes into
> Android dex format will allow to run any MIDlet on the system.
>
> I really hope that Google will have this in the next release. Can
> someone from Google comment this? Will the DexFile work in the next release?
>
> sblantipodi wrote:
>> I'll simply abandon this unuseful platform :)
>> Android serves only to create other fragmentation...
>>
>>
>> On Jan 28, 7:49 pm, Noonien Soong  wrote:
>>> You will be able to use java code that does not access any of the J2ME
>>> APis.
>>> You will have to recode most of the System-related stuff.
>>>
>>> I think what you should do is take a step back and take a look at the
>>> notepad example if you haven't already. Really go though it step by
>>> step.
>>> Then start playing around with little example apps to see how things
>>> are done in android.
>>>
>>> Android really is quite different from coding for J2ME - you probably
>>> are better of writing things like the UI from scratch.
>>>
>>> That's my experience ...
>> >
>>
>>
>
>
> --
>
> Best Regards,
>Daniel
> ---
> Daniel Janev · Department Manager/Core Platform and Smart Home
> ProSyst Software GmbH
> 1606 Sofia, Bulgaria · Vladajska Str. 48
> Tel. +359 (0)2 952 35 81/109 · Fax +359 (0)2 953 26 17
> Mobile Phone +359 (0)888 678 670
> http://www.prosyst.com · d.ja...@prosyst.com
> ---
> stay in touch with your product.
> ---
>
> >
>

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

2009-09-14 Thread tauntz

Did you enable USB debugging on your phone? (Settings -> Applications
-> Development -> USB debugging)
If not, try enabling it.

Tauno

On Mon, Sep 14, 2009 at 1:19 PM, André Charles Legendre
 wrote:
>
> Hi
> I want to install an application apk from a Linux machine to a mobile
> phone (Samsung Galaxy)
> When I run adb install from Linux (Kubuntu 9.04), I get a message
> telling : no device found.
>
> Any Idea welcome
>
> Andre
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to write text file to sdcard on physical G1 device

2009-09-17 Thread tauntz

Applications targeted for 1.0, 1.1 and 1.5 will be able to write to
the external storage without any permissions. They will continue to
work just like they have till today.

http://developer.android.com/sdk/android-1.6.html#api-changes
"WRITE_EXTERNAL_STORAGE: Allows an application to write to external
storage. Applications using API Level 3 and lower will be implicitly
granted this permission (and this will be visible to the user);
Applications using API Level 4 or higher must explicitly request this
permission. "


Tauno

On Thu, Sep 17, 2009 at 10:25 AM, Shrenik Vikam
 wrote:
>
> WRITE_EXTERNAL_STORAGE is there in 1.6
> what abt 1.5 ???
>
> On Sep 10, 12:30 am, androiduser mobile 
> wrote:
>> I got it working with a permission change in the manifest file. I
>> added "WRITE_EXTERNAL_STORAGE" and it worked like a gem :)).
>>
>> On Sep 9, 12:13 pm, Chris Stratton  wrote:
>>
>> > On Jul 17, 6:24 pm, doubleminus  wrote:
>>
>> > > Is it a permissions issue?  Trying to "touch" thesdcardvia adb shell
>> > > gives me a "permission denied" message...
>>
>> > FYI there's no "touch" command in the shell or /system/bin and the
>> > shell apparently considers "permission denied" to be a good substitute
>> > for "[command] not found"
>>
>> > but you can "cat > /sdcard/testfile" and then ^D
> >
>

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

2009-09-17 Thread tauntz

Hi,

I guess that's exactly what you are looking for:
http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT
"If set in an Intent passed to Context.startActivity(), this flag will
cause the launched activity to be brought to the front of its task's
history stack if it is already running.

For example, consider a task consisting of four activities: A, B, C,
D. If D calls startActivity() with an Intent that resolves to the
component of activity B, then B will be brought to the front of the
history stack, with this resulting order: A, C, D, B. This flag will
be ignored if FLAG_ACTIVITY_CLEAR_TOP is also specified. "


Tauno

On Thu, Sep 17, 2009 at 11:31 AM, sdphil  wrote:
>
> I have the following situation.  I have a task with the following
> activity stack --
> A - B - C
>
> I have a menu item that allows me to start activity D; so my activity
> stack looks like this --
> A - B - C - D
>
> Then I could select a menu item that allows me to start an activity C,
> which would cause my activity stack to look like this:
> A - B - C - D - C
>
> Then I could go back (via the menu item) to activity D, making my
> activity stack look like this:
> A - B - C - D - C - D
>
> Doing this a few more times, it would wind up looking like this --
> A - B - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D
> - C - D - C - D
>
> This seems kinda stupid to me.  I'd like it to simply re-use an
> activity, or pop the activity below to be on top (which goes against
> the nature of a "stack").
>
> So, what I mean is if I had this activity stack:
> A - B - C - D
>
> And I started activity C (from the menu), I would get:
> A - B - D - C
>
> And if I then started activity D (from the menu), I would get:
> A - B - C - D
>
> Is there a way to do this without keeping some global list of
> activities and doing gross things to them to reorder them?
>
> tia.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: The screen was black case, service sleep?

2009-09-21 Thread tauntz

The problem (it's not a problem, really - it's designed so) is that
your device goes to sleep to save battery when the user is not
actively using their device.
That means that the main CPU will also power down to some state and
for applications the time stops. What you can do is:
* Use the AlarmManager to schedule an alarm every minute (be warned -
that will drain the battery really fast)
* Hold a WakeLock for the CPU - this way the CPU will not shut down
and you will continue to receive the TIME_TICK events (this will drain
the battery even faster)
If you need to do your work every minute and that for a short time
(only for a few minutes), then I guess using one of these 2 methods
would be acceptable. If you need to do stuff every minute for longer
periods of time, I suggest you get rid of that requirement and
redesign your app :)

Tauno

On Mon, Sep 21, 2009 at 12:04 PM, lili  wrote:
>
> I wrote a service and I registered BroadcastReceiver in it. In the
> onReceive () method of BroadcastReceiver catagory,I just wrote
> Intent.ACTION_TIME_TICK.equals(intent.getAction()) to receive the
> systenm time every minute and deal with everything that I should do in
> it every minute.But i found a problem that when the mobile phone
> screen was locked and was completely black,my service seems to be
> sleep and does not work,and when I light up the screen(it is still in
> locked condition),the system will automatically run my service.I do
> not know the reason,I guess if it is because my service is not the
> system-level service?
> When the mobile screen is black,Andraid system will hibernate the
> sevice which is not the system-level service,so if this,I should add
> my service to system service,but I know how to use
> android.permission.ADD_SYSTEM_SERVICE? If you can,please send me a
> example about how to add own service to system-level service.This
> problem has been troubled me for two weeks.Thank you very much and
> hoping for reply asap.
> >
>

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

2009-09-22 Thread tauntz

Hi

Activities:
A & B  are activities that once you have navigated away from them,
it's not logical that you can get back to them using the back button.
C ... X are activities that follow the usual "can go back to where you
came from" flow.

App flow:
* Launch app from Home -> starts A
* From A start B
* Finish A (removes it from stack)
* From B start C
* Finish B (removes it from stack)
* From C start D
* From D start E

Once the user has reached E, the activity stack looks like this: C -> D -> E.

Can I somehow reset the whole stack so it starts again at A so it's as
the user just launched it from Home (so that C... E are removed from
the history stack)?

>From http://developer.android.com/guide/topics/fundamentals.html#clearstack:
In my case alwaysRetainTaskState = true, clearTaskOnLaunch = false,
finishOnTaskLaunch = false, because it's logical that the user
continues in the same activity where he left - even after long periods
of time. Even if alwaysRetainTaskState was false, it would still not
address my problem of "manually" clearing the stack at a random point
in time from within the application.
"There's another way to force activities to be removed from the stack.
If an Intent object includes the FLAG_ACTIVITY_CLEAR_TOP flag, and the
target task already has an instance of the type of activity that
should handle the intent in its stack, all activities above that
instance are cleared away so that it stands at the top of the stack
and can respond to the intent." - that also doesn't work for me since
A isn't in the stack so launching it with that flag won't clear
anything from the stack :(


Tauno

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

2009-09-22 Thread tauntz

"FLAG_ACTIVITY_CLEAR_TOP - If set, and the activity being launched is
already running in the current task, then instead of launching a new
instance of that activity, all of the other activities on top of it
will be closed and this Intent will be delivered to the (now on top)
old activity as a new Intent. "

Sadly this one doesn't help since it only clears the stack if the
launched activity is already running in the task somewhere (and that's
not the case here, sadly :( )


Tauno


On Tue, Sep 22, 2009 at 12:17 PM, Andrei Bucur  wrote:
> http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP
>
> On Tue, Sep 22, 2009 at 11:26 AM, tauntz  wrote:
>>
>> Hi
>>
>> Activities:
>> A & B  are activities that once you have navigated away from them,
>> it's not logical that you can get back to them using the back button.
>> C ... X are activities that follow the usual "can go back to where you
>> came from" flow.
>>
>> App flow:
>> * Launch app from Home -> starts A
>> * From A start B
>> * Finish A (removes it from stack)
>> * From B start C
>> * Finish B (removes it from stack)
>> * From C start D
>> * From D start E
>>
>> Once the user has reached E, the activity stack looks like this: C -> D ->
>> E.
>>
>> Can I somehow reset the whole stack so it starts again at A so it's as
>> the user just launched it from Home (so that C... E are removed from
>> the history stack)?
>>
>> From
>> http://developer.android.com/guide/topics/fundamentals.html#clearstack:
>> In my case alwaysRetainTaskState = true, clearTaskOnLaunch = false,
>> finishOnTaskLaunch = false, because it's logical that the user
>> continues in the same activity where he left - even after long periods
>> of time. Even if alwaysRetainTaskState was false, it would still not
>> address my problem of "manually" clearing the stack at a random point
>> in time from within the application.
>> "There's another way to force activities to be removed from the stack.
>> If an Intent object includes the FLAG_ACTIVITY_CLEAR_TOP flag, and the
>> target task already has an instance of the type of activity that
>> should handle the intent in its stack, all activities above that
>> instance are cleared away so that it stands at the top of the stack
>> and can respond to the intent." - that also doesn't work for me since
>> A isn't in the stack so launching it with that flag won't clear
>> anything from the stack :(
>>
>>
>> Tauno
>>
>>
>
>
> >
>

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

2009-09-25 Thread tauntz
The problem with long-pressing-menu not working is this: HTC Hero. It just
does NOT work there with the default keyboard.
I got also reports about people being not able to open the virtual keyboard
on their phones - I suggested them to try long-clicking the menu (following
Romain Guys suggestions) and I thought that everything is fine - till I got
my hands on HTC Hero - you can long-press the menu for 2 days in a row - it
still does not open the virtual keyboard there.

The bottom line is that due to platform fragmentation there's no "standard"
way to bring up the keyboard - different platform implementations use a
totally different concept for it. If you want to support such devices, you
could detect if a device is a HTC Hero/(or some other device that does not
use long-menu-press) and if it is, then use a different layout in your app
(eg display a button that brings up the virtual keyboard). Or do some other
ugly ugly hacks (I'll burn in hell for suggesting this, right?:P)


Tauno

On Thu, Sep 24, 2009 at 10:40 PM, Eric Carman  wrote:

>
> Thank you both for your response.
>
> If the application is written for Android 1.1, does this change
> anything in regards to "and there is a keyboard selected and it allows
> this"? I would think that in such an app, since it doesn't know about
> soft keyboards, the system soft keyboard would be selected and would
> allow this. But perhaps there is more to this. Are you possibly
> suggesting that they've installed one of the alternate keyboards? That
> would be interesting.
>
> Again, this works on an emulator which I've defined to have no
> keyboard, so that is encouraging. At least I think it helps to rule
> out the caveat where the app isn't consuming the event, but I will
> check this out to be sure as I do catch key events - just not long-
> press menu ones, at least not intentionally.
>
> I guess now I would need to know what to tell the user to look for on
> their device such that they can get this functionality to work.
> Assuming I can get them to contact me or bother to read my web site.
>
> Would the "keyboard selected" refer to the Settings | Locale & Date |
> Keyboard [Checked] option?
> And then I guess I could refer them to the keyboard settings option
> below that to investigate further.
>
> Best Regards,
> Eric
>
>
>
> On Sep 24, 1:14 pm, Dianne Hackborn  wrote:
> > Long press menu forces the keyboard to be displayed, as long as the app
> > doesn't completely consume that key event, and there is a keyboard
> selected
> > and it allows this (the default behavior is to allow it).
> >
> > --
> > 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
-~--~~~~--~~--~--~---



[android-developers] Re: Soft Keyboard

2009-09-25 Thread tauntz

> At any rate, long press on menu has ALWAYS been there purely as a very last 
> resort for pre-1.5 apps that couldn't have been written knowing about input 
> methods.  It is a super-sucky mechanism to get to the soft keyboard, and 
> anyone writing an app today really should assume it doesn't exist and provide 
> a decent UI as part of their app.

Understood. I was just under the impression that long pressing the
menu is the suggested way how "apps should work" maybe based on
http://code.google.com/p/android/issues/detail?id=3577 and
http://groups.google.com/group/android-developers/browse_thread/thread/ca26e331dce350eb/10802a8263b52c72

> Long press on menu is NOT what you should be making your users do.  
> Seriously.  It sucks.  Who would guess that is how you get to a keyboard?  
> Please give them a decent UI.

Of course it sucks - no argument against that - but IMO cluttering the
user-interface with "open virtual keyboard" buttons sucks even more.
What's the minimum size of an UI item that is big enough so the user
can touch this with his/her finger? 42px on a standard
Dream/Magic/Hero screen? That is almost 10% of all the screen
real-estate for an app with a titlebar (speaking of height). Or when
you'd put that option to the menu, it would still require the user to
press menu once and then go and find the "open virtual keyboard" item
and press it. Sucky, isn't it?

> It's easy: if there isn't a hard keyboard (which can control resource 
> selection as well as being info available in Resources.getConfiguration()), 
> then make a UI that interacts in a nice way with the soft keyboard.  Also 
> consider doing this even if there is a hard keyboard.  Like, uh, the standard 
> platform and apps do everywhere.  You -never- make people use long press on 
> menu to enter text.  Because it sucks.

Uh, are we using the same devices here? I have a Magic here and when I
want to do filtering then:
* Home launcher -> no UI for opening virtual keyboard, I have to long press menu
* Contacts -> no UI for opening virtual keyboard, I have to long press menu
..are there any more places where you can filter lists in built-in apps? :)


Would it be an option to not tell developers that "you need to design
a separate layout for every activity that has a listview that is
filterable" (beacuse well - why would you want to have this
button/menu item on devices where there's a hardware keyboard?) and to
tell device manufacturers/IME developers to follow one simple rule -
"long-pressing the menu should open the virtual keyboard"? That would
at least create a standardized way of opening the keyboard. Imagine if
really every app designer is going to design their apps with "open
virtual keyboard" buttons - what the end users will get is n+1
applications that each have this option in different places and it
looks totally different in different apps - some have it under menu ->
search, some have it under menu -> filter, some have it on the screen
in green, some have it orange,  some use one icon, others use a
different icon, some have it at the top of the screen, some at the
bottom.. For the user that'll be a total mess if they have to learn
how to open the keyboard for every application that they install. THAT
sucks, doesn't it?

I don't really care if it'll be "long-press menu" or devices start to
have a standalone "open keyboard" hardware button or the framework
will automatically detect "open keyboard" gestures or whatever. My
point is that can we please have one standard way of opening the
keyboard so the user knows that "when I want to open the keyboard in
ANY application, I have to do X"?
I don't want to start an argument in the style "Your approach sucks
more than mine!!!", really. I just think that the current situation we
are in, sucks :)


Tauno

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

2009-09-25 Thread tauntz

On Fri, Sep 25, 2009 at 1:13 PM, James Webster  wrote:
> On the Hero and I guess other Androids as well, there is the "Search"
> hardware button. This works in Hero Contacts AND in Launcher, bringing up
> the soft keyboard. Not particulary intuitive I grant you, as you tend to
> look for a button to do that on screen, but it does make sense.

This brings up the global search and can not be used for filtering
ListViews in apps that use global search. (or however it is called:
http://developer.android.com/reference/android/app/Activity.html#onSearchRequested%28%29)

> Of course, in Android tapping any field which would takes text input always
> brings up the keyboard anyway, so it is only an issue in Hero's list apps
> because there isn't a default edit field which you can tap to start typing,
> and thus auto-show the keyboard.
> Is it not the same on the Magic?

The problem is that sometimes (for example filterint ListViews) you do
not have a field to focus. It's not just an issue in Heros list of
apps but it's an issue in all apps that provide filtering for their
ListViews.


Tauno

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

2009-09-26 Thread tauntz

1) This belongs to android-discuss, it has nothing to do with
developing apps using the public SDK :)
2) TV adds? Are you kidding us or you really want to have TV ads in
all countries where Android phones are sold? :)

Tauno

On Sat, Sep 26, 2009 at 7:34 PM, Maps.Huge.Info (Maps API Guru)
 wrote:
>
> I have three apps in ADC2 and so far have seen a total of 63 users run
> them.
>
> There seems to be a very low number of judges participating in ADC2.
> I've seen no publicity at all, no mention in the tech press, no TV
> coverage, nothing to indicate this contest is running.
>
> I'm guessing that the majority of judges at this point are developers.
> Won't that skew the results? Is this supposed to be a developer or
> user contest?
>
> -John Coryat
>
> "Radar Now!"
>
> "What Zip Code?"
> >
>

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

2009-09-26 Thread tauntz

Sorry about TV ads - don't know where I got the idea :) readingComprehension--;

On Sat, Sep 26, 2009 at 7:55 PM, Maps.Huge.Info (Maps API Guru)
 wrote:
>
>> 1) This belongs to android-discuss, it has nothing to do with
>> developing apps using the public SDK
>
> Maybe. There are enough conversations regarding ADC2 on this forum to
> make it relevant. If Google would open an ADC2 forum, that would be a
> better place.
>
>> 2) TV adds? Are you kidding us or you really want to have TV ads in
>> all countries where Android phones are sold? :)
>
> Where in my post did I mention TV ads? TV coverage is about media
> exposure. You may have heard of CBS, CNN, CNBC and the other networks.
> They put enough time into covering lottery jackpots, spelling bees,
> pie eating and other events, why not this contest?
> >
>

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

2008-10-26 Thread tauntz

http://code.google.com/android/reference/android/widget/TextView.html#addTextChangedListener(android.text.TextWatcher)

Example:
editText.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s) {
//XXX do something
}
public void beforeTextChanged(CharSequence s, int 
start, int count,
int after) {
//XXX do something
}
public void onTextChanged(CharSequence s, int start, 
int before, int count) {
//XXX do something
}
});


Tauno



On Sun, Oct 26, 2008 at 9:33 PM, David <[EMAIL PROTECTED]> wrote:
>
> I want to run a function when the text in an EditText is changed. How
> would I do this?
> >
>

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



[android-developers] Re: Starting new Activity vs. setContentPane(newView)

2008-10-27 Thread tauntz

a) setContentView(new content)
b) Send an Intent so the OS can resolve it, start a new Activity
(optionally restoring it's state), call the needed methods of the old
Activity (onPause() etc..) and finally call setContentView(new
content) in the new Activity
(I know, it's a simplification..)

You need a side-by-side demo for understanding that a is way faster than b? :)
Yes, using just one Activity and calling setContentView(new content)
is not the best practice but the speed/memory advantage is just too
great IMO (yes, I know that I have to handle the back key, state
saving and memory cleanup myself.. I'm doing it and it's still way
faster/more memory efficent than using different Activities for every
screen that I have)

If you have a simple application with just a few screens and you don't
mind that the user has to wait for about a second while switching
between them, then go for many Activities. If you want memory and
speed efficiency, then use one Activity and manage the different views
yourself (with the burden of managing different states yourself when
the user navigates to/away from your app.)



On Mon, Oct 27, 2008 at 2:41 PM, Peli <[EMAIL PROTECTED]> wrote:
>
> Hm, if you have a side-by-side demo comparing the two approaches and
> showing that one is really much faster than the other while offering
> same functionality, this calls for explanation from the Google
> folks :-) To be fair this comparison should be made on a real device
> though, not on the emulator.
>
> Peli
>
> On Oct 27, 12:36 pm, "Robert K." <[EMAIL PROTECTED]> wrote:
>> On the emulator, each sample unit of 'API Demos' is made as single
>> Activity. It lasts about 1000-1200 milliseconds till a unit starts.
>>
>> I don't think this is by design, but simply because it lasts that long
>> to load the activity... with setContentView(View) the new screen
>> appears almost immediately.
>>
>> That's what I mean.
>>
>> Regards,
>> Robert
> >
>

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



[android-developers] Re: Go from one Screen to another screen

2008-10-28 Thread tauntz

You might consider the [EMAIL PROTECTED] mailinglist.

As for the answer - different screens are Activities in Android. To
move from one screen to another, you are technically moving from an
activity to another - eg starting a new Activity. Navigating between
Activities is done by sending Intents. One way to do it is by calling
startActivity(Intent intent) in the first activity.
For example yourActivity.startActivity(new Intent(this, NewActivity.class));

Read about Activities here:
http://code.google.com/android/reference/android/app/Activity.html
and about Intents here:
http://code.google.com/android/reference/android/content/Intent.html


Tauno


On Tue, Oct 28, 2008 at 12:55 PM, Rahul <[EMAIL PROTECTED]> wrote:
>
> I am Begginer for the Android and I want to Go from One Screen to
> Another Screen But i dont undestand How it is possible plz give me a
> code for that.
> >
>

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



[android-developers] Re: Run function when EditText text changed

2008-10-28 Thread tauntz

Yes, you are correct.


(You can also create your own class that implements
OnTabChangeListener like this:
public class TabChangeListener implements OnTabChangeListener {
public void onTabChanged(String tabID) {
// XXX do something
}
}

and then use it:
TabChangeListener listener = new TabChangeListener();
tabHost.setOnTabChangeListener(listener);

that goes for all cases of using interfaces :)
)

Tauno

On Mon, Oct 27, 2008 at 7:10 PM, David <[EMAIL PROTECTED]> wrote:
>
> So that's how I use the TextWatcher...Ok, it works perfectly! Thanks
> tauntz! (Am I correct in assuming this is how to use the
> tabHost.setOnTabChangeListener()?)
>
> On Oct 26, 12:39 pm, tauntz <[EMAIL PROTECTED]> wrote:
>> http://code.google.com/android/reference/android/widget/TextView.html...)
>>
>> Example:
>> editText.addTextChangedListener(new TextWatcher() {
>> public void afterTextChanged(Editable s) {
>> //XXX do something
>> }
>> public void beforeTextChanged(CharSequence s, int 
>> start, int count,
>> int after) {
>> //XXX do something
>> }
>> public void onTextChanged(CharSequence s, int start, 
>> int before, int count) {
>> //XXX do something
>> }
>> });
>>
>> Tauno
>>
>> On Sun, Oct 26, 2008 at 9:33 PM, David <[EMAIL PROTECTED]> wrote:
>>
>> > I want to run a function when the text in an EditText is changed. How
>> > would I do this?
> >
>

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



[android-developers] Re: access to getprop from Java?

2008-10-28 Thread tauntz

Not a supported way AFAIK.


Currently you can use something like this (modified and taken from
http://groups.google.com/group/android-developers/browse_thread/thread/2572d2da0d75de08)

private void getProperties()
{
try
{
   ArrayList processList = new ArrayList();
String line;
java.lang.Process p = Runtime.getRuntime().exec("getprop");
BufferedReader input =
new BufferedReader(new
InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null)
   {
System.out.println("line); //<--
Parse data here.
processList.add(line);
}
input.close();
}
 catch (Exception err)
{
err.printStackTrace();
}
}


But as hackbod said: "that is not something that is part of the SDK
and so you have no guarantees of it working on future releases or
other phones. "

Tauno


On Tue, Oct 28, 2008 at 2:07 PM, Ray Bellis <[EMAIL PROTECTED]> wrote:
>
> Is there any way to access the system properties (as listed by
> "getprop") from within Java on Android?
>
> thanks,
>
> Ray
>
> >
>

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



[android-developers] Re: ArrayAdapter

2008-10-29 Thread tauntz

Try notifyDataSetChanged() - it has no documentation but it seems to
do what you want.

Tauno

On Tue, Oct 28, 2008 at 9:21 PM, Emery <[EMAIL PROTECTED]> wrote:
>
> How does the ArrayAdapter know when the array has been modified? I am
> using my own adapter, and I want to add items as they come in while
> asynchronously updating the ListView displaying 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



Re: [android-developers] Re: i want to control speed "ellipsize=marquee"

2010-02-10 Thread tauntz
There you go http://code.google.com/p/android/issues/detail?id=6567


On Wed, Feb 10, 2010 at 4:46 AM, taehun zzang  wrote:
> Thank you so much.:)
>
> On Feb 10, 11:35 am, Romain Guy  wrote:
>> This is not possible at the moment.
>>
>> On Tue, Feb 9, 2010 at 6:04 PM, taehun zzang  wrote:
>> > i use android:ellipsize="marquee"
>> > but just same speed.
>>
>> > how can i control this one?
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  All such questions should be posted on
>> public forums, where I and others can see and answer them
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: GridView: how to select, programmatically?

2008-10-06 Thread tauntz

I haven't tried it myself but you could try android:focusableInTouchMode.
>From dox: "Boolean that controls whether a view can take focus while
in touch mode. If this is true for a view, that view can gain focus
when clicked on, and can keep focus if another view is clicked on that
doesn't have this attribute set to true. "

Tauno

On Mon, Oct 6, 2008 at 11:25 PM, Romain Guy <[EMAIL PROTECTED]> wrote:
>
> > Related question: is there a way for an activity to request to switch
> > out of touch mode? For demonstration purposes, I suspect my client would
> > like a safety net in case they forget and click on the activity with the
> > mouse in the emulator by mistake.
>
> There's no such switch that I know of. But why would your application
> rely on this?
>
> --
> Romain Guy
> www.curious-creature.org
>
> >

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



[android-developers] Re: [Timing] How to measure time interval for certain process?

2008-10-21 Thread tauntz

I'm not sure that I understand your question correctly but if you want
to measure a time interval in "real time" (eg in ms) then go for
android.os.SystemClock.uptimeMillis() or
android.os.SystemClock.elapsedRealtime() not
System.currentTimeMillis()

android.os.SystemClock.uptimeMillis() - milliseconds since the system
was booted. The time is not incremented while the CPU sleeps.
android.os.SystemClock.elapsedRealtime() - milliseconds since the
system was booted including time spent in sleep state.

You should not rely on System.currentTimeMillis(). From the
documentation "The wall clock can be set by the user or the phone
network (see setCurrentTimeMillis(long)), so the time may jump
backwards or forwards unpredictably".

See http://code.google.com/android/reference/android/os/SystemClock.html
for more info.


If you want to measure how long a process is running then go for
android.os.Process.getElapsedCpuTime() - "Returns elapsed milliseconds
of the time this process has run."
If you want to measure how long a Thread has been running, then go for
android.os.SystemClock.currentThreadTimeMillis() - "Returns
milliseconds running in the current thread."
(I haven't tried the last two myself)

Tauno


On Mon, Oct 20, 2008 at 3:53 PM, Andy Quan <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> Anybody knows how to measure time interval for certain process rather
> than CPU elapsed time?
>
> I have noticed there is a class named "android.os.SystemClock", but
> according to its description, it is for CPU timing. And what if I want
> to measure CPU cost of applications like MediaPlayer?
>
> I'd appreciate if there is any comment
>
> Thanks,
> Andy
>
> >
>

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



[android-developers] Re: setting the locale

2008-10-21 Thread tauntz

java.util.Locale.setDefault(Locale locale);
But I have no idea to what extent this setting works..


Another approach is to start the activity that allows to select the
locale but I don't think there is such an Activity in the emulator.
http://code.google.com/android/reference/android/provider/Settings.html -
"ACTION_LOCALE_SETTINGS - Activity Action: Show settings to allow
configuration of locale."

Anyone more familiar with this?

Tauno

On Tue, Oct 21, 2008 at 6:06 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Is there a way to do this? I'd like to test some of my i18n code.
> >
>

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



[android-developers] Re: Android Source Code Now Available

2008-10-21 Thread tauntz

Good news! Congratulations Android team!

Just a note about the release:
This source code (looking at tag android-1.0 or head release-1.0) is
clearly not the one that the 1.0r1 SDK uses. There are countless
methods/classes in the source that are not present in the 1.0r1 SDK
release (for example:
android.provider.Contacts.ContactMethods.lookupProviderCategoryFromId(..)
etc..)

So that leads me to the following questions:
1) what version of the code (1.0r1 or the one that was just released
or some other variant) is on the G1?
2) when will we have access to the new SDK? (yes, I know I could
compile it myself from the source but I'm talking about compiled
binaries on http://code.google.com/android/download.html)

hackbod?


Tauno

On Tue, Oct 21, 2008 at 6:36 PM, Timbobsteve <[EMAIL PROTECTED]> wrote:
>
> Congratulations to the Android Development team, Google Employees and
> the entire OpenSource community. Today is a great day for developers who
> enjoy freedom and developing with freedom in mind.
>
> Viva 'la Android!
>
> Al Sutton wrote:
>> http://source.android.com/
>>
>> For those that missed the announcements.
>>
>> Al.
>> http://andappstore.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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android Source Code Now Available

2008-10-21 Thread tauntz

Ok, understood, these methods are non-public and reserved for Google
applications only ;)

Would it be imaginable that (some time in the future) all non-public
APIs are in the com.google* domain and not in the same domain as all
the public classes (android.*)?
Currently it's a little confusing if I look at the source of some
Google app and see that it uses (for example) the method
lookupProviderCategoryFromId(..) from the class
android.provider.Contacts.ContactMethods. Now the public API has a
class with the exact same name and package but without the method that
Google uses so I always have to manually check if a method or constant
exists in the public API documentation when looking through the source
code (and after that I have to check if it also exists in the real SDK
since the SDK and the API documentation are also not the same). It
would be much easier if public and non-public stuff is in separate
packages (like com.sun.* in instead of java.* (J2SE)).
Just my 2 cents..


And congrats again to the team! :)
Tauno



On Tue, Oct 21, 2008 at 8:27 PM, hackbod <[EMAIL PROTECTED]> wrote:
>
> And further than that, people writing third party applications MUST
> develop them against the SDK, not against the open source release.
> Otherwise you can easily use non-public APIs, and thus break in a
> future release.
>
> On Oct 21, 10:14 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
>> It is the same source code. The SDK contains only the public APIs.
>>
>>
>>
>> On Tue, Oct 21, 2008 at 10:12 AM, tauntz <[EMAIL PROTECTED]> wrote:
>>
>> > Good news! Congratulations Android team!
>>
>> > Just a note about the release:
>> > This source code (looking at tag android-1.0 or head release-1.0) is
>> > clearly not the one that the 1.0r1 SDK uses. There are countless
>> > methods/classes in the source that are not present in the 1.0r1 SDK
>> > release (for example:
>> > android.provider.Contacts.ContactMethods.lookupProviderCategoryFromId(..)
>> > etc..)
>>
>> > So that leads me to the following questions:
>> > 1) what version of the code (1.0r1 or the one that was just released
>> > or some other variant) is on the G1?
>> > 2) when will we have access to the new SDK? (yes, I know I could
>> > compile it myself from the source but I'm talking about compiled
>> > binaries onhttp://code.google.com/android/download.html)
>>
>> > hackbod?
>>
>> > Tauno
>>
>> > On Tue, Oct 21, 2008 at 6:36 PM, Timbobsteve <[EMAIL PROTECTED]> wrote:
>>
>> >> Congratulations to the Android Development team, Google Employees and
>> >> the entire OpenSource community. Today is a great day for developers who
>> >> enjoy freedom and developing with freedom in mind.
>>
>> >> Viva 'la Android!
>>
>> >> Al Sutton wrote:
>> >>>http://source.android.com/
>>
>> >>> For those that missed the announcements.
>>
>> >>> Al.
>> >>>http://andappstore.com/
>>
>> --
>> Romain Guywww.curious-creature.org
> >
>

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



[android-developers] Re: Android Source Code Now Available

2008-10-22 Thread tauntz

On Tue, Oct 21, 2008 at 11:01 PM, hackbod <[EMAIL PROTECTED]> wrote:
>
> On Oct 21, 11:10 am, tauntz <[EMAIL PROTECTED]> wrote:
>> Ok, understood, these methods are non-public and reserved for Google
>> applications only ;)
>
> NO.  They are private to the SYSTEM.  They are not for application
> use.  This is because they are not stable and change across releases.
> There may be some applications in the source tree using them, but
> these applications are only shipped as part of the system image, so
> that is okay.  In other words, if you use private APIs, you can -only-
> distribute the resulting app by having a carrier bundle it with a
> phone.

I think I have a wrong understanding of SYSTEM and APPLICATIONS then :/
I always thought that (for example) the Contacts thingie is an
application and NOT a system component. But you are saying that these
methods and classes are NOT for application use.. but the Contacts
thingie uses them ergo the Contacts thingie is a system component and
not an Application that is equal to all other apps that everybody else
can create.

One of Androids main promises is that "Any app on the mobile device
can be replaced or extended -- even core components such as the dialer
or home." Now word-for-word this holds true - I can replace the
Contacts system component with a self-made Contacts application
(AFAIK.. correct me if I'm wrong)  but my replacement will always be
inferior to the Google created one because it has no access to the
various APIs that the Google created Contacts thingie has.

Sure, I understand why you don't give the same permissions to third
party apps like (for example) the Google marketplace has. (OK, in a
perfect world it SHOULD be the users choice what apps he wants to
install on his own phone.. and phone/OS manufacturers should not
restrict his/her choice based on what they think the user wants) But
currently you are using some harmless private APIs in your own
applications that ship with the device and denying access to the same
functionality/integration to other apps.

Don't get me wrong, I don't want to start a flamewar or anything like
that. It's just that I want the same integration with the system as
Google created applications have (to a reasonable extent of course..
I'm not talking about functionality that can compromise security etc).
I hope that's not too much to ask.


>> Would it be imaginable that (some time in the future) all non-public
>> APIs are in the com.google* domain and not in the same domain as all
>> the public classes (android.*)?
>
> We have been migrating private APIs to the com.android.internal
> packages, but it will NEVER be the case that everything under
> android.* is public.  Never, ever.  Just link to the SDK, which is
> guaranteed to only contain the supported public APIs, and you are
> good.

Nice to hear that you are cleaning the house (:


>> Currently it's a little confusing if I look at the source of some
>> Google app and see that it uses (for example) the method
>> lookupProviderCategoryFromId(..) from the class
>> android.provider.Contacts.ContactMethods. Now the public API has a
>> class with the exact same name and package but without the method that
>> Google uses so I always have to manually check if a method or constant
>> exists in the public API documentation when looking through the source
>> code (and after that I have to check if it also exists in the real SDK
>> since the SDK and the API documentation are also not the same). It
>> would be much easier if public and non-public stuff is in separate
>> packages (like com.sun.* in instead of java.* (J2SE)).
>
> Yes, a lot of the bundle apps shipped with the system are using
> private APIs, and this needs to be cleaned up.  This is mostly an
> artifact of the apps being developed in parallel with the platform for
> the last 2-3 years, and not having time to do a final cleanup of them
> to switch to the public APIs.  This is something that needs to be
> done.
>
> Again, if you are doing third party app development, you really need
> to be developing against the SDK.  That is what it is there for.

Finally.. someone from Google saying that not all apps are created
equal. There are Google apps that can do whatever they want to do and
then there are third party apps that can only do what Google allows
them to do. And that's perfectly fine.. that's exactly how all other
phone OSs work. It's just that some people have currently the wrong
impression that you can create applications on Android that can do
*anything* and if they see an application bundled with the system,
they have the impression that they can have an app with the exact same
functionality/system integration.

It's good that you are trying to impro

[android-developers] Re: Android Source Code Now Available

2008-10-22 Thread tauntz

Thanks for clearing things up! :)


On Wed, Oct 22, 2008 at 10:40 AM, hackbod <[EMAIL PROTECTED]> wrote:
>
> On Oct 22, 12:15 am, tauntz <[EMAIL PROTECTED]> wrote:
>> I think I have a wrong understanding of SYSTEM and APPLICATIONS then :/
>> I always thought that (for example) the Contacts thingie is an
>> application and NOT a system component. But you are saying that these
>> methods and classes are NOT for application use.. but the Contacts
>> thingie uses them ergo the Contacts thingie is a system component and
>> not an Application that is equal to all other apps that everybody else
>> can create.
>>
>> One of Androids main promises is that "Any app on the mobile device
>> can be replaced or extended -- even core components such as the dialer
>> or home." Now word-for-word this holds true - I can replace the
>> Contacts system component with a self-made Contacts application
>> (AFAIK.. correct me if I'm wrong)  but my replacement will always be
>> inferior to the Google created one because it has no access to the
>> various APIs that the Google created Contacts thingie has.
>
> I already explained this in the rest of my previous reply.  Yes, many
> of the current system applications use private APIs, because they have
> been under development for a long time (well before the first SDK
> release) in parallel with the platform, and it hasn't been possible to
> keep them up on the official APIs as the platform was being cleaned
> up.  (Not to mention that we didn't even have a way to link against an
> SDK that didn't contain private symbols until the 1.0 release, so it
> is very easy to accidentally use private APIs.)
>
> There should be nothing the regular built-in apps do that you can't do
> in your own apps, except for some carefully considered scenarios, such
> as dialing an emergency phone number or directly installing an app
> without user intervention.  If you find something an app is doing that
> you truly can't do with the SDK (not that it is just using some
> convenience class that is part of the system that isn't ready for
> public use), then please file a bug about it.  Or hell, submit a patch
> to make that feature available with a good SDK API.
>
>> Sure, I understand why you don't give the same permissions to third
>> party apps like (for example) the Google marketplace has. (OK, in a
>> perfect world it SHOULD be the users choice what apps he wants to
>> install on his own phone.. and phone/OS manufacturers should not
>> restrict his/her choice based on what they think the user wants)
>
> It IS the choice of the user about what apps he wants to install.  If
> you don't want to use the market, you can install them yourself with a
> web browser or something else that invokes the system installer.  This
> is a non-issue.
>
>> But
>> currently you are using some harmless private APIs in your own
>> applications that ship with the device and denying access to the same
>> functionality/integration to other apps.
>>
>> Don't get me wrong, I don't want to start a flamewar or anything like
>> that. It's just that I want the same integration with the system as
>> Google created applications have (to a reasonable extent of course..
>> I'm not talking about functionality that can compromise security etc).
>> I hope that's not too much to ask.
>
> Any APIs that have been hidden in the SDK have been explicitly done so
> because they will not be maintained in future releases.  For the one
> specific instance I think you have brought up -- groups in contacts --
> I am pretty sure this was a very last-minute addition, so we were able
> to get the feature in to the 1.0 product but not in a way that could
> be supported as part of the SDK.  Doing a product presents these kinds
> of challenges: do we do the feature but not make it available in the
> SDK, or just not do the feature at all?  I think it was much better to
> have this feature for the product than not.  There is nothing
> malicious about this, it's just a simple fact that making something
> that can be supported forever is a public API is usually a lot more
> effort than just implementing the feature for internal use.
>
>> > Again, if you are doing third party app development, you really need
>> > to be developing against the SDK.  That is what it is there for.
>> Finally.. someone from Google saying that not all apps are created
>> equal. There are Google apps that can do whatever they want to do and
>> then there are third party apps that can only do what Google allows
>> them to do. And that's perfect

[android-developers] Re: Android Source Code Now Available

2008-10-24 Thread tauntz

They are all in the platform/frameworks/base.git @ http://android.git.kernel.org

Specifically:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/provider/Sync.java
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/java/android/speech/recognition
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/java/com/android/internal

Tauno

On Fri, Oct 24, 2008 at 11:54 AM, Zhihong GUO <[EMAIL PROTECTED]> wrote:
> Hi hackbod,
> Where can I find the code of these packages:
> android.provider.Sync
> android.speech.recognition
> com.android.internal
>
> or they will not open?
> 2008/10/21 Al Sutton <[EMAIL PROTECTED]>
>>
>> http://source.android.com/
>>
>> For those that missed the announcements.
>>
>> Al.
>> http://andappstore.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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Question about built-in content providers

2009-10-21 Thread tauntz

In 1.5 and 1.6 the following code snippet works:
---
import android.provider.Contacts;
import android.provider.Contacts.People;

ContentValues values = new ContentValues();
values.put(Contacts.ExtensionsColumns.NAME, "name");
values.put(Contacts.ExtensionsColumns.VALUE, "value");
Uri personUri = ContentUris.withAppendedId(People.CONTENT_URI, 1);
Uri personExtensionUri = Uri.withAppendedPath(personUri,
People.Extensions.CONTENT_DIRECTORY);
getContentResolver().insert(personExtensionUri, values);
---

Can we rely on the fact that the same URIs will be handled by the
built-in content providers also in future versions/devices or is there
a possibility that some of them do not support it by throwing a
UnsupportedOperationException ( Unknown uri: ... )? The documentation
for content providers says that: "Android ships with a number of
content providers for common data types (audio, video, images,
personal contact information, and so on). You can see some of them
listed in the android.provider package." Does that mean that
everything that is under android.provider.* has to be supported by all
future Android versions/devices?


Tauno

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

2009-10-21 Thread tauntz

I understand that people can rip it apart and do whatever with it so
my main concern is about "official" android releases.

Can someone from Google comment if the support for all built in
content providers is a requirement for being able to run Android
Market or is this part not regulated? I'm asking because when I'm
developing an app that will be published on the Android Market, do I
have to design for all cases where a particular built-in content
provider (or part of it) is not supported?


Tauno

On Wed, Oct 21, 2009 at 4:03 PM, Mark Murphy  wrote:
>
> tauntz wrote:
>> In 1.5 and 1.6 the following code snippet works:
>> ---
>> import android.provider.Contacts;
>> import android.provider.Contacts.People;
>>
>> ContentValues values = new ContentValues();
>> values.put(Contacts.ExtensionsColumns.NAME, "name");
>> values.put(Contacts.ExtensionsColumns.VALUE, "value");
>> Uri personUri = ContentUris.withAppendedId(People.CONTENT_URI, 1);
>> Uri personExtensionUri = Uri.withAppendedPath(personUri,
>> People.Extensions.CONTENT_DIRECTORY);
>> getContentResolver().insert(personExtensionUri, values);
>> ---
>>
>> Can we rely on the fact that the same URIs will be handled by the
>> built-in content providers also in future versions/devices or is there
>> a possibility that some of them do not support it by throwing a
>> UnsupportedOperationException ( Unknown uri: ... )? The documentation
>> for content providers says that: "Android ships with a number of
>> content providers for common data types (audio, video, images,
>> personal contact information, and so on). You can see some of them
>> listed in the android.provider package." Does that mean that
>> everything that is under android.provider.* has to be supported by all
>> future Android versions/devices?
>
> "Has to" is a strong expression.
>
> Remember that Android is open source, and therefore device manufacturers
> can do what they want. Those having the Android Market on-device are
> held to a higher compatibility standard, but there may be holes in the
> testing process.
>
> Many devices will support the standard content providers with the
> standard URLs and projections. I'll even go out on a limb and say that
> most devices will do that. I'll be fairly surprised if all devices do
> that, though.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_
> Version 1.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: Question about built-in content providers

2009-10-22 Thread tauntz

So the specific case mentioned in my first post is not guaranteed to
work since it's mixing stuff in a way that just happens to work on
some devices? If so, then what's the correct way of adding extensions
to persons? (haven't found any examples that are dealing with person
extensions so it's hard to tell which way of doing it is the correct
way)

Tauno

On Wed, Oct 21, 2009 at 8:27 PM, Dianne Hackborn  wrote:
> Yes, the definitions in android.provider are in the SDK, so must be
> supported. I guess you could use them to build things that are invalid my
> mixing columns from one URI with another URI, that may happen to work, but
> if you follow the straight-forward definitions there you are using the SDK
> and thus supported APIs.
>
> On Wed, Oct 21, 2009 at 5:53 AM, tauntz  wrote:
>>
>> In 1.5 and 1.6 the following code snippet works:
>> ---
>> import android.provider.Contacts;
>> import android.provider.Contacts.People;
>>
>> ContentValues values = new ContentValues();
>> values.put(Contacts.ExtensionsColumns.NAME, "name");
>> values.put(Contacts.ExtensionsColumns.VALUE, "value");
>> Uri personUri = ContentUris.withAppendedId(People.CONTENT_URI, 1);
>> Uri personExtensionUri = Uri.withAppendedPath(personUri,
>> People.Extensions.CONTENT_DIRECTORY);
>> getContentResolver().insert(personExtensionUri, values);
>> ---
>>
>> Can we rely on the fact that the same URIs will be handled by the
>> built-in content providers also in future versions/devices or is there
>> a possibility that some of them do not support it by throwing a
>> UnsupportedOperationException ( Unknown uri: ... )? The documentation
>> for content providers says that: "Android ships with a number of
>> content providers for common data types (audio, video, images,
>> personal contact information, and so on). You can see some of them
>> listed in the android.provider package." Does that mean that
>> everything that is under android.provider.* has to be supported by all
>> future Android versions/devices?
>>
>>
>> Tauno
>>
>>
>
>
>
> --
> 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] Receive Binary SMS on a specific port?

2010-03-18 Thread tauntz
Listen to android.intent.action.DATA_SMS_RECEIVED instead of
android.provider.Telephony.SMS_RECEIVED. This will give you all data
SMS messages. Now you have to parse the destination port out of the
raw PDU to determine if the SMS was for the specific port that you are
interested in (there's a method for doing that but that's not in the
public API for some reason so for now, you have to manually parse the
PDU)

Tauno

On Thu, Mar 18, 2010 at 6:04 PM, timo prill  wrote:
> hey there,
>
> is it possible to receive a binary SMS on a specific port?
>
> i am currently receiving SMS via Action:
> "android.provider.Telephony.SMS_RECEIVED" from a BroadcastReceiver. But i
> have no luck with binary SMS. I only get notified for text messages.
>
> any suggestions?
>
> cheers
> timo
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Forcibly using 3G or CDMA network even though wi-fi is available.

2010-01-15 Thread tauntz
Apps that need to route all client-server communication through the
operator infrastructure. One reason for this is that for example for
client-> server HTTP requests, the operator will add various
parameters to the request (like subscriber ID/name/phone
number/whatever) so our server side app will know information about
the actual subscriber who is making the request. Another reason is
operator billing - if the request from client -> server goes through
the operator servers (eg over 2g/3g), the subscriber can be
automatically billed for the services that he uses (so the cost of
whatever services the user uses, will automatically show up on his/her
phone bill.. more specifically - an app that has a "buy" button and
when pressing it, a request is made through the operator servers to
the app provider servers and the user gets the content from the app
provider and the cost is added to the phone bill by the operator. For
this to work, the request MUST go over 2g/3g )

Currently the only solution for these kind of applications is to
present the user a dialog "Please turn off WiFi if you want to use
this application" and that's not really nice from the users point of
view :(

Tauno

On Thu, Jan 14, 2010 at 8:07 PM, Dianne Hackborn  wrote:
> Sorry, I don't believe you can.  Why do you want to do this?
>
> On Thu, Jan 14, 2010 at 12:39 AM, Dongjoon Lee  wrote:
>>
>> Hello.
>>
>> My question is, as you can see the title, can i use 3g network even
>> though wi-fi is available?
>> i heard wi-fi priority is higher than 3g or cdma. can i change that
>> priority in specific application?
>> this is one of requirement of the project. if anybody has an answer,
>> plz help me.
>>
>> thanks in advance.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> 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] Re: EditText Bug?

2009-08-19 Thread tauntz

Smells like a bug to me. It's already in the issue tracker and you can
"vote" for it there:
http://code.google.com/p/android/issues/detail?id=2771

Tauno

On Wed, Aug 19, 2009 at 3:05 PM, Chirag Patel wrote:
>
> Yep that was one of the first things I tried. Doesn't seem to work, I
> see the same behaviour as before
>
> On Aug 19, 1:01 pm, Sujay Krishna Suresh 
> wrote:
>> try using setClickabe(false);
>>
>> On Wed, Aug 19, 2009 at 5:29 PM, Chirag Patel  wrote:
>>
>> > Hi has anyone else experienced this behaviour:
>>
>> > I have a simple EditText field in one of my Activities. If I set the
>> > field to disabled, it greys out and I cannot enter text with the
>> > hardware keyboard, however when I touch the field the virtual keyboard
>> > appears and that still lets me enter text. Is this a bug? Any
>> > workarounds for making sure this can't happen?
>>
>> > Cheers
>> > Chirag
>>
>> --
>> Regards,
>> Sujay
>> Mike Ditka   -
>> "If God had wanted man to play soccer, he wouldn't have given us arms."
> >
>

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