[android-developers] CSS on Android: webkit-transform support

2011-01-18 Thread devi prasad
Hi, I notice that rotate3d on -webkit-transform isn't supported in
Android 2.2 Webkit. Has anyone used these features? I'm curious to
know the official stand on supporting CSS transformations, in general.

regards
dp

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

2011-01-16 Thread devi prasad
Hi, I'm finding out that Android has either disabled or broken
Webkit's -webkit-transform features. I couldn't locate an authentic
documentation from Google about android.webkit and its (broken)
status. Can someone who knows it all throw light and save immense time
that I'm spending testing these things? For example, when I try
rotateZ it behaves like rotateY, while rotateY just doesn't work for
me on Android 2.2 + Nexus One. I have tested rotateY and rotateZ on
Chrome browser and things appear fine there.

So, any official statement on Android's Webkit (in)capabilities?

thanks
dp

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

2010-08-05 Thread devi prasad
Hi,
I'm trying to read the color buffer using OpenGL function
glReadPixels. Since OpenGL ES 2.0 allows RGBA+UNSIGNED_BYTE
combination in glReadPixels, I'm using it to read 480 x 800 pixels on
my Nexus One. I want to save the read pixels as JPEG data.
Bitmap.Config allows ARGB_ and *not RGBA_*, although the
underlying libjpg library has the following definitions:

#ifdef ANDROID_RGB
JCS_RGBA_,  /* red/green/blue/alpha */
JCS_RGB_565 /* red/green/blue in 565 format */
#endif

Why is it that the SDK doesn't expose the RGBA_ config? Any
technical reasons?

At the moment, I'm shifting A and RGB bits to suite
'Bitmap.createBitmap()'. [Bitmap.createBitmap(colorData, width,
height, Bitmap.Config.ARGB_);]
Of course, this is inefficient on large images, especially when I use
large FBOs.

I appreciate suggestions as well as solutions!

thanks
dp

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: OpenGL ES Java binding not supported on Nexus One + Android 2.2?

2010-07-16 Thread devi prasad
alright, it took a good night sleep to correct the embarrassing mistake :)
I forgot to call "setEGLContextClientVersion(2)" in my code!


On Fri, Jul 16, 2010 at 8:41 PM, devi prasad  wrote:
> My Nexus One is updated with Android version 2.2 (build number FRF91).
> However, when I try to use the OpenGL ES Java binding, I see the
> following:
>
> D/libEGL  (15206): loaded /system/lib/egl/libGLES_android.so
> D/libEGL  (15206): loaded /system/lib/egl/libEGL_adreno200.so
> D/libEGL  (15206): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
> D/libEGL  (15206): loaded /system/lib/egl/libGLESv2_adreno200.so
> E/libEGL  (15206): called unimplemented OpenGL ES API
> E/libEGL  (15206): called unimplemented OpenGL ES API
>
> The last two lines are frustrating.
>
> To state the obvious, I have set up my manifest file:
> 
> 
>
> I use GLSurfaceView and have only one line in onDrawFrame:
>        GLES20.glCreateShader(GLES20.GL_VERTEX_SHADER);
>
> What's that I'm really missing something here?
>
> dp
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] OpenGL ES Java binding not supported on Nexus One + Android 2.2?

2010-07-16 Thread devi prasad
My Nexus One is updated with Android version 2.2 (build number FRF91).
However, when I try to use the OpenGL ES Java binding, I see the
following:

D/libEGL  (15206): loaded /system/lib/egl/libGLES_android.so
D/libEGL  (15206): loaded /system/lib/egl/libEGL_adreno200.so
D/libEGL  (15206): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
D/libEGL  (15206): loaded /system/lib/egl/libGLESv2_adreno200.so
E/libEGL  (15206): called unimplemented OpenGL ES API
E/libEGL  (15206): called unimplemented OpenGL ES API

The last two lines are frustrating.

To state the obvious, I have set up my manifest file:



I use GLSurfaceView and have only one line in onDrawFrame:
GLES20.glCreateShader(GLES20.GL_VERTEX_SHADER);

What's that I'm really missing something here?

dp

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


[android-developers] Re: using KeyguardManager for presenting unlock screen

2010-03-13 Thread devi prasad
By any chance, Is this fixed in Android 2.1r1 release? I notice that
there are many commits that mention Keyguard related fixes. I'm
currently building the AOSP sources to verify the behavior in the
emulator.

