[android-developers] Android native process pauses after 10 to 15 seconds

2014-05-16 Thread Put_tiMe


[I'm not sure if I have to ask this question in the NDK forum]

I have an Android Java app, and also a native app. The native app is 
launched from the Java app, like this:

mProcess = Runtime.getRuntime().exec(cmdLaunch, null, new File(files_dir));

The native process actually runs in a loop, and sleeps once in a while to 
yield.

Here's what is happening. After the native process is launched, it runs for 
about 10 to 15 seconds. After that it just pauses. The Java app is still in 
the foreground. I know this from the logcat logs. There is nothing that'll 
make it resume.

Because I'm developing it, I start a new debugging session. This kills the 
previous Java app, and starts a new one.

Now the native process, which was paused, resumes and continues running as 
expected. Now this runs indefinitely without pausing.

What is happening here?

When the parent process (Java app) was killed, should the child process 
(native app) also have been killed? And how come as soon as the parent 
process was killed, the native process started to run without any issues.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Release notes and official info.

2013-05-16 Thread Put_tiMe
Thanks for your inputs. I went through them, and there is a lot of 
information, but I did not find the ones I was looking for.

I'm specifically looking at: 
Post 4.1, we get logcat logs only from our process  andWRITE_APN_SETTINGS  
permission has been elevated to system level permission.




On Thursday, May 16, 2013 12:59:42 PM UTC+5:30, Nikolay Elenkov wrote:
>
> On Thu, May 16, 2013 at 4:29 PM, Nikolay Elenkov 
> > wrote: 
> > On Thu, May 16, 2013 at 4:22 PM, Put_tiMe > 
> wrote: 
> >> Where can I find some official information, like: POST 4.1, we get 
> logcat 
> >> logs only from our process  andWRITE_APN_SETTINGS  permission has 
> been 
> >> elevated to system level permission. 
> >> 
> > 
> > AOSP: http://source.android.com/source/downloading.html 
>
> And of course in the docs :) 
>
>
> http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#JELLY_BEAN_MR1
>  
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Release notes and official info.

2013-05-16 Thread Put_tiMe
Where can I find some official information, like: POST 4.1, we get logcat 
logs only from our process  andWRITE_APN_SETTINGS  permission has been 
elevated to system level permission.

I tried looking, but didn't find any. All I found were forum posts.



-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] How to launch a process as a different user?

2013-02-20 Thread Put_tiMe


I want to launch a native process, from Java code, using 
RuntimeInstance.exec. But the problem is, the new native process gets 
launched under user "me".

I want the new process to run as user "shell".

How do I do it?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Nexus 7, onCreate is getting called multiple times.

2012-09-18 Thread Put_tiMe
Aaargh, it was this option that was doing this: *Developer Options -> Don't 
keep activities.*

Switched it off, and it's all fine now.


On Tuesday, September 18, 2012 10:52:12 AM UTC+5:30, Put_tiMe wrote:
>
> Nexus 7 - Jelly Bean
>
> I have an activity A.
>
> The usual callbacks are called: onCreate, onResume, etc.
>
> Now I launch B, from A.
>
> Again the  usual callbacks are called, this time for "B": onCreate, 
> onResume, etc. 
>
> I close "B". Now "A"'s onResume should get called.
> But onCreate is getting called.
>
>
> This issue is only on the Nexus 7 tablet, and not on Motorola XOOM, 
> running Jelly Bean.
>
> How do I fix this?
>
>

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

[android-developers] Re: Nexus 7, onCreate is getting called multiple times.

2012-09-17 Thread Put_tiMe
Actually when "A" calls "B", "A"'s onDestroy is immediately called.

And I *don't* have the FLAG_ACTIVITY_NO_HISTORY set.



On Tuesday, September 18, 2012 10:52:12 AM UTC+5:30, Put_tiMe wrote:
>
> Nexus 7 - Jelly Bean
>
> I have an activity A.
>
> The usual callbacks are called: onCreate, onResume, etc.
>
> Now I launch B, from A.
>
> Again the  usual callbacks are called, this time for "B": onCreate, 
> onResume, etc. 
>
> I close "B". Now "A"'s onResume should get called.
> But onCreate is getting called.
>
>
> This issue is only on the Nexus 7 tablet, and not on Motorola XOOM, 
> running Jelly Bean.
>
> How do I fix this?
>
>

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

[android-developers] Nexus 7, onCreate is getting called multiple times.

2012-09-17 Thread Put_tiMe
Nexus 7 - Jelly Bean

I have an activity A.

The usual callbacks are called: onCreate, onResume, etc.

Now I launch B, from A.

Again the  usual callbacks are called, this time for "B": onCreate, 
onResume, etc. 

I close "B". Now "A"'s onResume should get called.
But onCreate is getting called.


This issue is only on the Nexus 7 tablet, and not on Motorola XOOM, running 
Jelly Bean.

How do I fix this?

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

