Sunday, August 1, 2010

Re: [android-developers] Launching Calendar in AgendaView

On Sun, Aug 1, 2010 at 4:49 PM, { Devdroid } <webnet.android@gmail.com> wrote:
> Is there working way of launching Calendar app in Agenda View beside
> setClassName("com.android.calendar","com.android.calendar.AgendaView");
> which seem to work on 2.1 but people on earlier versions report it
> does not and also Froyo reports
>
> Unable to find explicit activity class
> {com.android.calendar/com.android.calendar.AgendaActivity}; have you
> declared this activity in your AndroidManifest.xml?
>
> I checked git repo and AgendaActivity is exported. Hints?

The Calendar application is not part of the Android SDK. Your
application may break on some devices that have replaced the Calendar.
Your application may break in future versions of Android. You appear
to be already experiencing this.

Hence, my "hint" is: don't integrate with the calendar application,
until such point in time as they provide documented, supported, stable
Intents for doing so.

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

Android 2.2 Programming Books: http://commonsware.com/books

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

Re: [android-developers] Re: Android preprocessor, //#ifdef...

It's not a feature of the language, nor of Android, it's just part of
any sane Java compiler. I have yet to come across one that doesn't do
it. The Sun (Oracle) Java compiler in particular does it. The Eclipse
compiler does it as well. You can test for yourself with your compiler
by compiling a simple class like this one:

class Test {
private static final boolean DEBUG = false;

public void foo() {
if (DEBUG) System.out.println("Debug mode");
System.out.println("Normal mode");
}
}

Then decompile it using javap -c Test:

class Test extends java.lang.Object{
Test();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return

public void foo();
Code:
0: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
3: ldc #3; //String Normal mode
5: invokevirtual #4; //Method
java/io/PrintStream.println:(Ljava/lang/String;)V
8: return
}

You can see that the if (DEBUG) statement was not compiled in the
foo() method. If you were to compile with DEBUG set to true, you'd see
that the call to System.out.println is compiled, but the if is not.

On Sun, Aug 1, 2010 at 1:12 PM, RichardC <richard.critten@googlemail.com> wrote:
> Thank you, that's going to make my life easier.
>
> As I am still learning Java, can you tell me if the removal of "dead
> code" is a feature of the Java language or is it unique to the Android
> build chain?
>
> On Aug 1, 8:50 pm, Romain Guy <romain...@android.com> wrote:
>> > I have had to learn to live without conditional compliation.  The only
>> > area where I really miss having a lanugage constuct like "#ifdef" is
>> > when I need to remove instrumentation and/or debugging code.
>>
>> You can achieve this in Java using static final fields. The compiler
>> is smart enough to remove if block whose condition evaluates to false
>> at compile time (we use this a lot in Android's source code :).
>>
>> --
>> 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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

--
Romain Guy
Android framework engineer
romainguy@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Launching Calendar in AgendaView

Hi,

Is there working way of launching Calendar app in Agenda View beside
setClassName("com.android.calendar","com.android.calendar.AgendaView");
which seem to work on 2.1 but people on earlier versions report it
does not and also Froyo reports

Unable to find explicit activity class
{com.android.calendar/com.android.calendar.AgendaActivity}; have you
declared this activity in your AndroidManifest.xml?

I checked git repo and AgendaActivity is exported. Hints?

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

[android-developers] Re: finish() at onStop causes ANR

It is true that the documentation does not specifically forbid calling
finish() from onStop(). But then what documentation does document ALL
the things you are not supposed to do? None that I know of.

Still, I have to suspect that TreKing is right, even if the
documentation does not clearly support him. This is because it is
really too clear that yours is an unexpected usage. Very unexpected.
Normally, one would never bother calling finish() from onStop(), since
1) that part of lifecycle management is already handled by the system,
which does well enough and 2) finish() does the same thing as pressing
the Back key, which of course can only happen while the Activity is in
the Foreground Process. Yet you are calling the finish() API from the
Background Process.