Some kind of confirmation will be appreciated :)

On Thu, Mar 11, 2010 at 7:34 PM, devi prasad  wrote:
> Hi,
> In my application I want to use KeyguardManager to present the unlock
> screen at required places. I wrote the following code and tested it on
> Google IO phone (Android 1.6) and a Nexus One phone. Although this
> works decently on Nexus one, its behavior is odd at times. Sometimes
> the unlock screen doesn't appear for consecutive runs. It also has
> serious issues with configuration changes. And surprisingly, if I turn
> off the screen and turn it back on, the unlock screen disappears! Of
> course, this happens only in my program, and not in general in the
> phone.
>
> Can someone explain what's wrong with my code? Just FYI, I have tried
> various combinations of disableKeyguard() and reenableKeyguard()
> without much gain.
>
> public class UnlockActivity extends Activity {
>    KeyguardManager mKgm;
>    KeyguardLock mKgl;
>
>   �...@override
>    public void onCreate(Bundle savedInstanceState) {
>        ...
>        mKgm = (KeyguardManager) getSystemService(KEYGUARD_SERVICE);
>        mKgl = mKgm.newKeyguardLock("me");
>   }
>
>    class HandlerCallback implements Handler.Callback {
>        public boolean handleMessage(Message msg) {
>                mKgl.disableKeyguard();
>                mKgm.exitKeyguardSecurely(new OnKeyguardExitResult() {
>                                public void onKeyguardExitResult(boolean 
> success) {
>                                        Log.d("UnlockActivity", "status: " + 
> success);
>                                        mKgl.reenableKeyguard();
>                                }
>                        });
>                return true;
>        }
>    }
>   ...
> }
>
>
> thanks
>

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


[android-developers] using KeyguardManager for presenting unlock screen

2010-03-11 Thread devi prasad
Hi,
In my application I want to use KeyguardManager to present the unlock
screen at required places. I wrote the following code and tested it on
Google IO phone (Android 1.6) and a Nexus One phone. Although this
works decently on Nexus one, its behavior is odd at times. Sometimes
the unlock screen doesn't appear for consecutive runs. It also has
serious issues with configuration changes. And surprisingly, if I turn
off the screen and turn it back on, the unlock screen disappears! Of
course, this happens only in my program, and not in general in the
phone.

Can someone explain what's wrong with my code? Just FYI, I have tried
various combinations of disableKeyguard() and reenableKeyguard()
without much gain.

public class UnlockActivity extends Activity {
KeyguardManager mKgm;
KeyguardLock mKgl;

@Override
public void onCreate(Bundle savedInstanceState) {
...
mKgm = (KeyguardManager) getSystemService(KEYGUARD_SERVICE);
mKgl = mKgm.newKeyguardLock("me");
   }

class HandlerCallback implements Handler.Callback {
public boolean handleMessage(Message msg) {
mKgl.disableKeyguard();
mKgm.exitKeyguardSecurely(new OnKeyguardExitResult() {
public void onKeyguardExitResult(boolean 
success) {
Log.d("UnlockActivity", "status: " + 
success);
mKgl.reenableKeyguard();
}
});
return true;
}
}
   ...
}


thanks

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


[android-developers] testing/understanding weak and strong pointers

2009-06-19 Thread devi prasad
While trying to follow the implementation of weak and strong (smart)
pointers in Android, I created a few code snippets to test my
understanding. I'm sharing a few samples here. I have attached a file
that show the contains of my Android.mk file, source files, commands
to build this sample code, and also the logs.

I'm providing it here believing that there are many like me out there
who'd benefit. Please feel free to provide comments and suggestions.Of
course, one needs to spend some time with RefBase.h and RefBase.cpp to
really appreciate what's going on behind the scene. I'm reserving the
explanations for some other day :)

regards
Devi Prasad

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

---
A C++ source file (without a main function)
---
#define LOG_TAG "smart-ptr-sample"

#include "utils/RefBase.h"
#include "utils/Log.h"

using namespace android;

class Point : public RefBase {
public:
Point(int x, int y) :  mx(x), my(y) {
LOGD("Point constructor");
extendObjectLifetime(OBJECT_LIFETIME_WEAK);
}
virtual ~Point() {
LOGD("Point destructor");
}

virtual void onFirstRef() {
LOGD("first weak ptr ref callback");
}

virtual void onLastStrongRef(const void* id) {
LOGD("last strong ptr ref callback");
}

virtual void onLastWeakRef(const void* id) {
LOGD("last weak ptr ref callback");
}

private:
int mx, my;
};