[android-developers] Activity stack question (another one, I'm afraid) SDK 8

2012-08-21 Thread Put_tiMe
I'm using Android SDK 2.2.

Activity stack -> A -> B -> C -> D -> E

Now I press "Home" key.
And I press the notification area to goto "A" again.

Because of the stack issue, I make sure that I close "B", "C", "D" and "E", 
using the static "Instance".
Now, the new activity stack::
A -> B -> C

Now when I'm at "C", "E"  appears in front of it.
How is it possible, cause I had closed "C" and "D" earlier?





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

2012-07-30 Thread Put_tiMe
Surprisingly, this topic seems to be still in it's infancy. There are very 
few posts, and those who have given it a shot have given up since it didn't 
work.

I need to attach multiple files of different types in a single e-mail. File 
types could be image, audio, video, zip, doc, and so on.
I did give it a shot. 


// List filePaths;

Intent emailIntent = new 
Intent(android.content.Intent.ACTION_SEND_MULTIPLE);

// I tried both the following lines
emailIntent.setType("*/*"); 
emailIntent.setType("vnd.android.cursor.dir/email");

// has to be an ArrayList
ArrayList uris = new ArrayList();
//convert from paths to Android friendly Parcelable Uri's
for (String file : filePaths)
{
 File fileIn = new File(file);
 Uri u = Uri.fromFile(fileIn);
 uris.add(u);
}

emailIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
context.startActivity(Intent.createChooser(emailIntent, "blah blah"));


Overall, it looks like it's working. The 'createChooser' gives me a list of 
available e-mail apps.
 If I choose "GMail" app from the list, in the 'compose' activity, I can 
see the attachments also. I then hit 'send'.
But when I receive the mail, I find no attachments.

If I see the "sent" folders of Gmail, this email doesn't have attachments.

So what do I need to do?


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

[android-developers] ListView and check box.

2012-07-25 Thread Put_tiMe
I'm using a list view with a custom adapter. And the row contains a check 
box.

Without the check box, everything works fine.
If I use a check box inside a list-view row, then I basically don't get a 
on-item-click callback.
The other side effect is, the "click" or "press" visual feedback is also 
not shown.


For the callback, in the "getView" of the adapter, I can register for a 
callback for the "row". Like this:
row.setOnClickListener(mOnItemClickListener);

But I couldn't figure out any way of getting the visual feedback to work.
Is there anyway I can get the visual feedback to work?

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

2012-06-29 Thread Put_tiMe
(I'm using 2.2 SDK)

Play store app has a UI in which you can scroll vertically to look for 
content in the current category.
If you want another category, you can swipe left or right. There is also a 
smooth transition into the resulting category.

Is this UI control/view already available in native SDK, or is it something 
that is built into the app?

I've seen similar UI in "ES File Explorer".



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

[android-developers] How to unlock device programmatically and launch apps?

2012-06-28 Thread Put_tiMe
I want to run a few tests on the device. The device should *NOT* be 
connected through USB. i.e. no ADB.
So basically my app/service should be stand alone.
And this app is purely for internal purpose. So even a horrible hack that 
works consistently well is fine.


Let's say I want this app/service to wake up (probably using alarm manager) 
every N minutes and do the following:


   - Turn the display on
   - Unlock the device
   - launch youtube app (and play a video)
   - Since youtube app holds a display lock, the screen won't go off as 
   long as the video is playing.
   - Once the video has finished playing,  youtube app itself releases the 
   display lock, and hence the screen should go off on it's own.


Now how do I do this? Do I use a test framework? The most important thing 
here is that I *don't* want to use ADB.


Looks like testing tools, like MonkeyRunner, work only on ADB.

I tried using AlarmManager, with the "RTC_WAKEUP", and the PowerManager 
"wake lock". But it's too inconsistent.





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

2012-06-27 Thread Put_tiMe
Ok, here's the issue. On some devices, the "sms" entries are also listed 
under  "content://call_log/calls". 
I don't know why. And they don't get deleted, if I call delete (which is 
good).
Is there anyway I can differentiate between a call and an SMS?



On Tuesday, June 5, 2012 2:27:38 PM UTC+5:30, pushpa wrote:
>
> Did you observe the logcat? If you can show your log cat messages we can 
> try.
>
> On Tue, Jun 5, 2012 at 1:43 PM, Put_tiMe  wrote:
>
>> The ContentResolver.delete call fails, i.e. returns zero rows deleted, 
>> even though the row exists and the parameters passed are correct.
>>
>> Any idea how to debug/fix this?
>>
>> 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
>
>
>

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

2012-06-26 Thread Put_tiMe
I have a ListView, and a custom adapter.
I have setup listeners for click, and long-click.

The problem:: I can scroll, but the moment I take my finger off the screen, 
it scrolls back to the top of the list view.

How can I fix this problem?


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

[android-developers] Re: A very strange issue, while launching an activity.

2012-06-19 Thread Put_tiMe
Both activities are declared in the manifest. I saw the post, but it does 
not give me any clues, except the 'requestFocus'. Is that the issue?

The point is, if I reinstall the APK file, it works.


On Tuesday, June 19, 2012 4:53:46 PM UTC+5:30, Put_tiMe wrote:
>
> I have two activities, "A" and "B".
> By default, "A" shows up, and upon pressing a button, "B" is shown.
>
> What happens sometimes is that, in "A", when I press the button to bring 
> up "B", the transition happens, I even see the "B's title".
> But it immediately exits.
>
> I don't do any code changes. I just reinstall the APK file, by using *adb 
> install -r "c:\ABC.apk"*.
>
> And it works. 
> I've connected to logcat, but no messages there also.
>
> What could be happening?
>
>

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

2012-06-19 Thread Put_tiMe
Ok, I got the logcat output: What do the highlighted lines mean?


D/dalvikvm( 4163): GC_CONCURRENT freed 455K, 43% free 4646K/8071K, external 
0K/0K, paused 6ms+8ms
D/dalvikvm( 4163): GC_CONCURRENT freed 619K, 43% free 4637K/8071K, external 
0K/0K, paused 5ms+7ms
D/dalvikvm( 4163): GC_CONCURRENT freed 725K, 45% free 4518K/8071K, external 
0K/0K, paused 6ms+7ms
I/ActivityManager(  145): Starting activity: Intent { flg=0x10a0 cmp=*
com.myapp/.activity.A.Dash_A* } from pid 4163
*D/InputManagerService(  145): Window already focused, ignoring focus gain 
of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4093a4e8
D/InputManagerService(  145): Window already focused, ignoring focus gain 
of: com.android.internal.view.IInputMethodClient$Stub$Proxy@409e36e8*
D/dalvikvm( 4163): GC_CONCURRENT freed 301K, 41% free 4785K/8071K, external 
0K/0K, paused 6ms+9ms
D/dalvikvm( 4163): GC_CONCURRENT freed 779K, 43% free 4662K/8071K, external 
0K/0K, paused 5ms+8ms
D/dalvikvm( 4163): GC_CONCURRENT freed 670K, 43% free 4606K/8071K, external 
0K/0K, paused 5ms+7ms
D/StatusBarPolicy(  236): onSignalStrengthsChanged
D/StatusBarService(  236): updateIcon slot=phone_signal index=20 
viewIndex=13 old=StatusBarIcon(pkg=com.android.systemui id=0x7f0200d4 
level=0 visible=true num=0 ) icon=StatusBarIcon(pkg=com.android.systemui 
id=0x7f0200d2 level=0 visible=true num=0 )



On Tuesday, June 19, 2012 4:53:46 PM UTC+5:30, Put_tiMe wrote:
>
> I have two activities, "A" and "B".
> By default, "A" shows up, and upon pressing a button, "B" is shown.
>
> What happens sometimes is that, in "A", when I press the button to bring 
> up "B", the transition happens, I even see the "B's title".
> But it immediately exits.
>
> I don't do any code changes. I just reinstall the APK file, by using *adb 
> install -r "c:\ABC.apk"*.
>
> And it works. 
> I've connected to logcat, but no messages there also.
>
> What could be happening?
>
>

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

2012-06-19 Thread Put_tiMe
I have two activities, "A" and "B".
By default, "A" shows up, and upon pressing a button, "B" is shown.

What happens sometimes is that, in "A", when I press the button to bring up 
"B", the transition happens, I even see the "B's title".
But it immediately exits.

I don't do any code changes. I just reinstall the APK file, by using *adb 
install -r "c:\ABC.apk"*.

And it works. 
I've connected to logcat, but no messages there also.

What could be happening?

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

2012-06-05 Thread Put_tiMe
The ContentResolver.delete call fails, i.e. returns zero rows deleted, even 
though the row exists and the parameters passed are correct.

Any idea how to debug/fix this?

Thanks

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

Re: [android-developers] Can I have a service run as a seperate process?

2012-05-29 Thread Put_tiMe
Hmm, this is surprising. If I give my service another name, then I can't 
pass commands to it by calling 'setAction'.
i.e. my service never invokes "startCommand".

Any reason why?
Or any other work around for this?
i.e. I don't want to do IPC.

On Tuesday, May 29, 2012 12:09:41 PM UTC+5:30, Kristopher Micinski wrote:
>
> Along with TreKing's understandable response, splitting the app into 
> two processes and then doing IPC between them is also going to be a 
> real pain, and potentially pretty heavyweight. 
>
> kris 
>
> On Tue, May 29, 2012 at 2:35 AM, Put_tiMe  wrote: 
> > There are two services. Out of them one is a work horse. While the other 
> one 
> > is not. 
> > And the work horse service is something that the user chooses to turn on 
> or 
> > off. 
> > 
> > If on, then when I see battery usage, my whole package comes up on top. 
> > I don't want that. If the work horse service is running, then I want to 
> show 
> > it as that, not the entire package. 
> > 
> > 
> > 
> > 
> > On Tuesday, May 29, 2012 11:39:08 AM UTC+5:30, Kristopher Micinski 
> wrote: 
> >> 
> >> wait, why do you want to do this? 
> >> 
> >> kris 
> >> 
> >> On Tue, May 29, 2012 at 1:21 AM, Put_tiMe  wrote: 
> >> > I have a package, in which I have "n" activities and "2" services. 
> >> > 
> >> > Out of the two services, I want one service to run as part of the 
> >> > package, 
> >> > whereas the other service, I want to run as part of a different 
> process. 
> >> > Is this possible? 
> >> > 
> >> > 
> >> > -- 
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "Android Developers" group. 
> >> > To post to this group, send email to 
> android-developers@googlegroups.com 
> >> > To unsubscribe from this group, send email to 
> >> > android-developers+unsubscr...@googlegroups.com 
> >> > For more options, visit this group at 
> >> > http://groups.google.com/group/android-developers?hl=en 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Android Developers" group. 
> > To post to this group, send email to android-developers@googlegroups.com 
> > To unsubscribe from this group, 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: Can I have a service run as a seperate process?

2012-05-28 Thread Put_tiMe
If i do that i get an error while installing saying:

Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
Please check logcat output for more details.
Launch canceled!

But logcat doesn't show anything.



On Tuesday, May 29, 2012 11:07:25 AM UTC+5:30, imran ali wrote:
>
> Hi,
> use android:process="processName" this in AndroidManifest.xml.
> this will helpful 
>
> http://developer.android.com/guide/topics/manifest/application-element.html#proc
>
> Regards
> Imran Ali
>
> On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote:
>>
>> I have a package, in which I have "n" activities and "2" services.
>>
>> Out of the two services, I want one service to run as part of the 
>> package, whereas the other service, I want to run as part of a different 
>> process.
>> Is this possible?
>>
>>
>>
> On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote:
>>
>> I have a package, in which I have "n" activities and "2" services.
>>
>> Out of the two services, I want one service to run as part of the 
>> package, whereas the other service, I want to run as part of a different 
>> process.
>> Is this possible?
>>
>>
>>
> On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote:
>>
>> I have a package, in which I have "n" activities and "2" services.
>>
>> Out of the two services, I want one service to run as part of the 
>> package, whereas the other service, I want to run as part of a different 
>> process.
>> Is this possible?
>>
>>
>>
> On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote:
>>
>> I have a package, in which I have "n" activities and "2" services.
>>
>> Out of the two services, I want one service to run as part of the 
>> package, whereas the other service, I want to run as part of a different 
>> process.
>> Is this possible?
>>
>>
>>
> On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote:
>>
>> I have a package, in which I have "n" activities and "2" services.
>>
>> Out of the two services, I want one service to run as part of the 
>> package, whereas the other service, I want to run as part of a different 
>> process.
>> Is this possible?
>>
>>
>>

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

Re: [android-developers] Can I have a service run as a seperate process?

2012-05-28 Thread Put_tiMe
There are two services. Out of them one is a work horse. While the other 
one is not.
And the work horse service is something that the user chooses to turn on or 
off.

If on, then when I see battery usage, my whole package comes up on top.
I don't want that. If the work horse service is running, then I want to 
show it as that, not the entire package.



On Tuesday, May 29, 2012 11:39:08 AM UTC+5:30, Kristopher Micinski wrote:
>
> wait, why do you want to do this? 
>
> kris 
>
> On Tue, May 29, 2012 at 1:21 AM, Put_tiMe  wrote: 
> > I have a package, in which I have "n" activities and "2" services. 
> > 
> > Out of the two services, I want one service to run as part of the 
> package, 
> > whereas the other service, I want to run as part of a different process. 
> > Is this possible? 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Android Developers" group. 
> > To post to this group, send email to android-developers@googlegroups.com 
> > To unsubscribe from this group, send email to 
> > android-developers+unsubscr...@googlegroups.com 
> > For more options, visit this group at 
> > http://groups.google.com/group/android-developers?hl=en 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can I have a service run as a seperate process?

2012-05-28 Thread Put_tiMe
I have a package, in which I have "n" activities and "2" services.

Out of the two services, I want one service to run as part of the package, 
whereas the other service, I want to run as part of a different process.
Is this possible?


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

[android-developers] How often is the ActivityManager.getRunningTasks() list refreshed?

2012-05-28 Thread Put_tiMe
The reason I'm asking is that, sometimes if I'm in the "Home" screen, and I 
call 'getRunningTasks(1)', then I get reported that a different activity 
(other than home) is currently active.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Which is better, one trigger receiver and multiple services -- or -- one trigger receiver per service.

2012-05-25 Thread Put_tiMe
These are running in the same process.
I need 5, because they all do different tasks, and are quite independent of 
each other.


On Friday, May 25, 2012 5:20:15 PM UTC+5:30, James Black wrote:
>
> Are these running in the same process as the main activity or remotely?
>
> But, it seems that you are asking if you should have five separate 
> services and simpler logic or slightly more complex in one.
>
> Unless sufficiently complex I would go with one service and see later if 
> more are needed.
> On May 25, 2012 1:15 AM, "Put_tiMe"  wrote:
>
>> I have a situation where in I need to have 5 or more services running in 
>> the same package.
>> Let's call it service "A", "B", "C", "D" and "E"
>>
>> Which is a better way of doing this? Better in terms of memory and CPU 
>> usage (and hence battery usage and efficiency).
>>
>> 1. Have 1 main service running, apart from the 5 mentioned above.
>> Have only one trigger receiver and a the main service is linked with 
>> this trigger receiver.
>> This will listen to all intents that are required.
>> When an intent goes off, then we check if "A" needs this intent. If 
>> it needs, then we call startService("A", intent);
>> Same with the other 4 services.
>>
>> 2. Have 1 trigger receiver linked with each of the 5 services.
>> Handle intents 1 on 1 basis.
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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] Which is better, one trigger receiver and multiple services -- or -- one trigger receiver per service.

2012-05-24 Thread Put_tiMe
I have a situation where in I need to have 5 or more services running in 
the same package.
Let's call it service "A", "B", "C", "D" and "E"

Which is a better way of doing this? Better in terms of memory and CPU 
usage (and hence battery usage and efficiency).

1. Have 1 main service running, apart from the 5 mentioned above.
Have only one trigger receiver and a the main service is linked with 
this trigger receiver.
This will listen to all intents that are required.
When an intent goes off, then we check if "A" needs this intent. If it 
needs, then we call startService("A", intent);
Same with the other 4 services.

2. Have 1 trigger receiver linked with each of the 5 services.
Handle intents 1 on 1 basis.


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

2012-05-23 Thread Put_tiMe
I kind of figured that out, it shows a blank icon. But the draw back is it 
still uses up real estate.

Is there no way we can knock off our icon from the bar, but still have the 
content in the drop down???


On Wednesday, May 23, 2012 8:58:14 PM UTC+5:30, MagouyaWare wrote:
>
> http://stackoverflow.com/questions/2855110/android-no-icon-for-notification
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Wed, May 23, 2012 at 8:00 AM, Put_tiMe  wrote:
>
>> Can I create a notification only in the pull down bar?
>>
>> Basically I don't want an icon in the top bar.
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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] How to create an ongoing notification, without the icon in the top bar.