Again, this is no proof that it is wrong, just a strong indicator. But
that together with what you already showed, that the ANR happens from
mKeyWaiter implies that finish() really was expecting to still have
user input focus, which no Background Process has.

On Jul 31, 7:30 pm, James Wang <jameswangc...@gmail.com> wrote:
> @TreKing
> Thanks for your replies. We do have some reasons to call finish
> because Android did not finish one when another is shown before it.>Probably, but with your code, not Android.
>
> Document does not say finish is not allowed to be called at onStop.
> How to explain there is no problem with calling finish just after
> startActivity.
>
> @Dianne
> Thanks for your replies. We do believe it is a problem with framework.
> WindowManagerService.java:
>
>     private int dispatchPointer(QueuedEvent qev, MotionEvent ev, int
> pid, int uid) {
>         if (DEBUG_INPUT || WindowManagerPolicy.WATCH_POINTER)
> Log.v(TAG,
>                 "dispatchPointer " + ev);
>
>         if (MEASURE_LATENCY) {
>             lt.sample("3 Wait for last dispatch ", System.nanoTime() -
> qev.whenNano);
>         }
>
>         Object targetObj = mKeyWaiter.waitForNextEventTarget(null,
> qev,
>                 ev, true, false, pid, uid);
>
> When calling finish() after startActivity,
> mKeyWaiter.waitForNextEventTarge returns activity A. And after
> checking A.isVisibleLW(), the key up event is discarded successfully.
>
> When calling finish() at onStop, ANR happens in
> mKeyWaiter.waitForNextEventTarge and it is seems never get out.
>
> James

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

[android-developers] Re: Android preprocessor, //#ifdef...

Thank you, that's going to make my life easier.

As I am still learning Java, can you tell me if the removal of "dead
code" is a feature of the Java language or is it unique to the Android
build chain?

On Aug 1, 8:50 pm, Romain Guy <romain...@android.com> wrote:
> > I have had to learn to live without conditional compliation.  The only
> > area where I really miss having a lanugage constuct like "#ifdef" is
> > when I need to remove instrumentation and/or debugging code.
>
> You can achieve this in Java using static final fields. The compiler
> is smart enough to remove if block whose condition evaluates to false
> at compile time (we use this a lot in Android's source code :).
>
> --
> 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [id-android] WTI: Galaxy S, Peniru Sekaligus Pembunuh iPhone

Tergantung seberapa lambat anda set settingan prosesornya si milestone wahahahaha.

Kalo di oc ke 1.2 sih ga kalah tuh wkwkkw test quadrant aja

Powered by Telkomsel BlackBerry®


From: SandyPH <sandyph@gmail.com>
Sender: id-android@googlegroups.com
Date: Sun, 1 Aug 2010 22:55:25 +0800
To: <id-android@googlegroups.com>
ReplyTo: id-android@googlegroups.com
Subject: Re: [id-android] WTI: Galaxy S, Peniru Sekaligus Pembunuh iPhone

walah, kalo yang 3 kali lebih cepet dibanding Desire aja dibilang not fast enough , milestone jadinya selambat apa yah ? :D

2010/8/1 Renner Chen <rc.milestone@gmail.com>

Menang Di super amoled...
Hmmm pelototin aja terus tuh display Hueheheh Emang kaga mau dipake? Not fast enough :-)

--rc
NexusOne with Radio FM & Froyo senseUI
> android.nyet.not@anjroid.net

> Terharu... ternyata Oom Yop masih sayang sama NexusOne..

>
> ..dikirim sama si Nexus ála FroYo Rodriguez
>
> On Jul 31, 2010 10:01 PM, "yopie suryadi" <yopie@anjroid.net> wrote:
>> Berbanggalah pemilik nexus one.
>> Karena kalo ga ada nexus itu petinggi samsung ga akan bisa berbacot
> seperti itu....
>>
>>
>> @yopiesuryadi
>> www.prajna-enterprise.com
>>
>> -----Original Message-----
>> From: "Ocky Yonathan" <ockyasli@gmail.com>
>> Sender: id-android@googlegroups.com
>> Date: Sat, 31 Jul 2010 14:58:49
>> To: <id-android@googlegroups.com>
>> Reply-To: id-android@googlegroups.com
>> Subject: Re: [id-android] WTI: Galaxy S, Peniru Sekaligus Pembunuh iPhone
>>
>> Setubuh Om!
>>
>>
>> Ocky Yonathan
>> [create] [share] [collaborate]
>> ockyyonathan@yahoo.com
>>
>> -----Original Message-----
>> From: "yopie suryadi" <yopie@anjroid.net>
>> Sender: id-android@googlegroups.com
>> Date: Sat, 31 Jul 2010 14:35:12
>> To: Idandroid<id-android@googlegroups.com>
>> Reply-To: id-android@googlegroups.com
>> Subject: Re: [id-android] WTI: Galaxy S, Peniru Sekaligus Pembunuh iPhone
>>
>> Mirip kok malah bangga...
>> Ini aneh banget...
>> Bangga kalo jadi pioneer dong...jangan follower...
>>
>>
>> @yopiesuryadi
>> www.prajna-enterprise.com
>>
>> -----Original Message-----
>> From: Agus Hamonangan <id.android@gmail.com>
>> Sender: id-android@googlegroups.com
>> Date: Wed, 28 Jul 2010 20:52:01
>> To: <id-android@googlegroups.com>
>> Reply-To: id-android@googlegroups.com
>> Subject: [id-android] WTI: Galaxy S, Peniru Sekaligus Pembunuh iPhone
>>
>> *Jakarta* - Banyak orang berkomentar bahwa Samsung Galaxy S memiliki
> bentuk
>> yang mirip iPhone atau lazim disebut 'iPhone Wannabe'. Samsung memang
>> mengiyakan hal tersebut, namun mereka juga menyebut Galaxy S merupakan
>> 'iPhone Killer'.
>>
>> Hal itu dijelaskan Pambudi B. Sudirman, Brand Manager Samsung Galaxy S,
> yang
>> merangkap sebagai Product Marketing Aplikasi Samsung, di sela-sela Media
>> Workshop Samsung Galaxy S bertempat di Hotel Shangrila, Rabu (28/7/2010).
>>
>> "Iya, memang banyak orang mengatakan Galaxy S meniru iPhone. Saat dibilang
>> Galaxy S merupakan 'iPhone Wannabe', setidaknya di mindset konsumen sudah
>> tertanam bahwa iPhone kini punya saingan," paparnya.
>>
>> Ia pun menambahkan, bahkan salah satu media terkemuka di luar negeri
> memberi
>> judul besar pada artikelnya bahwa Galaxy S merupakan '*iPhone Wannab*e'.
>> "Dengan segala keunggulannya itu, (Galaxy S) malah bisa dibilang *iPhone
>> Killer*," tambah Pambudi kepada *detikINET*.
>>
>> Dijelaskan oleh Pambudi, teknologi display Super Amoled milik Galaxy S
>> membuat ponsel lain (seperti iPhone) terasa buram. Belum lagi ponsel ini
>> hadir dengan layar yang lebih besar, lebih terang dan bobot lebih ringan
>> serta tipis ketimbang iPhone.
>>
>> Sebagai informasi, Samsung Galaxy S yang dibanderol seharga Rp 6,5 juta,
>> saat ini dipaket secara eksklusif dengan operator Telkomsel, dengan paket
>> data 500 MB selama enam bulan.
>> * ( fw / rns ) *
>>
>>
> http://www.detikinet.com/read/2010/07/28/180423/1408785/317/galaxy-s-peniru-sekaligus-pembunuh-iphone/?i991101105
>>
>> --
>> Salam,
>>
>>
>> Agus Hamonangan
>>
>> http://groups.google.com/group/id-android
>> http://groups.google.com/group/id-gtug
>> Gtalk : agus.hamonangan
>> Follow : @agushamonangan
>> E-mail : id.android@gmail.com
>>
>> --
>> "Indonesian Android Community [id-android]"
>>
>> Join: http://groups.google.com/group/id-android/subscribe?hl=en-GB
>> Moderator: id.android@gmail.com
>> ID Android Developer: http://groups.google.com/group/id-android-dev
>> ID Android Surabaya: http://groups.google.com/group/id-android-sby
>> ID Android on FB: http://www.facebook.com/group.php?gid=112207700729
>>
>> --
>> "Indonesian Android Community [id-android]"
>>
>> Join: http://groups.google.com/group/id-android/subscribe?hl=en-GB
>> Moderator: id.android@gmail.com
>> ID Android Developer: http://groups.google.com/group/id-android-dev
>> ID Android Surabaya: http://groups.google.com/group/id-android-sby
>> ID Android on FB: http://www.facebook.com/group.php?gid=112207700729
>>
>> --
>> "Indonesian Android Community [id-android]"
>>
>> Join: http://groups.google.com/group/id-android/subscribe?hl=en-GB
>> Moderator: id.android@gmail.com
>> ID Android Developer: http://groups.google.com/group/id-android-dev
>> ID Android Surabaya: http://groups.google.com/group/id-android-sby
>> ID Android on FB: http://www.facebook.com/group.php?gid=112207700729
>>
>> --
>> "Indonesian Android Community [id-android]"
>>
>> Join: http://groups.google.com/group/id-android/subscribe?hl=en-GB
>> Moderator: id.android@gmail.com
>> ID Android Developer: http://groups.google.com/group/id-android-dev
>> ID Android Surabaya: http://groups.google.com/group/id-android-sby
>> ID Android on FB: http://www.facebook.com/group.php?gid=112207700729
>
> --
> "Indonesian Android Community [id-android]"
>
> Join: http://groups.google.com/group/id-android/subscribe?hl=en-GB
> Moderator: id.android@gmail.com
> ID Android Developer: http://groups.google.com/group/id-android-dev
> ID Android Surabaya: http://groups.google.com/group/id-android-sby
> ID Android on FB: http://www.facebook.com/group.php?gid=112207700729

--
"Indonesian Android Community [id-android]"
 
Join: http://groups.google.com/group/id-android/subscribe?hl=en-GB
Moderator: id.android@gmail.com
ID Android Developer: http://groups.google.com/group/id-android-dev
ID Android Surabaya: http://groups.google.com/group/id-android-sby
ID Android on FB: http://www.facebook.com/group.php?gid=112207700729

[android-developers] Eclipse library project problems

Hi,

I tried to build test library and test app with latest ADT and
Eclispe however Eclipse complains
on each reference I made to library classes from my test app.
This is what I did:

1. created Test Library Android project, marked it as "Library"
(package name "test.library.lib")
2. created Test App project (package "test.library.app") and set it to
use Test Library
3. Test Library got LibActivity class which simply referes to
lib_main.xml layout
4. I defined that activity in Test App manifest file:

       <activity android:name="test.library.lib.LibActivity"
                 android:label="@string/app_name"
                 android:theme="@android:style/Theme.Dialog"
                                 >
           <intent-filter>
               <action android:name="android.intent.action.MAIN" />
               <category android:name="android.intent.category.LAUNCHER" />
           </intent-filter>
       </activity>

The problem is that Eclipse now compains "Class
test.library.lib.LibActivity" does not exists". I also got same
problem when I i.e. create a class in Test App that refers to classes
in library. Import test.library.lib.*; does not help. SDK version is
recent. Target sdk=3 (tried setting to 8, but made no difference)

There's TicTacToe exaple on developer website and it's exactly done
same way, so I am a bit confused What am I doing wrong here?

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