---
Here's the contents of Android.mk file
---
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

$(info building weak pointer example code)

LOCAL_SRC_FILES:= weakp.cpp

LOCAL_SHARED_LIBRARIES := \
   libutils \
   libcutils

LOCAL_C_INCLUDES += frameworks/base/include system/core/include

LOCAL_MODULE:= weakp

include $(BUILD_EXECUTABLE)

---
  Here's are the instructions to compile and run the code within the emulator
---

I created a folder named "example" within the top directory (i.e., at same 
level as frameworks and external directories), and used the following commands 
to build my samples:

(1) . build/envsetup.sh 
(2) mmm

Then I'd push the resulting executable (using 'adb push') to '/data/app' 
directory and run it from there. Use 'adb logcat' to view the logs.


---
  Here's are a few samples of 'main' function and corresponding logs
---
int main()
{
{
{
wp weakp(new Point(10, 20));

LOGD("weak ptr's lifetime is just about to finish ...\n");
}
LOGD("weak ptr is out of scope.\n");
}

return 0;
}

D/smart-ptr-sample(  731): Point constructor
D/smart-ptr-sample(  731): weak ptr's lifetime is just about to finish ...
D/smart-ptr-sample(  731): last weak ptr ref callback
D/smart-ptr-sample(  731): Point destructor
D/smart-ptr-sample(  731): weak ptr is out of scope.
---

int main()
{
{
{
wp weakp(new Point(10, 20));

weakp.promote();
LOGD("weak ptr's lifetime is just about to finish ...\n");
}

LOGD("weak ptr is out of scope.\n");
}

return 0;
}

D/smart-ptr-sample(  734): Point constructor
D/smart-ptr-sample(  734): first ptr ref callback
D/smart-ptr-sample(  734): last strong ptr ref callback
D/smart-ptr-sample(  734): weak ptr's lifetime is just about to finish ...
D/smart-ptr-sample(  734): last weak ptr ref callback
D/smart-ptr-sample(  734): Point destructor
D/smart-ptr-sample(  734): weak ptr is out of scope.

---