2012-05-23 Thread Put_tiMe
Can I create a notification only in the pull down bar?

Basically I don't want an icon in the top bar.

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

[android-developers] Service not re-starting on time, on a Samsung Galaxy Note device.

2012-05-23 Thread Put_tiMe
I am running my service on a Galaxy Note device. When I switch off the 
screen, and after a while (2 mins) switch it on and go to :: Settings -> 
Applications -> Running Services::

then I see that there are lots of services that have the "Restarting" tag.
For my service, it restarts after a very long time. And sometimes it 
doesn't restart even after 5 minutes. I have the "restarting" tag 
continuously.

Is there any way I can restart my service as soon as the screen is switched 
on.

BTW, I have registered for Screen-on intent.

If I launch my activity, which in turn starts my service, I immediately see 
that the service has started.

How do I sort this out?


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

[android-developers] Multiple rows in 'Gallery' widget.

2012-05-18 Thread Put_tiMe
Doesn't 'Gallery' widget support multiple rows?

It just shows one row, no matter what ever I try.

Basically I want 'GridView' widget with horizontal scrolling only.


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

[android-developers] How to scroll the 'Gallery' widget through code?

2012-05-18 Thread Put_tiMe
I am trying to scroll a 'Gallery' widget programmatically.

I actually scroll the gallery manually. Then when I do a 'getScrollX and 
Y', then it always returns me 0.
It always returns me 'zero' no matter how much ever I have scrolled.

How do I do this then?


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

2012-05-16 Thread Put_tiMe
Nothing actually, here's my gallery definition.



Is it mandatory to provide a selector?

I also tried adding the following 2 parameters:

android:listSelector="@drawable/selection_image"
android:drawSelectorOnTop="true"

Even that didn't help.


On Wednesday, May 16, 2012 10:51:42 PM UTC+5:30, MagouyaWare wrote:
>
> What are you using for your selector?
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Wed, May 16, 2012 at 10:25 AM, Put_tiMe  wrote:
>
>> I'm using a 'Gallery' widget. And I've registered for a item-click 
>> callback.
>>
>> And I'm getting the callback when I click on an item.
>> But the problem is that I don't see any selection UI.
>> How do I fix this?
>>
>> 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
>
>
>

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

2012-05-16 Thread Put_tiMe
I'm using a 'Gallery' widget. And I've registered for a item-click callback.

And I'm getting the callback when I click on an item.
But the problem is that I don't see any selection UI.
How do I fix this?

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: Getting system's color value from string resource.

2012-04-30 Thread Put_tiMe
No, I want to get the system's default text color used in the status bar 
notification.

Is there anyway I can get this?


On Tuesday, May 1, 2012 3:29:45 AM UTC+5:30, Jonathan S wrote:
>
>
>
> On Monday, April 30, 2012 11:58:13 AM UTC-4, Put_tiMe wrote:
>>
>> I want to retrieve the system's color value from a resource string, like:
>>
>> getResources().getIdentifier(*
>> "android.R.style.TextAppearance_StatusBar_EventContent"*, "style", 
>> getPackageName());
>>
>>
>>
>> How do I do this?
>
>
> That is not quite right for it,
>
> Are you using it for TextView? 
>

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

2012-04-30 Thread Put_tiMe
I want to retrieve the system's color value from a resource string, like:

getResources().getIdentifier(*
"android.R.style.TextAppearance_StatusBar_EventContent"*, "style", 
getPackageName());



How do 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] values-v9 and styles.xml problem

2012-04-30 Thread Put_tiMe
This documentation 
here: 
http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomExpandedView

*Says:*

Then, to apply the system's default colors for notifications on Android 2.3 
and higher, use the following styles for res/values-v9/styles.xml:








I'm using* android 2.2* for dev.

But if I do the above, then I get this error:
error: Error retrieving parent for item: No resource found that matches the 
given name 'android:TextAppearance.StatusBar.EventContent'.


Any idea as to how to do this?


Thanks

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

Re: [android-developers] How to use the default radio button and check box drawable resource (image)

2012-04-30 Thread Put_tiMe
Got it: android:background="@android:drawable/"

On Monday, April 30, 2012 4:39:26 PM UTC+5:30, Put_tiMe wrote:
>
> How do I mentioned this in the layout XML file?
>
> On Thursday, April 12, 2012 7:35:48 PM UTC+5:30, MagouyaWare wrote:
>>
>> Use android.R.drawable.btn_radio
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/magouyaware
>>
>>
>> On Wed, Apr 11, 2012 at 11:37 PM, Put_tiMe  wrote:
>>
>>> In my layout, for some of the UI controls, I want to use the OS radio 
>>> button resource.
>>> For example, I want an ImageView, but it draws the default radio button 
>>> texture.
>>>
>>> How can I achieve this? 
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 use the default radio button and check box drawable resource (image)

2012-04-30 Thread Put_tiMe
How do I mentioned this in the layout XML file?

On Thursday, April 12, 2012 7:35:48 PM UTC+5:30, MagouyaWare wrote:
>
> Use android.R.drawable.btn_radio
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Wed, Apr 11, 2012 at 11:37 PM, Put_tiMe  wrote:
>
>> In my layout, for some of the UI controls, I want to use the OS radio 
>> button resource.
>> For example, I want an ImageView, but it draws the default radio button 
>> texture.
>>
>> How can I achieve this? 
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

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

2012-04-30 Thread Put_tiMe
But if I do use a 'remoteview' then my entry's background stands out from 
the other notifications.
Is there anyway I can maintain the same system background?
Can I set background="android:id?blah blah"?



On Sunday, March 27, 2011 2:28:30 AM UTC+5:30, Mark Murphy wrote:
>
> On Sat, Mar 26, 2011 at 4:41 PM, guillaume benats
>  wrote:
> > isn't there anyway to put in on two lines?
>
> Yes, by creating your own RemoteViews for the contentView.
>
> A Notification's default RemoteViews supports only one line for the
> description, with the marquee effect on for android:ellipsize.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2
>
>

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