int main()
{
{
sp strp;

{
wp weakp(new Point(10, 20));

strp = weakp.promote();
LOGD("weak ptr's lifetime i

[android-developers] targeting custom-android 1.5 to dev phone

2009-05-15 Thread devi prasad

hi, I have a custom build of android-1.5_r1 code, where I have made a
few modifications to AudioFlinger.I want to flash this build to my dev
phone. Can someone guide me in "building for dream"? After reading
through various posts, I'm somewhat confused about the overall state
of this process.

thanks a lot.

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



[android-developers] Re: Android Dev Phone 1 activation Problem

2009-05-13 Thread devi prasad

Hi, I'm also facing a similar problem with Airtel SIM in India.I get
the following error message:

"There is a problem communicating with the Google Servers;

This could be a temporary problem. Your SIM card may not be
provisioned for data services. If it continues, call customer care."

Any help and suggestions are welcome
thanks


On Fri, May 1, 2009 at 8:40 PM, Shre555  wrote:
>
> Hi  I  got my Android Dev Phone 1 Yesterday.
>
> I tried to enter my gmail account info but it always gives me the
> error
>
> I stay in India
>
> I used Airtel
>
> with APN settings Name:airtelgprs.com
>
> APN: airtelgprs.com
>
> when I enter the info and press the sign in button the adb logcat
> says
>
> NETWORK ERROR
>
> >
>

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

2009-05-08 Thread devi prasad

I was thinking of preparing a bunch of matrices that capture various
details. For instance, we can have a matrix that expresses the result
of composing activities with different launch modes. Another matrix
may capture the effect of taskAffinity and such factors. My major
interest is in defining a set of activity-composition rules.  I hope
I'm clear :)

If others can spare time to review, I can post a couple such matrices soon.

thanks

On Fri, May 8, 2009 at 10:21 PM, Dianne Hackborn  wrote:
> On Fri, May 8, 2009 at 8:08 AM, Mariano Kamp  wrote:
>>
>> This discussion is very enlightening. Dianne that would be a great topic
>> for a blog post of yours, wouldn't it? ;-)
>
> Hopefully we can have full UI design docs for this. :)  I kind-of avoid
> writing blog posts, because that would take the last little bit of time I
> have for coding these days. :/  (Or I guess I could take the time I spent
> reading and posting to these groups. :p)
>
> Anyway, I'll see.  The material I wrote in the "application model" docs was
> supposed to explain a lot of this.
>
> --
> 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: Ideas behind Android's task concept

2009-05-08 Thread devi prasad

Hi, Mike, thanks for your views.I agree that this model is more
complex because there are no formal rules that associate launch modes
with the properties of activities.

I'm sure I'll have more questions in the coming days :)

2009/5/8 Mike Hearn :
>
>> Can someone educate me about the rationale behind Android tasks? I'm
>> also curious to know the thought process behind their design when they
>> were originally conceived?
>
> I think the problem they solve is that it's hard to have a "multi-
> tasking" OS when only one thing can be on the screen at once. So the
> idea of tasks is that you can switch quickly between them, and they
> preserve your state in the context of that application:
>
>  Maps -> View Business Details
>  Contacts -> View Contact -> Edit Contact
>
> Now if am editing a contact and want to do something else like view
> business details, I can go back home, press the Maps icon, do
> whatever, and then use home to press contacts and arrive back at the
> edit contact screen.
>
> I guess there are a few problems with the current implementation
> though: it's quite complicated, and there's no real way for users to
> learn how it works. The "obvious" mental model is of a linear stack of
> activities, but that's not what actually happens so you get things
> like pressing back on the home screen does not actually take you back.
> And then there is a lack of guidelines around when to use the activity
> modes - as you have found. And finally the built-in apps do use the
> activity modes inconsistently. For instance my example is wrong
> because the contacts app does reset the task stack.
>
> I think this stuff will shake out with time. Better animations can
> help users figure out the application model. UI guidelines will help
> developers. Hopefully the built-in apps will either become consistent
> or at least call out in their manifests why they use certain
> attributes so people can learn from 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: Ideas behind Android's task concept

2009-05-07 Thread devi prasad

Dianne, thanks much for the details. I had, in fact, taken a look at
the implementation of ActivityManager, and now I need to go back to it
again. Thanks for clarifying the evolutionary growth of these ideas.

I agree with you about the singleTask launch mode. It's strangeness is
what led me to this question -- honestly!


On Fri, May 8, 2009 at 1:06 AM, Dianne Hackborn  wrote:
> Tasks are purely there for UI navigation -- they basically take on the roll
> of an "application" for the user, in lieu of a more rigid 1 apk == 1 process
> == 1 icon == 1 app model.  A task really has little identity of its own --
> without some activity, a task doesn't exist.  It is just a way to group
> related activities together for purposes of managing flow through the UI.
>
> For launch mode, I would strongly discourage from using singleTask unless
> you understand what that is, why the default interaction model doesn't work
> for your app, and how singleTask changes it to do what you want.  The vast
> majority of apps don't need it.  The Browser does use it, but I would argue
> that this is as much to its detriment as to its advantage.
>
> As far as the thought process...  well, first there were activities, and
> that was all.  A single linear activity stack was not enough for the UI
> navigation we ended up doing, though, so the concept of tasks was created as
> a way to group related activities together so they could be moved around in
> the history.
>
> If you look at the activity manager implementation, you can still see many
> remnants of the fact that tasks were a later addition -- the activity
> manager is still all oriented around a single global stack of activities,
> and the implementation of "tasks" is actually just re-ordering operations on
> that single list.  So while the model we present is that each task has its
> own activity stack, the implementation hasn't actually caught up to that.
> (Actually this global list ends up being useful to have, anyway, to give the
> window manager a single holistic Z-ordering of all windows...  but if we had
> started with tasks as a formal concept from the start, it is unlikely we
> would have ended up with the current implementation.)
>
> On Thu, May 7, 2009 at 11:59 AM, devi prasad  wrote:
>>
>> I've been trying to understand the key concepts that make up the
>> Android programming model. I'm impressed as well as intrigued by
>> 'tasks' that stack up activities. I do not really appreciate why and
>> how one assigns a particular launch mode to an activity. For instance,
>> I'd like to define a few necessary conditions for marking an activity
>> the root of a new task. I'm focusing particularly on the 'singleTask'
>> launch mode. I'd like to know, for example, whether security, user
>> experience, and such factors decide the launch modes...
>>
>> Can someone educate me about the rationale behind Android tasks? I'm
>> also curious to know the thought process behind their design when they
>> were originally conceived?
>>
>> thanks
>>
>>
>
>
>
> --
> 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] Ideas behind Android's task concept

2009-05-07 Thread devi prasad

I've been trying to understand the key concepts that make up the
Android programming model. I'm impressed as well as intrigued by
'tasks' that stack up activities. I do not really appreciate why and
how one assigns a particular launch mode to an activity. For instance,
I'd like to define a few necessary conditions for marking an activity
the root of a new task. I'm focusing particularly on the 'singleTask'
launch mode. I'd like to know, for example, whether security, user
experience, and such factors decide the launch modes...

Can someone educate me about the rationale behind Android tasks? I'm
also curious to know the thought process behind their design when they
were originally conceived?

thanks

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



[android-developers] Re: Relationships among apps, tasks, and activities

2009-05-02 Thread devi prasad

some more thoughts...
What I've said about taskAffinity and launchMode attributes, in
general, makes sense when the activities are in the same app since the
default value of taskAffinity will be set to the package name. When
the activities across apps activate one another, just the launch mode
value tells if the launched activity would be the root of  the new
task. Again, this is because the package names of the apks would be
different.

On Sun, May 3, 2009 at 5:17 AM, devi prasad  wrote:
> Well, I DO think that Android documentation speaks about tasks and
> their affinities, contrary to what I said previously :)
>
> I defined a non-default value for the taskAffinity attribute of the
> activity in question:
>                             android:label="ChildActivity:SingleTaskActivity"
>                     android:launchMode="singleTask"
>                     android:taskAffinity="com.robosoft.example.taskByIteself">
>        
>
> and the activity gets to run in a separate task.
>
> Both 'taskAffinity' and 'launchMode' are necessary if we want to have
> an activity run in a separate task. Alternatively,
> Intent.FLAG_ACTIVITY_NEW_TASK may be used in the intent, in case only
> 'taskAffinity' is mentioned in the manifest.
>
> This is really interesting :)
>
>
> On Sat, May 2, 2009 at 1:37 PM, devi prasad  wrote:
>> Hi, Dianne: this is the portion of the dump that I get by executing
>> "adb shell dumpsys activity" :
>> --
>> Activities in Current Activity Manager State:
>>    Task{3 com.robosoft.example}
>>    clearOnBackground=false numActivities=3 rootWasReset=true
>>    affinity=com.robosoft.example
>>    intent=Intent { action=android.intent.action.MAIN
>> categories={android.intent.category.LAUNCHER}
>>                         flags=0x1020
>>
>> comp={com.robosoft.example/com.robosoft.example.AppRootActivity} }
>>
>>    History #3:
>>        HistoryRecord{434d2090
>> {com.robosoft.example/com.robosoft.example.SingleTaskActivity}}
>>        packageName=com.robosoft.example processName=com.robosoft.example
>>        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
>>        Intent { flags=0x1000
>>        comp={com.robosoft.example/com.robosoft.example.SingleTaskActivity} }
>>
>>    History #2:
>>        HistoryRecord{434fb848
>> {com.robosoft.example/com.robosoft.example.ChildActivityOfRoot}}
>>        packageName=com.robosoft.example processName=com.robosoft.example
>>        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
>>        Intent {
>> comp={com.robosoft.example/com.robosoft.example.ChildActivityOfRoot} }
>>
>>    History #1:
>>        HistoryRecord{434fe2e8
>> {com.robosoft.example/com.robosoft.example.AppRootActivity}}
>>        packageName=com.robosoft.example processName=com.robosoft.example
>>        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
>>        Intent { action=android.intent.action.MAIN
>> categories={android.intent.category.LAUNCHER}
>> ---
>> As I gather, this shows that all three activities are part of the same
>> task, even though I use FLAG_ACTIVITY_NEW_TASK while starting
>> 'SingleTaskActivity' and mark it with 'singleTask' launch mode. The
>> intent flag value (0x1000) indicates this in the top most activity
>> entry above.
>>
>> I cannot explain this behavior with my current understanding derived
>> from the documentation. What am I missing here?
>>
>> thanks
>>
>>
>> On Sat, May 2, 2009 at 10:50 AM, devi prasad  wrote:
>>> Hi, Dianne: ok, thanks.
>>> I use the following functions to determine the task id and if it is
>>> the root of a task:
>>>
>>> activity.getTaskId();
>>> activity.isTaskRoot();
>>>
>>> I used logcat looking for useful hints. Let me see if I understand it
>>> better if I use
>>> "adb shell dumpsys activity"
>>>
>>
>

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

2009-05-02 Thread devi prasad

Well, I DO think that Android documentation speaks about tasks and
their affinities, contrary to what I said previously :)