2012-04-21 Thread Put_tiMe
I have an activity that launches another activity, like let's say 
facebook's "post to wall" activity.

Let's say facebook app was already running, and you were in "what's on your 
mind" screen.

When my app launches the facebook's  "post to wall" activity, and in that 
activity I press 'Back", then the facebbok's  "what's on your mind" 
activity is now on top of stack.

But I want my activity to be on top. What should I do?

I'm using the following flags while I'm launching   facebook's  "post to 
wall" activity.

Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET 
| 
 Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP | 
 Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | 
Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED



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

2012-04-19 Thread Put_tiMe
I am trying to add an options menu:



*code: *
onCreateOptionsMenu()
{
  MenuInflater inflater = getMenuInflater();
  inflater.inflate(R.menu.options_menu, menu);
}


*xml:*
http://schemas.android.com/apk/res/android";>







Only the image shows up, the 'text' never shows up.
If I don't include the image, then the text shows up fine.

Are they mutually exclusive?


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

2012-04-18 Thread Put_tiMe
I have a tab host and I host a settings app activity, like this::


Intent tabIntent = new Intent( 
android.provider.Settings.ACTION_APPLICATION_SETTINGS);
tabHost.newTabSpec(blah, blah, blah, 
 .setContent( tabIntent);

The idea is the "embed" the activity inside my tab-view.

This works perfectly fine on Android 2.3.
But when I run this on an ICS device, it just crashes.

What could be the problem? And how do I solve this?

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

[android-developers] How to get the user choice from 'Intent.createChooser'

2012-04-17 Thread Put_tiMe
I call 'Intent.createChooser' to let the user choose the app that he wants 
to use to do the necessary action.

Is it possible to get what the user chose, before the user chosen app 
starts up.

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

2012-04-16 Thread Put_tiMe
25, but growing.
More than the number, it's the sheer time it takes to remember the name of 
the layout.



On Monday, April 16, 2012 9:47:01 AM UTC+5:30, Kumar Bibek wrote:
>
> No. It's not possible. Btw, how many layouts you have now? Just curious.
>
> *Thanks and Regards,
> Kumar Bibek*
> *
> http://techdroid.kbeanie.com
> http://www.kbeanie.com*
>
>
>
> On Mon, Apr 16, 2012 at 9:44 AM, Put_tiMe  wrote:
>
>> The number of XML's in my layout folder is growing and is becoming 
>> difficult to manage.
>>
>> So I want to create sub folders, under layout, to better manage this.
>>
>> Is there any way the resource compiler can handle this?
>>
>> So instead of *R.layout.layout_a* I want to refer it as  *
>> R.layout.folder_1.folder_x.layout_a*.
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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] Sub folders under 'layout'

2012-04-15 Thread Put_tiMe
The number of XML's in my layout folder is growing and is becoming 
difficult to manage.

So I want to create sub folders, under layout, to better manage this.

Is there any way the resource compiler can handle this?

So instead of *R.layout.layout_a* I want to refer it as  *
R.layout.folder_1.folder_x.layout_a*.

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

2012-04-12 Thread Put_tiMe
I'm looking at this: if *com.android.email* package exists, then I want to 
open the "compose" activity, and automatically fill up the fields, such as 
'to', 'subject', etc...

If the default mail package doesn't exist, then I don't mind showing the 
chooser.

The reason I want to do this is:
I know I want to send an e-mail. I don't want the user to choose 
'bluetooth'.
Because I know I don't want to use the 'bluetooth'.

I need to do at least this: the chooser should should only the e-mail 
capable apps. is that possible?




On Thursday, April 12, 2012 9:07:45 PM UTC+5:30, TreKing wrote:
>
> In addition to what's been said, there exists the remote possibility that 
> an email app does not even exist on a device, in which case your attempt to 
> "go directly to the 'default' email app" will fail miserably.
>
>
> -
> TreKing  - Chicago 
> transit tracking app for Android-powered devices
>
>

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

[android-developers] Re: Directly accessing the e-mail app.

2012-04-12 Thread Put_tiMe
I want to do this on Android 2.2 or later.


On Thursday, April 12, 2012 12:42:12 PM UTC+5:30, Put_tiMe wrote:
>
> How do I directly choose the default e-mail app, without going through the 
> chooser?
>
> I would also like to set some of the values through the intent, like:
>
> emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, recipients);
> emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "blah");
> emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Wow! direct email 
> works");
> emailIntent.setType("text/plain");
>
>
> Is there any way I can do it, without going through the chooser?
>
>
>

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

2012-04-12 Thread Put_tiMe
How do I directly choose the default e-mail app, without going through the 
chooser?

I would also like to set some of the values through the intent, like:

emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, recipients);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "blah");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Wow! direct email 
works");
emailIntent.setType("text/plain");


Is there any way I can do it, without going through the chooser?


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

[android-developers] How to use the default radio button and check box drawable resource (image)

2012-04-11 Thread Put_tiMe
In my layout, for some of the UI controls, I want to use the OS radio 
button resource.
For example, I want an ImageView, but it draws the default radio button 
texture.

How can I achieve this?

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

Re: [android-developers] List view row background.

2012-04-09 Thread Put_tiMe
I have another issue that I'm facing.
 
I have registered for a callback on item click.
Whenever I click on a row, it remains selected.
I want to clear the selection. How do I do it?
 
I tried various functions, but none of them worked.
 
 

On Monday, April 9, 2012 4:01:43 PM UTC+5:30, Put_tiMe wrote:

> Ok, I kind of got it together.
>  
> For the row, I'm setting the background to my bitmap image.
> For selection, I'm setting the ListView attribute:
> android:listSelector="@drawable/xxx"
>  
>  
> It kind of works. But I can't see the selection.
> i.e. when a row is selected (or clicked) I don't see the color change.
> This happens when I set the background for the rows.
>  
> To counter that I tried setting this attr: android:drawSelectorOnTop="true"
>  
> But the problem with that is that the row contents are completely hidden.
>  
> What should I do in this case?
>  
>  
>
> On Monday, April 9, 2012 3:39:13 PM UTC+5:30, Put_tiMe wrote:
>
>> I also need to change the drawable when a listview item is selected.
>>  
>> How can I achieve this?
>>
>> On Monday, April 9, 2012 2:19:39 PM UTC+5:30, bin yang wrote:
>>
>>> Define common list item layout file. 
>>> Using  LayoutInflater to create view of Adpater.
>>>
>>> 在 2012年4月9日 下午4:30,Put_tiMe 写道:
>>>
>>>> I want to add a background image for each row of a list-view control.
>>>> I have written a custom adapter for the list view.
>>>>  
>>>> What is the best way of doing it?
>>>>  
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to 
>>>> android-developers@googlegroups.com
>>>> To unsubscribe from this group, 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] List view row background.

2012-04-09 Thread Put_tiMe
Ok, I kind of got it together.
 
For the row, I'm setting the background to my bitmap image.
For selection, I'm setting the ListView attribute:
android:listSelector="@drawable/xxx"
 
 
It kind of works. But I can't see the selection.
i.e. when a row is selected (or clicked) I don't see the color change.
This happens when I set the background for the rows.
 
To counter that I tried setting this attr: android:drawSelectorOnTop="true"
 
But the problem with that is that the row contents are completely hidden.
 
What should I do in this case?
 
 

On Monday, April 9, 2012 3:39:13 PM UTC+5:30, Put_tiMe wrote:

> I also need to change the drawable when a listview item is selected.
>  
> How can I achieve this?
>
> On Monday, April 9, 2012 2:19:39 PM UTC+5:30, bin yang wrote:
>
>> Define common list item layout file. 
>> Using  LayoutInflater to create view of Adpater.
>>
>> 在 2012年4月9日 下午4:30,Put_tiMe 写道:
>>
>>> I want to add a background image for each row of a list-view control.
>>> I have written a custom adapter for the list view.
>>>  
>>> What is the best way of doing it?
>>>  
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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] List view row background.

2012-04-09 Thread Put_tiMe
I also need to change the drawable when a listview item is selected.
 
How can I achieve this?

On Monday, April 9, 2012 2:19:39 PM UTC+5:30, bin yang wrote:

> Define common list item layout file. 
> Using  LayoutInflater to create view of Adpater.
>
> 在 2012年4月9日 下午4:30,Put_tiMe 写道:
>
>> I want to add a background image for each row of a list-view control.
>> I have written a custom adapter for the list view.
>>  
>> What is the best way of doing it?
>>  
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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] List view row background.

2012-04-09 Thread Put_tiMe
I want to add a background image for each row of a list-view control.
I have written a custom adapter for the list view.
 
What is the best way of doing it?
 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Relative layout : how to horizontally center align 2 children.

2012-04-09 Thread Put_tiMe
My layout is a little bit complex. 
I think centerHorizontal centers it w.r.t the parent.
 
But my UI elements parent is the layout itself.
And I did try "centerHorizontal" on the 2 UI child elements that I want to 
center align, and it didn't work.
 
Maybe because those controls already have a horizontal-align flag set???
 

On Monday, April 9, 2012 9:33:52 AM UTC+5:30, jason zhu wrote:

> Both of them are set to "android:layout_centerHorizontal="true""
>
> 在 2012年4月9日 上午11:56,Put_tiMe 写道:
>
>> In a relative layout, how do I center align two *child* elements.
>> The two elements could be of different widths.
>>  
>> They appear one below the other and are horizontally center aligned.
>>  
>>  
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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] Relative layout : how to horizontally center align 2 children.

2012-04-08 Thread Put_tiMe
In a relative layout, how do I center align two *child* elements.
The two elements could be of different widths.
 
They appear one below the other and are horizontally center aligned.
 
 

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

2012-04-05 Thread Put_tiMe
No no, I don't broadcast "screen on" intent.
It's done by the OS.
 

On Thursday, April 5, 2012 12:27:54 PM UTC+5:30, Deep wrote:

> Hi, 
>
> One possible solution for this can be : 
>
> When you broadcast "screen-on"  intent through your code, put an extra 
> key kind of flag contains is from code and value is true. 
> So, when you receive this intent and if it contains that flag key it 
> means that it is sent from program else "screen-on" done by user 
> manually. 
>
>
> Hope it works ! 
>
> Thanks & Regards, 
> Deepchand Singh 
> +91-9868522870 
>
> On Apr 4, 12:06 pm, Put_tiMe  wrote: 
> > Sorry, a slight correction: 
> > 
> > If it's a code induced screen-on, I want to switch bluetooth on/off 
> > (toggle). 
> > If it's a user induced screen-on, I want to switch bluetooth on. 
> > 
> > Code induced screen-on is initiated from Alarm-manager. 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Wednesday, April 4, 2012 12:26:49 PM UTC+5:30, Put_tiMe wrote: 
> > > If it's a code induced screen-on, I want to switch bluetooth off. 
> > > If it's a user induced screen-on, I want to switch bluetooth on. 
> > 
> > > On Wednesday, April 4, 2012 10:10:09 AM UTC+5:30, TreKing wrote: 
> > 
> > >> On Tue, Apr 3, 2012 at 4:21 AM, Put_tiMe  wrote: 
> > 
> > >>> I want to handle this intent in different ways, depending on where 
> it 
> > >>> originated from. 
> > 
> > >> You still didn't explain *why*. 
> > 
> > >> 
> --- 
> -- 
> > >> TreKing <http://sites.google.com/site/rezmobileapps/treking> - 
> Chicago 
> > >> transit tracking app for Android-powered devices

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

[android-developers] Re: ScrollView and programmatically scrolling

2012-04-04 Thread Put_tiMe
It's actually quite crazy.
 
I had similar problems with scroll view.
 
But from what you are saying, you are interested in scrolling the text-view.
I would presume that the text-view has scroll-view bundled in it.
 
If things are not working out, then try this (at least this is what I did):
Derive scrollview and write your own class. Override scrollTo and other 
similar function with which you have control over scrolling.
 
 

On Thursday, April 5, 2012 7:51:23 AM UTC+5:30, Steve Cavanagh wrote:

> Doesn't setting gravity to "bottom" 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Difference between user-induced "screen on" and programmatically induced "screen on".

2012-04-04 Thread Put_tiMe
Sorry, a slight correction:
 
If it's a code induced screen-on, I want to switch bluetooth on/off 
(toggle).
If it's a user induced screen-on, I want to switch bluetooth on.
 
Code induced screen-on is initiated from Alarm-manager.
 
 

On Wednesday, April 4, 2012 12:26:49 PM UTC+5:30, Put_tiMe wrote:

> If it's a code induced screen-on, I want to switch bluetooth off.
> If it's a user induced screen-on, I want to switch bluetooth on.
>  
>  
> On Wednesday, April 4, 2012 10:10:09 AM UTC+5:30, TreKing wrote:
>
>> On Tue, Apr 3, 2012 at 4:21 AM, Put_tiMe  wrote:
>>
>>> I want to handle this intent in different ways, depending on where it 
>>> originated from.
>>
>>
>> You still didn't explain *why*.
>>
>>
>> -
>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
>> transit tracking app for Android-powered devices
>>
>>

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

Re: [android-developers] Difference between user-induced "screen on" and programmatically induced "screen on".

2012-04-03 Thread Put_tiMe
If it's a code induced screen-on, I want to switch bluetooth off.
If it's a user induced screen-on, I want to switch bluetooth on.
 
 
On Wednesday, April 4, 2012 10:10:09 AM UTC+5:30, TreKing wrote:

> On Tue, Apr 3, 2012 at 4:21 AM, Put_tiMe  wrote:
>
>> I want to handle this intent in different ways, depending on where it 
>> originated from.
>
>
> You still didn't explain *why*.
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
> transit tracking app for Android-powered devices
>
>

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

Re: [android-developers] Difference between user-induced "screen on" and programmatically induced "screen on".

2012-04-03 Thread Put_tiMe
I have registered for SCREEN_ON intent.
 
In the alarm-manager, I grab a wake_lock with 

*FULL_WAKE_LOCK* flag and that switches on the screen.
 
This sends a SCREEN_ON intent.
 
In the meanwhile, the user could also have switched on the screen.
 
I want to handle this intent in different ways, depending on where it 
originated from.
 
 

On Tuesday, April 3, 2012 2:02:57 PM UTC+5:30, TreKing wrote:

> On Tue, Apr 3, 2012 at 2:29 AM, Put_tiMe  wrote:
>
>> Is there anyway I can distinguish between the two intents?
>
>
> If you explain why you need to distinguish, maybe you'll get a hand in 
> employing a solution to the actual problem you're having.
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
> transit tracking app for Android-powered devices
>
>

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

[android-developers] Difference between user-induced "screen on" and programmatically induced "screen on".

2012-04-03 Thread Put_tiMe
Screen-on can be done in two ways:
 
1. User pressing the power (or home button)
2. Through code: by using power manager -> wake lock -> with screen-on flag.
 
Either ways, I get a 'Intent.ACTION_SCREEN_ON' intent.
Is there anyway I can distinguish between the two intents?
 
 
 
 

 

**
**

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

2012-04-02 Thread Put_tiMe
Sorry, I missed Dianne's post above.
 
So according to Dianne's post, CPU is indeed completely switched off.
And in Android, there is no CPU under clock mode.
And it can be woken up only by external interrupts. Got that.
 
But then how does Alarm-manager timers work?
Is it some kind of delayed interrupt or something like that? i.e an 
interrupt that will be raised after some time???
I thought at least the alarm-manager will need the CPU running.
 
 
 

On Tuesday, April 3, 2012 9:19:12 AM UTC+5:30, Put_tiMe wrote:

> Ok, to clear some confusion, does CPU off means that CPU is completely 
> switched off, or is it run at a low clock rate?
>  
> If CPU is completely off, then how does the AlarmManager even work, and 
> how does the phone receive an incoming call or an SMS?
>  
> I'm sure CPU will be required to run some basic OS services, right? Like 
> the phone and SMS, and the alarm-manager itself.
>  
>  
>
> On Monday, April 2, 2012 7:05:28 PM UTC+5:30, Dan wrote:
>
>>
>>
>> On Mar 30, 10:06 pm, Dianne Hackborn  wrote: 
>> > On Android "sleep mode" is the screen being off.  What do you mean by 
>> > "sleep mode"? 
>>
>> Given the nice chart of CPU/Screen/Keyboard states at: 
>>
>> http://developer.android.com/reference/android/os/PowerManager.html 
>>
>> If having PARTIAL_WAKE_LOCK held allows the screen to go off (and you 
>> want to say 'On Android "sleep mode" is the screen being off'), what 
>> do you call the state that device will go into if PARTIAL_WAKE_LOCK 
>> is not held? 
>>
>> Once we have the name agreed upon (for conversation, since it can only 
>> be reached if some form of WAKE_LOCK is not held, let's say "not 
>> awake") 
>> the question is what do you do to get the device to try to go to a 
>> state 
>> of CPU/SCREEN/KEYBOARD all Off. 
>>
>> Dan Schmitt
>
>

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

2012-04-02 Thread Put_tiMe
Ok, to clear some confusion, does CPU off means that CPU is completely 
switched off, or is it run at a low clock rate?
 
If CPU is completely off, then how does the AlarmManager even work, and how 
does the phone receive an incoming call or an SMS?
 
I'm sure CPU will be required to run some basic OS services, right? Like 
the phone and SMS, and the alarm-manager itself.
 
 

On Monday, April 2, 2012 7:05:28 PM UTC+5:30, Dan wrote:

>
>
> On Mar 30, 10:06 pm, Dianne Hackborn  wrote: 
> > On Android "sleep mode" is the screen being off.  What do you mean by 
> > "sleep mode"? 
>
> Given the nice chart of CPU/Screen/Keyboard states at: 
>
> http://developer.android.com/reference/android/os/PowerManager.html 
>
> If having PARTIAL_WAKE_LOCK held allows the screen to go off (and you 
> want to say 'On Android "sleep mode" is the screen being off'), what 
> do you call the state that device will go into if PARTIAL_WAKE_LOCK 
> is not held? 
>
> Once we have the name agreed upon (for conversation, since it can only 
> be reached if some form of WAKE_LOCK is not held, let's say "not 
> awake") 
> the question is what do you do to get the device to try to go to a 
> state 
> of CPU/SCREEN/KEYBOARD all Off. 
>
> Dan Schmitt

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

2012-04-02 Thread Put_tiMe
I tried a few things on an ICS device.
 
When the phone is in sleep mode, I use an AlarmManager to wake up.
During that alarm-manager handler, if I acquire a wifi-lock and a 
wakeup-lock.
 
Still, if I enable/disable wifi programmatically, it doesn't work.
 
But the moment I switch on the screen manually, it works fine.
Any ideas why?
 

On Friday, March 30, 2012 6:22:07 PM UTC+5:30, Kostya Vasilyev wrote:

>  
>
> 30.03.2012 16:31, Mark Murphy написал: 
>
> IMHO, the SwitchPreference where tapping on the preference **also**
> launches a nested PreferenceScreen is lousy UX. I keep forgetting
> there are options under the WiFi one, until I'm trying to connect to
> some new AP and then eventually stumble upon it. And, of course,
> buried inside of there are the advanced settings.
>
>  
> It's worse than that - not only is it necessary to enter the screen that 
> lists networks, it's also necessary to use the Menu (button or the famous 
> three little dots) and bring up "Advanced (Additional) settings"
>
>  FWIW, the Galaxy Nexus default seems to be always-on -- I toggled mine
> back to only-when-plugged-in.
>
>  
> Yes, the default seems to have changed starting with 2.3 (perhaps together 
> with better power management - keeping the WiFi hardware in some kind of 
> low-power mode... that's pure speculation on my part), but I wouldn't count 
> on all manufacturers being consistent with each other.
>
> And then, some users do discover the setting to change the policy.
>
>
>  > From an application's point of view, though, it's just same old> 
> ConnectivityManager.getActiveNetworkInfo - the connection is either there> 
> and it's WiFi, or it's not.
>
>  Well, the decision on whether to use a WifiLock would be based in part
> on WIFI_SLEEP_POLICY -- if WIFI_SLEEP_POLICY is
> WIFI_SLEEP_POLICY_NEVER, you do not need the WifiLock. That was the
> point behind your original post on this thread IIRC.
>
>  
> Checking this setting isn't necessary.
>
> If the WiFi chip is actually on (sleep policy "never" or "plugged in" and 
> the device is in fact plugged in), there will be a connection unless there 
> is nothing to connect to. In the latter case acquiring a WiFi lock is 
> pointless.
>
> If the sleep policy is "off when the screen is off", and the hardware 
> really is off, WifiManager.isWifiEnabled() will still return true, and 
> that's when you'll need to acquire a WiFi lock to set things in motion.
>
> I've only seen this fail on an HTC Hero with 2.1, but that's ancient 
> history. A Moto Milestone also with 2.1 behaves like more current devices.
>
> -- K
>
> 

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

2012-04-02 Thread Put_tiMe
On an AlarmManager intent, I am trying to switch on the device screen. And 
I am relying on the system to switch off the screen after some duration of 
no user activity.
 
I use:  PowerManager.XXX| PowerManager.ON_AFTER_RELEASE | 
PowerManager.ACQUIRE_CAUSES_WAKEUP

flags.

PowerManager.XXX is either 
*SCREEN_DIM_WAKE_LOCK*
 or 
*FULL_WAKE_LOCK*
.

 

Screen does indeed come on in the 
*FULL_WAKE_LOCK*.
 
But each time, and on different devices, the duration it stays on is very 
inconsistent.

Example, sometimes it's 1 second, whereas sometimes it's 25 seconds.

Why is this? Is there anyway I can make it consistent?

 

If I use 
*SCREEN_DIM_WAKE_LOCK*
 flag, 
then on each device the behaviour is different. Like on some devices, the 
screen never comes on, but on some devices, it comes on and is dimmed.

** 
**

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

2012-04-02 Thread Put_tiMe
Okay, I need to sync emails only.
So what is the value to be passed?
 
 

On Monday, April 2, 2012 2:30:57 PM UTC+5:30, Put_tiMe wrote:

> What does the 2nd paramter in the function ContentResolver.requestSync 
> mean?
>  
>  
>

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

2012-04-02 Thread Put_tiMe
What does the 2nd paramter in the function ContentResolver.requestSync mean?
 
 

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

2012-04-01 Thread Put_tiMe
The PowerManager.newWakeLock() will return a new instance of a wake 
lock every time.
 
If I have an intent service or an alarm manager service, then I won't have 
an "instance" to store this wake lock.
 
Whereas I want to work on one instance of the wake-lock object.
 
How do I handle this situation in an intent-service or an alarm manager 
service?
 
 

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

2012-03-31 Thread Put_tiMe
On some devices, like the Sony Erricson Experia, if I long press the power 
button, I get a UI menu, with a sleep mode option.
 
What would be the difference between that sleep mode and the screen-off 
sleep mode?
 
 
On screen-off, i.e. when it hits the sleep mode, are the wifi radios and 
CPU disabled/switched-off?
 
 

On Saturday, March 31, 2012 7:36:06 AM UTC+5:30, Dianne Hackborn wrote:

> On Android "sleep mode" is the screen being off.  What do you mean by 
> "sleep mode"?
>
> On Thu, Mar 29, 2012 at 10:50 PM, Put_tiMe  wrote:
>
>> How can I goto sleep mode on a device?
>>  
>> Is it only via the UI interface by long pressing the "Screen On" button?
>>  
>> Or does it reach automatically goto sleep mode after "X" minutes after 
>> the screen has been switched off?
>>  
>>  
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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

[android-developers] Sleep mode

2012-03-29 Thread Put_tiMe
How can I goto sleep mode on a device?
 
Is it only via the UI interface by long pressing the "Screen On" button?
 
Or does it reach automatically goto sleep mode after "X" minutes after the 
screen has been switched off?
 
 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can I get all the apps that have acquired a wifi lock?

2012-03-29 Thread Put_tiMe
Is there any way I can get a list of apps that have acquired the wifi lock?
 
 

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

2012-03-29 Thread Put_tiMe
Another question, if a particular app has acquired the wifi-lock.
Another app goes and switches off the wifi.
 
What happens now?
Will the wifi-lock prevent the wifi from switching it off?
Or is the wifi lock ignored, and the wifi radio is still switched off.
 
 
 

On Friday, March 30, 2012 10:01:32 AM UTC+5:30, Put_tiMe wrote:

> I want to know if I can do this:
>  
> I have two alarm managers, to trigger once every X minutes.
>  
> Alarm A: every 10 minutes
> Alarm B: every 12 minutes.
>  
> I start both of them at once. So "A" should hit every 10 mins, and "B" 
> should hit every 12 mins.
>  
> Now in "A", I create a wifi lock, and acquire it.
> Because intents raised by alarm-manager won't have a concept of instance, 
> I can't save this wifi-lock object anywhere.
>  
> In "B", How can I use the same wifi lock object to release the wifi lock?
>  
> Is it possible?
>  
>  
>  
>

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

Re: [android-developers] Wifi and phone sleep state

2012-03-29 Thread Put_tiMe
If the wifi radio is disabled when the phone goes to sleep, then how does 
the e-mail app sync?
Does it mean that the e-mail app holds a wifi lock?
 
 

On Friday, March 30, 2012 8:38:23 AM UTC+5:30, Put_tiMe wrote:

> What about this situation::
>  
> 1. I set an AlarmManager to wake up every 15 minutes.
> 2. I switch off the screen, and the phone goes to sleep in a few minutes.
> 3. After 15 mins, the alarm manager kicks in.
> 4. In the alarm manager handler code, can I take a wifi lock? Will this 
> work?
> 5. Then after my job is done (in about 40 seconds) I'll release the wifi 
> lock.
>  
> Does the above stategy look okay?
>  
>
> On Thursday, March 29, 2012 6:59:56 PM UTC+5:30, Mark Murphy (a Commons 
> Guy) wrote:
>
>> On Thu, Mar 29, 2012 at 9:02 AM, Put_tiMe  wrote:
>> > I have a situation where in I use AlarmManager to wake up once in a few
>> > minutes, and switch on/off wifi.
>> > If I don't use the device for a while, then the wifi never connects to 
>> the
>> > preferred wifi network.
>> > Is there anything happening with the wifi if the phone is in a sleep 
>> state?
>>
>> The WiFi radio will power down. Use a WifiLock if you need WiFi. Bear
>> in mind that this increases power drain.
>>
>> -- 
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://github.com/commonsguy
>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>
>> Android Training in NYC: http://marakana.com/training/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] Wifi lock question

2012-03-29 Thread Put_tiMe
I want to know if I can do this:
 
I have two alarm managers, to trigger once every X minutes.
 
Alarm A: every 10 minutes
Alarm B: every 12 minutes.
 
I start both of them at once. So "A" should hit every 10 mins, and "B" 
should hit every 12 mins.
 
Now in "A", I create a wifi lock, and acquire it.
Because intents raised by alarm-manager won't have a concept of instance, I 
can't save this wifi-lock object anywhere.
 
In "B", How can I use the same wifi lock object to release the wifi lock?
 
Is it possible?
 
 
 

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

Re: [android-developers] Wifi and phone sleep state

2012-03-29 Thread Put_tiMe
What about this situation::
 
1. I set an AlarmManager to wake up every 15 minutes.
2. I switch off the screen, and the phone goes to sleep in a few minutes.
3. After 15 mins, the alarm manager kicks in.
4. In the alarm manager handler code, can I take a wifi lock? Will this 
work?
5. Then after my job is done (in about 40 seconds) I'll release the wifi 
lock.
 
Does the above stategy look okay?
 

On Thursday, March 29, 2012 6:59:56 PM UTC+5:30, Mark Murphy (a Commons 
Guy) wrote:

> On Thu, Mar 29, 2012 at 9:02 AM, Put_tiMe  wrote:
> > I have a situation where in I use AlarmManager to wake up once in a few
> > minutes, and switch on/off wifi.
> > If I don't use the device for a while, then the wifi never connects to 
> the
> > preferred wifi network.
> > Is there anything happening with the wifi if the phone is in a sleep 
> state?
>
> The WiFi radio will power down. Use a WifiLock if you need WiFi. Bear
> in mind that this increases power drain.
>
> -- 
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training in NYC: http://marakana.com/training/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] Wifi and phone sleep state

2012-03-29 Thread Put_tiMe
I have a situation where in I use AlarmManager to wake up once in a few 
minutes, and switch on/off wifi.
If I don't use the device for a while, then the wifi never connects to the 
preferred wifi network.
Is there anything happening with the wifi if the phone is in a sleep state?
 
And how exactly does the phone reach the "sleep" state?
 
In a sleep state, will the phone not connect to wifi?
 
 

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

2012-03-27 Thread Put_tiMe
Through code, is there anyway I can connect to a preferred wifi network?
 
I can provide the 'WifiInfo.NetworkID' to mention my preferred network.
 
 

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

2012-03-26 Thread Put_tiMe
I have a situation where I need to have a GridView on the top part and 
buttons below it.
 
If it was the other way around, then, it would have been easy. i.e. buttons 
on top and gridview below it.
For the gridview, I could have mentioned:
 
android:layout_width="wrap_content"
android:layout_height="wrap_content"
 
and it would have worked just fine.
 
 
But I got to have the buttons below the grid view.
So now, how do I size the grid view? Can I mention it in screen height 
percentage?
 
Cause if I use "wrap_content", then the gridview takes up the entire screen 
and the buttons are not visible.
 
And I want it to look even on all screen sizes.
 
 
 

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

2012-03-26 Thread Put_tiMe
Hmm, that is actually quite surprising to me. Especially if I want to do 
something on screen-on and off.
 
So in the above case, if I get the intents in this order Off, On, On, Off   
instead of the right sequence Off, On, Off, On, then all my logic will go 
horribly wrong.
 
 
Are you sure about the system intents being delivered not in the sequence 
they were generated?
 
 

On Monday, March 26, 2012 1:16:51 PM UTC+5:30, Ali Chousein wrote:

> For anything which works asynchronously (BroadcastReceivers work 
> asynchronously) I wouldn't make any assumptions that you are going to 
> receive messages in order. 
>
> --​--- 
> Ali Chousein 
> http://socialnav.blogspot.com | http://twitter.com/socialnav1 
> http://weatherbuddy.blogspot.​com  | 
> http://twitter.com/weather_​buddy  
> http://www.codeproject.com/KB/​android/PayGol-Android.aspx
>  
> http://geo-filtered-assistant.​blogspot.com
>  
>

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

[android-developers] Wifi manager woes

2012-03-25 Thread Put_tiMe
Based on some events, I'm trying to switch on or off wifi.
 
 
Switching wifi off works well. But while switching on wifi, 95% of the 
time, it can't reconnect to my previous wifi network.
If I goto the settings -> wifi, then I see that it's trying to connect, and 
after a while it'll disconnect.
But wifi service is on.
 
Sometimes 'reconnect' call returns false.
 
 
I went to the extent of waiting until the wifi service is switched on, 
before reconnecting.
 
Any idea as to how I can reconnect to my previous (or any) wifi network.
 
 
onEvent_SwitchOn()
{
 WifiManager wifiManager = 
(WifiManager)context.getSystemService(Context.WIFI_SERVICE);
android.text.format.Time cTime = new android.text.format.Time();
 android.text.format.Time nTime = new android.text.format.Time();
   
 if(!wifiManager.setWifiEnabled(true)) {
  Log.e("Err", "setWifiEnabled - true, failed");
 }
 
// wait for about 5 seconds until wifi service is actually switched on
cTime.setToNow();
 nTime.setToNow();
 while(true)
 {
  long diff = nTime.toMillis(true) - cTime.toMillis(true);
  if(diff > 5000)
  {
   break;
  }
  int  state = wifiManager.getWifiState();
  
  if(wifiManager.WIFI_STATE_ENABLED == state)
  {
   break;
  }
  
  try {
   Thread.currentThread().sleep(100);
  } catch (InterruptedException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
  
  nTime.setToNow(); // update to the latest time
 }
 

if(!wifiManager.reconnect()) {
  Log.e("Err", "Wifi manager (reconnect) failed");
 }

}
 
}
 

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

2012-03-25 Thread Put_tiMe
It kind of worked when I switched to a framelayout.
Otherwise it was turning out to be a pain trying to position the controls.
 
 
I didn't try the layout_weight, it looks like that might have worked.
But anyway
 
 

On Sunday, March 25, 2012 7:21:15 AM UTC+5:30, MagouyaWare wrote:

> You could try giving your textview a layout_weight of 1...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/​magouyaware<http://sites.google.com/site/magouyaware>
>
>
> On Thu, Mar 22, 2012 at 3:31 PM, TreKing  wrote:
>
>> On Thu, Mar 22, 2012 at 2:58 AM, Put_tiMe  wrote:
>>
>>> how can I fix this issue? How can I place the image to the extreme RHS 
>>> of the list view row.
>>
>>
>> That should work. What does it look like now? Have you used  
>> http://developer.android.com/​guide/developing/tools/​hierarchy-viewer.html<http://developer.android.com/guide/developing/tools/hierarchy-viewer.html>
>>  to 
>> inspect how the layout appears?
>>
>>
>> --​--​--​---
>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
>> transit tracking app for Android-powered devices
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-developers@​googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+​unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/​group/android-developers?hl=en<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] Broadcast receiver execution.

2012-03-25 Thread Put_tiMe
I have a class which is derived from 'BroadcastReceiver'.
Here I've signed up for screen-off, screen-on, battery-changed and 
user-present intents.
 
I want to know how my class receives messages.
 
Are they received in the order they were raised?
 
Or is there a chance that messages could arrive out of order.
 
Ex. assume the screen was on. Now I switch it off, and immediately switch 
it back on. Then I switch it off immediately. Then I switch it on 
immediately.
I'm talking about this whole sequence of events happening in less than a 
second.
 
In this case will I be receiving the messages in this order:
1. Off
2. On
3. Off
4. On
 
 
Is there any chance they can be out of order?
 
 
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] How is 'onHandleIntent' handled in an IntentService