I defined a non-default value for the taskAffinity attribute of the
activity in question:



and the activity gets to run in a separate task.

Both 'taskAffinity' and 'launchMode' are necessary if we want to have
an activity run in a separate task. Alternatively,
Intent.FLAG_ACTIVITY_NEW_TASK may be used in the intent, in case only
'taskAffinity' is mentioned in the manifest.

This is really interesting :)


On Sat, May 2, 2009 at 1:37 PM, devi prasad  wrote:
> Hi, Dianne: this is the portion of the dump that I get by executing
> "adb shell dumpsys activity" :
> --
> Activities in Current Activity Manager State:
>    Task{3 com.robosoft.example}
>    clearOnBackground=false numActivities=3 rootWasReset=true
>    affinity=com.robosoft.example
>    intent=Intent { action=android.intent.action.MAIN
> categories={android.intent.category.LAUNCHER}
>                         flags=0x1020
>
> comp={com.robosoft.example/com.robosoft.example.AppRootActivity} }
>
>    History #3:
>        HistoryRecord{434d2090
> {com.robosoft.example/com.robosoft.example.SingleTaskActivity}}
>        packageName=com.robosoft.example processName=com.robosoft.example
>        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
>        Intent { flags=0x1000
>        comp={com.robosoft.example/com.robosoft.example.SingleTaskActivity} }
>
>    History #2:
>        HistoryRecord{434fb848
> {com.robosoft.example/com.robosoft.example.ChildActivityOfRoot}}
>        packageName=com.robosoft.example processName=com.robosoft.example
>        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
>        Intent {
> comp={com.robosoft.example/com.robosoft.example.ChildActivityOfRoot} }
>
>    History #1:
>        HistoryRecord{434fe2e8
> {com.robosoft.example/com.robosoft.example.AppRootActivity}}
>        packageName=com.robosoft.example processName=com.robosoft.example
>        app=ProcessRecord{43516130 181:com.robosoft.example/10018}
>        Intent { action=android.intent.action.MAIN
> categories={android.intent.category.LAUNCHER}
> ---
> As I gather, this shows that all three activities are part of the same
> task, even though I use FLAG_ACTIVITY_NEW_TASK while starting
> 'SingleTaskActivity' and mark it with 'singleTask' launch mode. The
> intent flag value (0x1000) indicates this in the top most activity
> entry above.
>
> I cannot explain this behavior with my current understanding derived
> from the documentation. What am I missing here?
>
> thanks
>
>
> On Sat, May 2, 2009 at 10:50 AM, devi prasad  wrote:
>> Hi, Dianne: ok, thanks.
>> I use the following functions to determine the task id and if it is
>> the root of a task:
>>
>> activity.getTaskId();
>> activity.isTaskRoot();
>>
>> I used logcat looking for useful hints. Let me see if I understand it
>> better if I use
>> "adb shell dumpsys activity"
>>
>

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

2009-05-02 Thread devi prasad

Hi, Dianne: this is the portion of the dump that I get by executing
"adb shell dumpsys activity" :
--
Activities in Current Activity Manager State:
Task{3 com.robosoft.example}
clearOnBackground=false numActivities=3 rootWasReset=true
affinity=com.robosoft.example
intent=Intent { action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER}
 flags=0x1020

comp={com.robosoft.example/com.robosoft.example.AppRootActivity} }