2012-03-24 Thread Put_tiMe
I have an intent service.
>From another class, I create 3 different intents at 3 different times, like 
this:
 
At Time X:
Intent aIntent = new Intent(context, abcd.service.ABCD_Processor.class);
aIntent.setAction("Do_A");
context.startService(aIntent);
 
At Time X + 50 milliseconds:
Intent bIntent = new Intent(context, abcd.service.ABCD_Processor.class);
bIntent.setAction("Do_B");
context.startService(bIntent);
 
At Time X + 100 milliseconds:
Intent cIntent = new Intent(context, abcd.service.ABCD_Processor.class);
cIntent.setAction("Do_C");
context.startService(cIntent);
 

 
In the *abcd.service.ABCD_Processor* class, the 
protected void *onHandleIntent*(Intent intent)
 
function will be called 3 times.
 
I want to know how the onHandleIntent callback will be invoked?
 
Will they be invoked one after the other, in the order they were raised.
Is there any chance that 'onHandleIntent' will be called in parallel, to 
handle more than one intent simultaneously.
 
 
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] How to place controls properly inside of a custom list view.

2012-03-22 Thread Put_tiMe
I have a custom list view.
 
Each row needs to have a text on the left, and then an image on the extreme 
right hand side.
 
My problem is that I'm not able to place the image on the extreme RHS.
 
 
My XML file for the row looks like this:
 





 

 
how can I fix this issue? How can I place the image to the extreme RHS of 
the list view row.
 
 

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

[android-developers] Handling different icon dimensions from Apps.

2012-03-14 Thread Put_tiMe
I have a requirement wherein I have to enumerate all the installed apps and 
show their names along with their icons.
 
I'm using a grid view for this.
 
Inside the grid view, I have an imageview for showing the app's icon and a 
textview to show the app name.
I have a problem, in the sense every app has got different icon dimensions.
So some icons appear huge, whereas others appear normal.
 
How do I ensure that all icons are of the same width and height?
 
I'm using the following properties for ImageView:

<

ImageView android:id=*"@+id/icon"*

android:layout_width=*"75.0dip"*

android:layout_height=*"75.0dip"*
* *

android:maxWidth=*"75.0dip"*

android:maxHeight=*"75.0dip"*

android:width=*"75.0dip"*
* *

android:height=*"75.0dip"*

android:scaleType=*"centerInside"*

android:adjustViewBounds=*"true"*

android:paddingLeft=*"5dp"*

android:paddingTop=*"0dp"*

android:paddingRight=*"10dp"*

android:paddingBottom=*"10dp"*

android:gravity=*"left"*

android:src=*"@drawable/defaulticon"*/>
 
 

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

2012-03-14 Thread Put_tiMe
I have a gridview, inside which I have a check-box and imageview and 
textview.
 
I need to use the check box to determine whether a particular row is 
selected or not.
 
All the other controls work as expected, except for the check-box.
When I toggle the check box, the corresponding checkboxes in the other 
pages also get toggled.
 
For example, I see 4 rows in one view (i.e. page).
When I select the 1st row check box, then the 5th, 9th, 13th, 17th, etc 
rows are also selected.
 
How can I correct this. I want each row's check box to be independent.
 
 
The contents of the row is coming in from a XML file, and I refer like 
this:  
 

public View getView(*int* position, View convertView, ViewGroup parent)
{
  CheckBox  cbox;
 
 
  cbox = convertView.findViewByID(R.id.checkBoxID);
 
}
 
 
 

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

[android-developers] How to use 'IActivityWatcher'?

2012-03-12 Thread Put_tiMe
How do I register for an 'IActivityWatcher' callback?
 
 

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

2012-03-12 Thread Put_tiMe
Given that I can scan an APK file, is there anyway I can get to know if it 
uses ads or not.

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

2012-03-11 Thread Put_tiMe
I might have to extend ScrollView and I would like to call it *myScrollView*
.
Is it possible to specify this *myScrollView* in the XML file itself?
Or can it be done only programmatically?
 
 
If it can be done only through code, then, can I squeeze in a layout 
specified in the XML file into *myScrollView?*
So that *myScrollView* becomes the parent.
 
 
 

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

2012-03-11 Thread Put_tiMe
I have a ScrollView. If the orientation is changed, then it's scroll 
position is automatically changing.
 
Is there any way to switch off automatic scrolling?
 
If I use any other view, like LinearLayout, then it works fine (except 
there is no manual scrolling also)

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

2012-03-09 Thread Put_tiMe
Ok, I tried the frame layout.
 
And my XML file is something like this:
 
http://schemas.android.com/apk/res/android";
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

 
 
 
 



 
 
Now it did work on my phone.
But it still doesn't behave well on my 7" tablet.
 
My first problem is that it doesn't fill the entire screen. Why is that?
I have mentioned "fill_parent" for the frame layout.
 
 

On Friday, March 9, 2012 2:07:57 AM UTC+5:30, MagouyaWare wrote:

> Or you can just display an image view and set the background and 
> foreground to what you want them to be...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Thu, Mar 8, 2012 at 5:42 AM, sha m  wrote:
>
>> FrameLayout helps to draw one view above another 
>>
>>
>>
>> On Thu, Mar 8, 2012 at 6:10 PM, Put_tiMe  wrote:
>>
>>> I need to have a background and a foreground image views in a 
>>> LinearLayout.
>>>  
>>> Obviously the background has to be drawn before the foreground.
>>>  
>>> How can I do it?
>>>  
>>>  
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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
>>
>
>
On Friday, March 9, 2012 2:07:57 AM UTC+5:30, MagouyaWare wrote: 
>
> Or you can just display an image view and set the background and 
> foreground to what you want them to be...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Thu, Mar 8, 2012 at 5:42 AM, sha m  wrote:
>
>> FrameLayout helps to draw one view above another 
>>
>>
>>
>> On Thu, Mar 8, 2012 at 6:10 PM, Put_tiMe  wrote:
>>
>>> I need to have a background and a foreground image views in a 
>>> LinearLayout.
>>>  
>>> Obviously the background has to be drawn before the foreground.
>>>  
>>> How can I do it?
>>>  
>>>  
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

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

[android-developers] Background and foreground image views

2012-03-08 Thread Put_tiMe
I need to have a background and a foreground image views in a LinearLayout.
 
Obviously the background has to be drawn before the foreground.
 
How can I do it?
 
 

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

2012-03-08 Thread Put_tiMe
I think I have a hint as to what is going on.
 
Basically my first focussable item is not right on top.
So when the layout changes, the current focussable item is brought into 
view. During this calculation, the scroll is set.
That is why my top portion of the layout is scrolled out.
 
How do I prevent this?
 

On Thursday, March 8, 2012 4:51:52 PM UTC+5:30, Put_tiMe wrote:

> I have a scroll view activity under which I have lot's of UI objects.
>  
> Now let's say when the activity starts up, the view is right on top.
>  
> Now if I change the orientation of the phone, I observe that my activity 
> has automatically scrolled to a different position.
> I don't want the scroll position to change, i.e. I want to see 
> approximately the same content.
>  
> I tried fixing it by saving the scroll position in the 
> 'onSaveInstanceState' and then restoring it in 'onCreate'.
> But didn't work.
>  
> How do I fix this?
>

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

[android-developers] Scroll position is not the same when orientation changes.

2012-03-08 Thread Put_tiMe
I have a scroll view activity under which I have lot's of UI objects.
 
Now let's say when the activity starts up, the view is right on top.
 
Now if I change the orientation of the phone, I observe that my activity 
has automatically scrolled to a different position.
I don't want the scroll position to change, i.e. I want to see 
approximately the same content.
 
I tried fixing it by saving the scroll position in the 
'onSaveInstanceState' and then restoring it in 'onCreate'.
But didn't work.
 
How do I fix this?

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

[android-developers] Re: How to find out when any activity starts or get focus

2012-03-01 Thread Put_tiMe
How do I register for IActivityWatcher?
 

On Thursday, March 18, 2010 3:02:48 PM UTC+5:30, Csenteri Barna wrote:

> I understand this scenarios Bob and I agree with You.
> But what you say is DOABLE right now very-very easy with a background
> service which is polling the current task (current activity)
> periodically using the ActivityManager.getCurrentTasks function (ofc
> GET_TASKS right is needed for it). This solution will eat a bit more
> cpu that's it, but it is working, tried already. Since this wasn't
> considered as a vulnerability I thought it is a simplier way to
> achieve this. Maybe after Dianne reads this it won't be possible in
> the next versions :) 
>
> >IActivityWatcher
> Thank You Dianne - I'll try this one. 
>
> At the end we might completly drop this feature - it seems to be too
> complicated, we wanted only if it's easy, doesn't eats too much
> resources and doesn't needs big changes in the activity manager deep
> code. We will give led control for custom aplications via a service or
> a lib which is more important for us. We'll see. 
>
> >moved to android-porting
> I think we can close this one - Your answer cleared up what is
> possible and what's not. TY.
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Getting access to the cluster level data of an micro SD card.

2012-02-15 Thread Put_tiMe
In Android, is it possible to get access to the cluster level data of a 
micro SD card?
 
Like in Win32, you would do a CreateFile("\\.\\d:", );
or CreateFile("physicaldrive0\ ", );
 
That way I should be able to access the boot sector.
 
Does Android support SD cards with FAT file system only?
Or are there any more that are supported?
 
Thanks

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

Re: [android-developers] Re: Passing parameter in intent.

2012-02-14 Thread Put_tiMe
Got it working, 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] Passing parameter in intent.

2012-02-13 Thread Put_tiMe
I'm trying to send a parameter to an activity. But the problem is that in 
the activity's 'onCreate' callback, the 'Bundle' parameter is always null.
 
 
 

Intent aintent = *new* Intent(android.content.Intent.*ACTION_VIEW*);
*try
*{

aintent = new Intent(getApplicationContext(), AAA.*class);*
aintent.putExtra(Intent.*EXTRA_TEXT*, *"whatever"*);

startActivity(aintent);

}

 

@Override

*public* *void* onCreate(Bundle savedInstanceState) {

'savedInstanceState' is always null
 
}

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

2012-02-07 Thread Put_tiMe
Ok, I got it to work.
I HAD to add a scroll view to the text view.
 
http://schemas.android.com/apk/res/android";
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:orientation="vertical"
 android:isScrollContainer="true"
 android:scrollbars="vertical|horizontal"
 android:scrollbarStyle="outsideOverlay" >
 

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="text|textMultiLine"
android:scrollHorizontally="false"

 
And for the word wrap to work, see the attributes for TextView above.
 
 
 

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

2012-02-07 Thread Put_tiMe
Ok, by derived, I mean can I find out how long the battery will last?
This is because battery lasts longer at ideal temperature, 
 
Or if the voltage is not within a threshold, then does it mean anything?
If the voltage is high, then does it mean more power is being consumed, and 
thus the battery will not last as long as it should.
 
 

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

2012-02-07 Thread Put_tiMe
I have a main activity. Based on a button press, I have to launch a 'new' 
activity.
This 'new' activity has just one UI item, i.e a TextView.
I've added properties which will indicate that it is scrollable: *
android:scrollbars*
 (vertical), 
*android:scrollHorizontally*
 (true), 
android:layout_width="wrap_content"
android:layout_height="wrap_content"
 
The 'new' activity is started like this: 
getApplicationContext().startActivity(this, MyNewActivity.class);
 
The 'new' activity shows up fine, but my only issue is that the text view 
is not scrollable. There is enough content for the TextView to scroll.
I want to get it to scroll vertically.
 
 
Is there anything I'm missing?
 
 
 
Sub questions: 
And how do I enable word-wrap on a TextView?
How do I know if an activity has already started/running?
 
 
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

  1   2   >