History #3:
HistoryRecord{434d2090
{com.robosoft.example/com.robosoft.example.SingleTaskActivity}}
packageName=com.robosoft.example processName=com.robosoft.example
app=ProcessRecord{43516130 181:com.robosoft.example/10018}
Intent { flags=0x1000
comp={com.robosoft.example/com.robosoft.example.SingleTaskActivity} }

History #2:
HistoryRecord{434fb848
{com.robosoft.example/com.robosoft.example.ChildActivityOfRoot}}
packageName=com.robosoft.example processName=com.robosoft.example
app=ProcessRecord{43516130 181:com.robosoft.example/10018}
Intent {
comp={com.robosoft.example/com.robosoft.example.ChildActivityOfRoot} }

History #1:
HistoryRecord{434fe2e8
{com.robosoft.example/com.robosoft.example.AppRootActivity}}
packageName=com.robosoft.example processName=com.robosoft.example
app=ProcessRecord{43516130 181:com.robosoft.example/10018}
Intent { action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER}
---
As I gather, this shows that all three activities are part of the same
task, even though I use FLAG_ACTIVITY_NEW_TASK while starting
'SingleTaskActivity' and mark it with 'singleTask' launch mode. The
intent flag value (0x1000) indicates this in the top most activity
entry above.

I cannot explain this behavior with my current understanding derived
from the documentation. What am I missing here?

thanks


On Sat, May 2, 2009 at 10:50 AM, devi prasad  wrote:
> Hi, Dianne: ok, thanks.
> I use the following functions to determine the task id and if it is
> the root of a task:
>
> activity.getTaskId();
> activity.isTaskRoot();
>
> I used logcat looking for useful hints. Let me see if I understand it
> better if I use
> "adb shell dumpsys activity"
>

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

2009-05-01 Thread devi prasad

Hi, Dianne: ok, thanks.
I use the following functions to determine the task id and if it is
the root of a task:

activity.getTaskId();
activity.isTaskRoot();

I used logcat looking for useful hints. Let me see if I understand it
better if I use
"adb shell dumpsys activity"

On Sat, May 2, 2009 at 10:39 AM, Dianne Hackborn  wrote:
> The behavior you are describing is not how things work.  What do you mean
> you don't see another task?  How are you telling?  "adb shell dumpsys
> activity" will show you the current activity state with the exact task
> organization (in the first part of the output).
>
> On Fri, May 1, 2009 at 9:17 PM, devi prasad  wrote:
>>
>> Hi
>> I am trying to understand the interactions among apps, processes,
>> activities,
>> and tasks. After reading 'Application Fundamentals' many times, I wrote a
>> tiny
>> piece of code with three different activities. Here's my manifest file:
>>
>> 
>>        >                  android:label="App1">
>>            
>>                
>>                
>>            
>>        
>>
>>        >                  android:label="ChildActivity:ChildOfAppRootActivity">
>>        
>>
>>        >                  android:label="ChildActivity:SingleTaskActivity"
>>                  android:launchMode="singleTask">
>>        
>> 
>>
>> The AppRootActivity starts ChildActivityOfRoot which in turn starts
>> SingleTaskActivity.
>>
>> Since 'SingleTaskActivity' is marked with 'singleTask' launchMode I
>> expected
>> two different tasks with the following activity sets:
>> Task1 --> AppRootActivity - ChildActivityOfRoot
>> Task2 --> SingleTaskActivity
>>
>> However, I was surprised to see all three activities running in the same
>> task.
>> This doesn't change even if I use Intent.FLAG_ACTIVITY_NEW_TASK flag in
>> the
>> intent used to activate 'SingleTaskActivity'. I use the getTaskId() to
>> determine
>> the task the activity is running.
>>
>> IMO this behavior is not at all apparent from the documentation. Can
>> someone
>> shed more light?
>>
>> Thanks
>>
>>
>
>
>
> --
> 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] Relationships among apps, tasks, and activities

2009-05-01 Thread devi prasad

Hi
I am trying to understand the interactions among apps, processes, activities,
and tasks. After reading 'Application Fundamentals' many times, I wrote a tiny
piece of code with three different activities. Here's my manifest file:


       
           
               
               
           
       

       
       

       
       


The AppRootActivity starts ChildActivityOfRoot which in turn starts
SingleTaskActivity.

Since 'SingleTaskActivity' is marked with 'singleTask' launchMode I expected
two different tasks with the following activity sets:
Task1 --> AppRootActivity - ChildActivityOfRoot
Task2 --> SingleTaskActivity

However, I was surprised to see all three activities running in the same task.
This doesn't change even if I use Intent.FLAG_ACTIVITY_NEW_TASK flag in the
intent used to activate 'SingleTaskActivity'. I use the getTaskId() to
determine
the task the activity is running.

IMO this behavior is not at all apparent from the documentation. Can someone
shed more light?

Thanks

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



[android-developers] does cupcake recognise (anti)clockwise rotatiions of the device

2009-04-21 Thread devi prasad

hi
I was told that Cupcake distinguishes both clockwise and
anti-clockwise rotations of the device and that it sets UI layouts
accordingly. Is this true? Or have I misunderstood something?

Also, what happens when the device is flipped upside down? Does
cupcake deal with it at all?

thanks

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



[android-developers] Re: (pre- & post-) processing raw audio data

2009-04-10 Thread devi prasad

Hi Dave
thanks much for the information. What I'm actually looking for is a
bunch of functions equivalent to the WaveOut API of MS Windows. Are
there equivalents to  functions such as waveOutOpen, waveOutClose,
waveOutWrite, waveOutReset, etc?

thanks again


On Fri, Apr 10, 2009 at 9:10 PM, Dave Sparks  wrote:
>
> No, this is not supported. If we ever do support it, it would require
> a special permission that the user would have to grant, and it would
> break for DRM content for obvious reasons.
>
> On Apr 10, 1:44 am, devi prasad  wrote:
>> I want to develop an app that lets one intercept raw audio data sent for
>> playback (possibly by a different app), and apply audio enhancements
>> over this raw data.
>>
>> Does Cupcake allow such filtering of audio data? If so, which API should I 
>> use?
>>
>> I understand this may not be possible at an application level for security
>> reasons.  I'm trying to see if this is possible with native code
>> linking to public
>> or private API of Android.
>>

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



[android-developers] (pre- & post-) processing raw audio data

2009-04-10 Thread devi prasad

I want to develop an app that lets one intercept raw audio data sent for
playback (possibly by a different app), and apply audio enhancements
over this raw data.

Does Cupcake allow such filtering of audio data? If so, which API should I use?

I understand this may not be possible at an application level for security
reasons.  I'm trying to see if this is possible with native code
linking to public
or private API of Android.

thanks

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



[android-developers] Re: removing preference file and its implication

2008-11-05 Thread Devi Prasad

Hi jason,
that works!
Thanks for pointing me to it.

On Thu, Nov 6, 2008 at 10:40 AM, Jason Parekh <[EMAIL PROTECTED]> wrote:
> The SharedPreferences keep a cache in memory.  So, when you remove the file,
> it ends up using the cached value (false) from memory.
>
> Try rm'ing the file, killing your process (from Devices tab in eclipse), and
> then relaunching.
>
> jason
>
>
> On Wed, Nov 5, 2008 at 3:30 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi,
>> I noticed an interesting but unexpected behaviour with preference
>> processing in Android. Here's what I'm trying to do.
>> My app needs to perform some specific tasks when it is launched for
>> the first time after installation. I use an element named
>> "firstLaunch" for this purpose. I set its value to false in the first
>> launch so that subsequent launches will see it properly.
>>
>> Here's the piece of code:
>>
>> package com.example;
>>SharedPreferences prefs = getSharedPreferences("pref",
>> MODE_PRIVATE);
>>isFirstTimeLaunch = prefs.getBoolean("firstLaunch", true);
>>Log.d("readPreferences", "read first time launch value: " +
>> isFirstTimeLaunch);
>>
>>SharedPreferences.Editor editorPrefs = prefs.edit();
>>editorPrefs.putBoolean("firstLaunch", false);
>>editorPrefs.commit();
>>
>> So far so good. Everything works as expected. However, I wanted to
>> test its behavior when the preference file is removed. I removed the
>> file '/data/data/com.example/shared_prefs/pref.xml' and relaunched the
>> app within the emulator. To my surprise I found that my technique
>> fails -- the variable 'isFirstTimeLaunch' will be false, even if I
>> remove the preferences file.I repeated removing and launching the app
>> many times and I see the same result every time.
>>
>> However, if I run the program from within Eclise IDE or if I do an
>> 'adb install' from the shell, things work as expected.Obviously these
>> methods clear the app data. Isn't simply removing the preference file
>> same as removing data since my app doesn't use anything else?
>>
>> Am I missing something here? Can someone explain what's wrong with my
>> program?
>>
>> Thanks
>> Devi Prasad
>>
>>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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
-~--~~~~--~~--~--~---