[android-developers] Re: Reading expansion file in Android 6.0

2016-04-08 Thread Alexey Danilov
To resolve this problem for API 23 I download .obb file to private app's 
file directory instead of `obb` directory which my app hasn't access to. 
You can review my solution here 

 
.
Usage:

repositories {
maven { url 'https://dl.bintray.com/alexeydanilov/apk-expansion' }
}
dependencies {
compile 'com.danikula.expansion:expansion:VERSION@aar'
compile 'com.danikula.expansion:license:VERSION@aar'
compile 'com.danikula.expansion:zip:VERSION@aar'
}

See the latest versions here 


пятница, 5 февраля 2016 г., 20:49:32 UTC+3 пользователь vic...@boomzap.com 
написал:
>
> Hi,
> I have an app that uses expansion files and it works fine on less than api 
> 23 devices, but on android 6.0 the obb cannot be read neither by 
> FileInputStream nor by ndk fopen with permission denied error in case the 
> obb and apk are downloaded from store at once. If the runtime permission to 
> the app is granted from android settings it runs fine. If the downloader 
> code runs, or if the obb is uploaded to device into the same folder - the 
> obb can be read without runtime permissions.
>
> Is it possible to read expansion file without runtime permissions for 
> WRITE_EXTERNAL_STORAGE (listed in manifest as well) on android 6 ?
>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/b5c2df11-5165-451c-ba3d-3ed26e7eb147%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: terminating android application

2013-01-03 Thread Alexey Redinskii
If your activities host in different processes, you have to kill the
processes manually. Otherwise the command kills all activities hosted in
one process.

On Thu, Jan 3, 2013 at 11:17 AM, laxman k  wrote:

> it is only kill the current activity
>
> On Thu, Jan 3, 2013 at 1:27 PM, Sushant Das  wrote:
>
>> *android.os.Process.killProcess(android.os.Process.myPid())*
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
*Kind Regards,
Alexey.*

*Phone (cell):** **+375 29 5109703

**Skype: i4004Sam**
**Email:** aredins...@gmail.com
** *

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

Re: [android-developers] Disabling/Hiding the Application ?

2012-11-09 Thread Alexey
Dianne, is it possible to disable other apps that I'm developing.
For example, I develop 2 apps, and then I develop third app that includes 
functionality of previous ones. Can I disable my old apps? Is it possible 
to add some common security id in manifest to do this 
using setApplicationEnabledSetting ?

On Tuesday, March 2, 2010 9:35:30 AM UTC+4, Dianne Hackborn wrote:
>
> You can do this to your own app with these:
>
>
> http://developer.android.com/reference/android/content/pm/PackageManager.html#setApplicationEnabledSetting(java.lang.String,
>  
> int, int)
>
>
> http://developer.android.com/reference/android/content/pm/PackageManager.html#setComponentEnabledSetting(android.content.ComponentName,
>  
> int, int)
>
> Of course you can not do this to other applications.
>
> On Mon, Mar 1, 2010 at 4:53 PM, GPU >wrote:
>
>> Hi ,
>>
>>  How to  disable a application which already installed in the
>> device ?.
>> So that it wont display icon to the user & user cant invoke the app by
>> "pm start -n /." .
>>
>> Is their any way to do that ?.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, 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
> hac...@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] How to implement actiobar drawers?

2012-08-16 Thread Alexey Zakharov
There is Drawers section inside ActionBar guidelines 
http://developer.android.com/design/patterns/actionbar.html

How actionbar drawer should be implemented?

--
Alexey

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

2012-06-27 Thread Alexey
I am developing an Android application in which I have to communicate
to an USB device. I tried to use standart google API in my app, but
list of devices is allways empty.

Same things if i use USB device info with google api. List of devices
searched by google api is empty,

lsusb gives following results:

Bus 001 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0002
Bus 003 Device 001: ID 1d6b:0001
Bus 002 Device 002: ID 2226:0014

my device is 2226:0014

log of eclipse:

I/USB3G(92): event { 'add', '/devices/platform/sw-ehci.1/usb2/2-1',
'usb', '', 189, 133 }
I/USB3G(92): path : '/sys/devices/platform/sw-ehci.1/usb2/2-1'
I/USB3G(92): VID :size 5,vid_path '/sys/devices/platform/sw-ehci.1/
usb2/2-1/idVendor',VID  '2226
I/USB3G(92): '.
I/USB3G(92): PID :size 5,Pid_path '/sys/devices/platform/sw-ehci.1/
usb2/2-1/idProduct',PID  '0014
I/USB3G(92): '.
I/USB3G(92): cmd=/system/etc/usb_modeswitch.sh /system/etc/
usb_modeswitch.d/2226_0014 &,
I/USB3G(92): excute ret : 0,err:No such file or directory

If i plug in devices like rs232 adapters, bluetooth dongle, nothing
happens,and there is no any result from API and lsusb.

Prtocol of a device is based on ezusb library. Android v.: 4.0.3
kernel v.: 3.0.8 firmware build: crane_evb-eng 4.0.3 IMLK74k 20120330

Is there are any way to access hidden USB devices via API?

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

2012-04-20 Thread Alexey Zakharov
Please include DiskLruCache 
(http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html) 
to next version of support package.

Alexey Zakharov



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

2012-03-22 Thread Alexey Sinyutin
Good time.
I have problem with SAXParserFactory.newInstance();.
I have error look like : "SAXParserFactory.newInstance cannot be resolved 
to a type"
Ccode:

> try{
>
> URL website=new URL (fullUrl);
>
> SAXParserFactory spf=new SAXParserFactory.newInstance();   -only  in 
>> this line i have error
>
> SAXParser sp=spf.newSAXParser();
>
> XMLReader xr=sp.getXMLReader();
>
> } 

Part of Import code:

> import javax.xml.parsers.SAXParser;
>
> import javax.xml.parsers.SAXParserFactory;
>
>  How i can resolve 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

Re: [android-developers] Crashed service restarted by system doesn't call onStart

2012-03-05 Thread Alexey Zakharov
So what is the right solution. Start service from onCreate?

On Wednesday, April 1, 2009 2:38:15 AM UTC+7, Dianne Hackborn wrote:
>
> That is working as intended.  onStart() is called each time someone calls 
> startService(); if nobody has called startService() since your last 
> onStart(), then onStart() will not be called again.  The Service class does 
> not have the same lifecycle as Activity; it is unfortunate we used "start" 
> for the method here as well, because it is not the same as activity.
>
> On Tue, Mar 31, 2009 at 12:31 PM, Charles Harley <
> charles.har...@googlemail.com> wrote:
>
>>
>> I have noticed that if my background service crashes the system will
>> automatically restart the service after 5 seconds. This is great, but
>> I have noticed that only the onCreate method gets called and not the
>> onStart method. Does this mean the service is properly restarted or do
>> I need to do something special in the onCreate method to make sure it
>> is?
>>
>> I did have my initialisation logic in the onCreate method and my
>> starting service logic in the onStart method but it looks like it will
>> all have to be in the onCreate method.
>>
>> Many thanks,
>>
>> Charles
>>
>>
>
>
> -- 
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to 
> provide private support.  All such questions should be posted on public 
> forums, where I and others can see and answer them.
>
>

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

[android-developers] Missing class

2012-01-08 Thread Alexey Kuznetsov
Hello!

Just one question from nooby developer.

Why I can find source for ServiceManager inside android 4.0.3 source
tree but no ServiceManager.class under andoird.jar?

I expect to see the following line:

./platforms/android-15/data/android/content/SyncStorageEngine.class

but here only this output:

axet-laptop:android-sdk-macosx axet$ find . | grep SyncStorageEngine
./platforms/android-10/data/android/content/SyncStorageEngine
$PendingOperation.class
./sources/android-15/android/content/SyncStorageEngine.java
./sources/android-15/android/content/SyncStorageEngineTest.java
axet-laptop:android-sdk-macosx axet$

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

2011-12-17 Thread Alexey Zakharov
I want to integrate Google Places Api to my android application. Im afraid 
that my api key could be stolen from Android app and used by third party.

How can I avoid that?

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

[android-developers] Android Network Provider sometimes stop using WiFi and start using Cell Tower even then person is still on same place. How to avoid that?

2011-12-16 Thread Alexey Zakharov


Android Network Provider sometimes stop using WiFi and start using Cell 
Tower even then person is still on same place. How to avoid that?

I have tested several apps. Google maps, mapquest, glympse. Only google 
maps works correct. My own app, mapquest and glympse show wrong location 
based on cell towers instead of using wifi. Im 100% sure that wifi location 
is available, because after about 20 minutes it starts using 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] How can I cache Google Maps tiles using Android SDK?

2011-12-09 Thread Alexey Zakharov
I want to implement "Download map 
area"feature
 like official Google Map application. Is it possible 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] Does Google has any plan to release vector based google maps for android SDK?

2011-11-21 Thread Alexey Zakharov


Does Google has any plan to release vector-based google maps for android 
SDK?

They have release vector-based google map application for Android long ago, 
but api is still based on image tiles.

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

[android-developers] How can implement double tap zoom in gesture, and two-fingers tap zoom out gesture?

2011-11-21 Thread Alexey Zakharov
How can implement double tap zoom in gesture, and two-fingers tap zoom out 
gesture?

This gestures works in Google Maps Application. They are by default 
available in IPhone SDK.

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

2011-11-21 Thread Alexey Zakharov
So Google provides legacy api to developers. Why google won't adopt same 
technique for sdk. =\

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

2011-11-21 Thread Alexey Zakharov
Android google maps sdk approximate zoom level to discrete values. I mean 
that i cannot set it to 13.33 it will convert it to 13. However Google 
Android Maps application doesn't do it. How they achieved that?

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

Re: [android-developers] What is the proper way to change look of MapView zoom controls in Android?

2011-11-15 Thread Alexey Zakharov
I just like this style and want to reproduce this in my app. 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] What is the proper way to change look of MapView zoom controls in Android?

2011-11-15 Thread Alexey Zakharov


What is the proper way to change look of MapView zoom controls in Android?

I want to repoduce zoom button from new google maps.




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

2011-11-03 Thread Alexey Zakharov
Even with POP_BACK_STACK_INCLUSIVE onResume of popped Fragment is called. 
You need to add alternative method that will allow remove element from back 
stack without resuming 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] How can I pop fragment from backstack without resuming it?

2011-11-02 Thread Alexey Zakharov


How can I pop fragment from backstack without resuming it? I just want to 
remove from back stack, I don't want to display 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] How can handle AlertDialogFragment events inside Fragment that created it?

2011-11-01 Thread Alexey Zakharov
For dialogs fragments UI google 
recommends
 to 
extend DialogFragment. However in provided sample it handle alert inside 
activity, but I need to do it inside fragment that invoke dialog. Any ideas 
how to 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] Does Google notify devise that c2dm registration_id is expired?

2011-09-27 Thread Alexey Zakharov
Does Google notify devise that c2dm registration_id is expired? If yes in 
what method should I handle 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] Is there any oauth2 lib that implemnt client side flow for both facebook and google?

2011-08-31 Thread Alexey Zakharov
Is there any oauth2 lib that implemnt client side flow for both facebook and 
google?

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

[android-developers] Re: What is the right way to get updates from REST service by timer in Android?

2011-08-09 Thread Alexey Zakharov
*UPDATE: I need to receive updates even if user has switched to another 
application or receive a call. UI also should be updated. So when user 
switch back to the application he should see updated view.*

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] What is the right way to get updates from REST service by timer in Android?

2011-08-09 Thread Alexey Zakharov
 

I wonder what is the right way to get updates from REST service by timer in 
Android?

May be I should use timer 
taskfor 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] What should I use for common parts of UI in Android application?

2011-08-09 Thread Alexey Zakharov
Yep, from my searches in Uber's code it uses ViewStabs and single map 
activity.

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

[android-developers] What should I use for common parts of UI in Android application?

2011-08-08 Thread Alexey Zakharov
Here is Uber Android application. As you see each of screen has some common 
elements: header, map control etc. But each view has different header 
buttons and subview with some view specific details.

Should this screens be separate activities?
Is fragments API right thing to implement 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] Simulate GPS speed and heading on Android Emulator

2011-07-25 Thread Alexey Zakharov


Im trying to test my phonegap gps location application on Android Emulator.

I need to simulate W3C gps speed and heading on Android Emulator 
http://dev.w3.org/geo/api/spec-source.html.

Using DDMS i was able to setup kml path. However navigation.watchPosition 
only see latitude and longitude changes, heading and speed parameters are 
undefined.

Any ideas how to solve 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: Is there any way to disable landscape mode for widget?

2011-06-10 Thread Alexey Onuchin
Hmm, Ok. Then I will provide additional layouts :)
Thanks.

On 10 июн, 16:24, Mark Murphy  wrote:
> On Fri, Jun 10, 2011 at 8:18 AM, Alexey Onuchin  wrote:
> > I'm developing a simple widget for which I want to leave only portrait
> > mode. So is there any way to block lanscape mode like we can do it for
> > Activities?
>
> No, sorry.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 3.0 Programming Books:http://commonsware.com/books

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


[android-developers] Is there any way to disable landscape mode for widget?

2011-06-10 Thread Alexey Onuchin
Hi to all,

I'm developing a simple widget for which I want to leave only portrait
mode. So is there any way to block lanscape mode like we can do it for
Activities?


Thanks in advance,
Alexey

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

2011-05-13 Thread Alexey Onuchin
Hi to all,

I faced with one strange issue designing my widget layout.
At first I decided to make it 3x2 cells for all supported screens. So
I use minWidth=220dip and minHeight=146dip in my xml/widget.xml:

http://schemas.android.com/apk/res/
android"
android:minHeight="220dip"
android:minWidth="146dip"
android:updatePeriodMillis="0"
android:initialLayout="@layout/widget"/>

Then I designed several widget layouts - for mdpi, large-mdpi, ldpi
and hdpi - where:

http://schemas.android.com/apk/res/
android"
  android:id="@+id/Widget"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">
...


So I expect that for all supporting screens the widget size will fit
3x2 cells, not more, not less.

But currently when I run it on emulator I see that my widget takes
more than a half of a screen for all supporting screens - 4x3 cells if
to talk that the max size is 4x4 cells (as it described here:
http://developer.android.com/guide/practices/ui_guidelines/widget_design.html#sizes).

Even if I'll define exact layout_width and layout_height in my widget
layouts in dip it will still take 4x3 cells, just it's visible part
will have another size.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Castor unmarshalling with Android's SAX DOM implementation throws: The 'namespace-prefix' feature is not supported while the 'namespaces' feature is enabled

2011-02-17 Thread Alexey Skor
I tried adding xerces.jar to my Android project and replacing default xml 
factory for Castor, but this failed with 
Dx  trouble processing "javax/xml/parsers/DocumentBuilder.class":
Conversion to Dalvik format failed with error 1

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Castor unmarshalling with Android's SAX DOM implementation throws: The 'namespace-prefix' feature is not supported while the 'namespaces' feature is enabled

2011-02-12 Thread Alexey Skor
Same here... My library does not work on Android because of this bug (
https://code.google.com/p/redmine-java-api/issues/detail?id=13). Any updates 
on this?
I'm quite disappointed that Android uses something, which looks like Java, 
but is not really Java - so many incompatibilities... Sad. 

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

2010-12-15 Thread Alexey Bychkov
Hello,
I write application and use prefernces.
When i change value on checkbox and restart my app value not save and
checkbox has value by default.
But it's in android 2.0,2.1,2.2... in android 1.6 it works correctly.
What is the 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


Re: [android-developers] R.java file of my project is deleted.......how to get it back

2010-07-29 Thread Alexey Vdovin
On Thu, Jul 29, 2010 at 4:19 PM, A N K ! T  wrote:
> hey
>   R.java has deleted autometically...how to get it back
>
> --
>
>  A N K ! T..

Clean the project.

Menu [Project] -> [Clean...] -> Select you project -> [OK]
Project will rebuild automatically, if not, chek
Menu [Project] ->[Build Automatically]

---
Best Regards
Alexey

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

2010-07-27 Thread Alexey Vdovin
Hi,

I'm looking for any tricks to intercept USSD response from my carrier
to receive my current balance.
Do anybody know how to get access to AT command interface of GSM radio?

---
Best Regards
Alexey

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

2010-07-15 Thread Alexey Kryshen
Hello!

5% for the SwapBuffer is not a big deal. It is possible it took the
90% of frame time under some circumstances.

Please note following:
1) SwapBuffer has implicit glFinish() semantic. All the GL commands
issued prior the SwapBuffer will be completed before actual swap is
occur. And it is can take the time.
2) eglSwapBuffer also involve something similar to the "VSync" and it
can take the time too.Please see the eglSwapInterval() in the EGL
specification for details
3) If you have issued extremely small number of GL commands per frame
then it can be just that they really executed faster compared to
SwapBuffer in respect to (1) and (2)

But in my opinion 5% is not the value to be bothered with.

Best regards, Alexey

On Jul 15, 12:17 pm, HaMMeReD  wrote:
> I noticed in the profiler that eglSwapBuffers is taking up about 5% of
> my time each frame in some opengl code I'm writing. It seems like
> quite a heavy for something that should just be a blit, is there
> anything in my egl setup I can do to optimize this more?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is the EGL_CONTEXT_LOST error is occur on the Nexus One or other real devices ?

2010-07-15 Thread Alexey Kryshen
Hello!

We are developing game for the Android platform using OpenGL ES for
drawing. The EGL specification states that EGL_CONTEXT_LOST error may
occur under some circumstances and there is constant in the Android
API for this error code, but we have never seen that error on real
Nexus One device (we are expected it when device is going sleep).

Is anybody was able to catch this error on the real devices ? I want
to know how I can get this error to check the correctness of codepath
handling this event.

Thanks in advance!

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


[android-developers] Change drawable for indeterminate progress bar

2010-06-29 Thread Alexey Volovoy
Hi all, i'm trying to change standard indeterminate progress bar from
rotating wheel to sequence of 3 images ( dots ).

What i have is a animation drawable defined as progress.xml :

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



 

and progressbar defined as :

 

In general it works - however image is repeated for as much i have
space horizontally.  I think it's side effect of same kind of stuff
used in progress_indeterminate_horizontal.xml

Is there anyway to get rid of that repeating behavior ? Alternative,
as i understand would be change progressBar to ImageView with
animation drawable inside.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 know if child activity exit by unexpected exception (onActivityResult() is not called)

2010-06-29 Thread Alexey Kryshen


On Jun 28, 7:37 pm, TreKing  wrote:
> On Wed, Jun 23, 2010 at 7:57 AM, Alexey Kryshen  wrote:
> > If child activity started by the startActivityForResult() exit by
> > unexpected exception the
> > onActivityResult() is not called and I have no any ideas how can I handle
> > this to get application working in a fail-safe manner ?
>
> You can register an uncaught exception handler to catch any exceptions that
> are not otherwise handled properly.

How you can register uncaught exception handler for third-party
activity if latter even runs in the another VM in separate process. It
is impossible, isn't ?

>
> > When my code runs child activity with startActivityForResult() it awaits
> > until onActivityResult() will be invoked to get working further, but
> > onActivityResult() is not calling and my code is "hang- up" (logically).
>
> This is strange. AFAIK, if any activity in your stack crashes, your who
> Application comes down with it. You should not be "stuck", especially since
> startActivityForResult() doesn't block - it just starts the child activity
> then waits for a return value in onActivityResult(). Unless you're doing
> something that prevents the app from functioning until a valid response is
> obtained.
>

Activities stack doesn't mean all activity runs in your process.
Camera runs in separate process because it is another application at
all.

And you are somehow wrong with my application "stuck". It is logical
"stuck" - application is an state machine and after Picture requested
it is in the "Awaiting picture" state and only way to leave that state
is to receive
onActivityResult() to go further. But latter is not invoked and
application logically "stuck" in the "Awaiting picture" state. The
activity itself is normally worked, GUI thread is not blocked but
application awaiting response on startActivityForResult() forever. It
is a problem naturally.

I have already implement an "hack" to workaround the issue but not
happy with it. The hack itself exploit the other fact from
documentation that onActivityResult() must be invoked immediately
before onResume(). If startActivityForResult() was called and my
activity receive onResume() without onActivityResult() prior it I have
consider this like receiving RESULT_CANCELED. It is resolve the issue
but naturally looks like ugly hack.

Any other ideas ?



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

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


[android-developers] How to know if child activity exit by unexpected exception (onActivityResult() is not called)

2010-06-23 Thread Alexey Kryshen
Hello!

I have faced with issue about startActivityForResult() and
onActivityResult(). If child activity started by the
startActivityForResult() exit by unexpected exception the
onActivityResult() is not called and I have no any ideas how can I
handle this to get application working in a fail-safe manner ?

When my code runs child activity with startActivityForResult() it
awaits until onActivityResult() will be invoked to get working
further, but onActivityResult() is not calling and my code is "hang-
up" (logically).

So the question is how can I handle all possible ways the child
activity is finished (normally and by unexpected exception) to get
fail-safe code ?

I have check the documentation for this issue but have found nothing
relating issue.

Thanks in advance!

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


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-23 Thread Alexey
Received the Nexus 1 in BC, Canada. Too bad it's not AT&T version to
use with Rogers/Fido but I'm liking it and ready to write some cool
new apps. Thank you Google,
thankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyou...

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-23 Thread Alexey
That's too bad. I was also so hoping for AT&T version. But it's a
gift, can't complain.
Still looking forward for my Nexus to arrive in BC.

On Mar 23, 11:15 am, nloko  wrote:
> Ya, it looks to be the T-mobile version. FCC ID NM8PB99100 is what's
> on the box. Apparently, the AT&T version is NM8PB99110.
>
> On Mar 23, 12:08 pm, nloko  wrote:
>
>
>
> > Just got my Nexus One in Alberta, Canada via Fedex
>
> > I'm trying to figure out how to fell if this is the AT&T version w/o
> > ripping everything apart and popping in my SIM. (considering selling
> > and getting the AT&T version if its the T-mobile one)
>
> > Any tips? I tried looking up the FCC ID athttp://www.fcc.gov/oet/ea/fccid/
> > but, I really don't know what I'm looking at. :S

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Need advice on UI control/feature implementation

2009-12-23 Thread Alexey Volovoy
Hi All , i have a requirement to have a control that visually is
similar to the expandable list. However on the expansion of the
section it should show something similar to the grid view. GridView
should properly respond to itemclicks and should not be scrollable and
expanded fully till the next section of the list item.
As we know it's not a good idea to mix scrollable controls on the same
screen, so i'm looking for alternative way of building such thing. Any
direction advice/ hints will be appreciated.

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

2009-12-21 Thread Alexey Krasnoriadtsev
bump

Anyone has any ideas?

On Dec 18, 9:35 pm, Alexey Krasnoriadtsev 
wrote:
> It looks like there is something wrong with the player (opencore), at
> times, video playback will get stuck on one frame, and will stay there
> for a long time.
>
> If you look at the log, you can see that player started playing at
> 17:59:48, at that time it has already buffered 6 seconds of video.
> Then at 17:59:53 the video and sound got stuck, while buffering kept
> going on in the background
>
> After 25 seconds (18:00:19) it resumed playing and buffer was already
> at 36 seconds, and all this time the api report that it is playing,
> meaning in the code, i don't know that video is stuck...
>
> Any thoughts or suggestions? This started to happen in donut (1.6)
> with the introduction ofopencore2. I have never seen this problem in
> with previous version of opencore (android versions <= 1.5)
>
> Legend: the integers next to "current" and "buffer" are in seconds of
> video. while "playerDriver buffering" are in percentages.
>
> 12-18 17:59:48.529 D/dalvikvm(19121): GC freed 4446 objects / 813696
> bytes in 294ms
> 12-18 17:59:48.589 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 0 buffer: 4 playing?true
> 12-18 17:59:49.109 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 0 buffer: 4 playing?true
> 12-18 17:59:49.269 D/PlayerDriver(18730): buffering (5)
> 12-18 17:59:49.619 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 1 buffer: 5 playing?true
> 12-18 17:59:50.119 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 1 buffer: 5 playing?true
> 12-18 17:59:50.279 D/PlayerDriver(18730): buffering (6)
> 12-18 17:59:50.619 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 2 buffer: 6 playing?true
> 12-18 17:59:51.119 V/RhythmClipBrowser(19121): channels count: 20
> 12-18 17:59:51.249 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 3 buffer: 6 playing?true
> 12-18 17:59:51.619 D/PlayerDriver(18730): buffering (7)
> 12-18 17:59:51.759 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 3 buffer: 7 playing?true
> 12-18 17:59:52.269 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 4 buffer: 7 playing?true
> 12-18 17:59:52.719 D/PlayerDriver(18730): buffering (7)
> 12-18 17:59:52.779 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 4 buffer: 7 playing?true
> 12-18 17:59:52.939 D/PlayerDriver(18730): buffering (8)
>
> ->>>>>> VIDEO FREEZES HERE,
>
> 12-18 17:59:53.289 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 8 playing?true
> 12-18 17:59:53.794 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 8 playing?true
> 12-18 17:59:54.301 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 8 playing?true
> 12-18 17:59:54.724 D/PlayerDriver(18730): buffering (8)
> 12-18 17:59:54.809 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 8 playing?true
> 12-18 17:59:55.314 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 8 playing?true
> 12-18 17:59:55.621 D/PlayerDriver(18730): buffering (9)
> 12-18 17:59:55.819 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 9 playing?true
> 12-18 17:59:56.325 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 9 playing?true
> 12-18 17:59:56.719 D/PlayerDriver(18730): buffering (9)
> 12-18 17:59:56.829 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 9 playing?true
> 12-18 17:59:57.340 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 9 playing?true
> 12-18 17:59:57.849 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 9 playing?true
> 12-18 17:59:58.353 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 9 playing?true
> 12-18 17:59:58.730 D/PlayerDriver(18730): buffering (9)
> 12-18 17:59:58.859 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 9 playing?true
> 12-18 17:59:59.363 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 9 playing?true
> 12-18 17:59:59.849 D/PlayerDriver(18730): buffering (10)
> 12-18 17:59:59.869 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 10 playing?true
> 12-18 18:00:00.371 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 10 playing?true
> 12-18 18:00:00.879 V/UpdatedMediaPlayerActivity(19121): update
> progress, current: 5 buffer: 10 playing?true
> 12-18 18:00:01.119 D/PlayerDriver(18730): buffering (11)
> 12-18 18:00:01.349 I/ActivityManage

[android-developers] Video Playback freezes on 1.6 donut with opencore2

2009-12-18 Thread Alexey Krasnoriadtsev
It looks like there is something wrong with the player (opencore), at
times, video playback will get stuck on one frame, and will stay there
for a long time.

If you look at the log, you can see that player started playing at
17:59:48, at that time it has already buffered 6 seconds of video.
Then at 17:59:53 the video and sound got stuck, while buffering kept
going on in the background

After 25 seconds (18:00:19) it resumed playing and buffer was already
at 36 seconds, and all this time the api report that it is playing,
meaning in the code, i don't know that video is stuck...

Any thoughts or suggestions? This started to happen in donut (1.6)
with the introduction of opencore2. I have never seen this problem in
with previous version of opencore (android versions <= 1.5)

Legend: the integers next to "current" and "buffer" are in seconds of
video. while "playerDriver buffering" are in percentages.


12-18 17:59:48.529 D/dalvikvm(19121): GC freed 4446 objects / 813696
bytes in 294ms
12-18 17:59:48.589 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 0 buffer: 4 playing?true
12-18 17:59:49.109 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 0 buffer: 4 playing?true
12-18 17:59:49.269 D/PlayerDriver(18730): buffering (5)
12-18 17:59:49.619 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 1 buffer: 5 playing?true
12-18 17:59:50.119 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 1 buffer: 5 playing?true
12-18 17:59:50.279 D/PlayerDriver(18730): buffering (6)
12-18 17:59:50.619 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 2 buffer: 6 playing?true
12-18 17:59:51.119 V/RhythmClipBrowser(19121): channels count: 20
12-18 17:59:51.249 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 3 buffer: 6 playing?true
12-18 17:59:51.619 D/PlayerDriver(18730): buffering (7)
12-18 17:59:51.759 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 3 buffer: 7 playing?true
12-18 17:59:52.269 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 4 buffer: 7 playing?true
12-18 17:59:52.719 D/PlayerDriver(18730): buffering (7)
12-18 17:59:52.779 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 4 buffer: 7 playing?true
12-18 17:59:52.939 D/PlayerDriver(18730): buffering (8)

->> VIDEO FREEZES HERE,

12-18 17:59:53.289 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 8 playing?true
12-18 17:59:53.794 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 8 playing?true
12-18 17:59:54.301 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 8 playing?true
12-18 17:59:54.724 D/PlayerDriver(18730): buffering (8)
12-18 17:59:54.809 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 8 playing?true
12-18 17:59:55.314 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 8 playing?true
12-18 17:59:55.621 D/PlayerDriver(18730): buffering (9)
12-18 17:59:55.819 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 9 playing?true
12-18 17:59:56.325 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 9 playing?true
12-18 17:59:56.719 D/PlayerDriver(18730): buffering (9)
12-18 17:59:56.829 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 9 playing?true
12-18 17:59:57.340 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 9 playing?true
12-18 17:59:57.849 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 9 playing?true
12-18 17:59:58.353 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 9 playing?true
12-18 17:59:58.730 D/PlayerDriver(18730): buffering (9)
12-18 17:59:58.859 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 9 playing?true
12-18 17:59:59.363 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 9 playing?true
12-18 17:59:59.849 D/PlayerDriver(18730): buffering (10)
12-18 17:59:59.869 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 10 playing?true
12-18 18:00:00.371 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 10 playing?true
12-18 18:00:00.879 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 10 playing?true
12-18 18:00:01.119 D/PlayerDriver(18730): buffering (11)
12-18 18:00:01.349 I/ActivityManager(   73): Start proc
com.android.calendar for broadcast
com.android.providers.calendar/.CalendarAppWidgetProvider: pid=19211
uid=10021 gids={3003}
12-18 18:00:01.379 V/UpdatedMediaPlayerActivity(19121): update
progress, current: 5 buffer: 11 playing?true
12-18 18:00:01.679 I/dalvikvm(19211): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=38)
12-18 18:00:01.729 I/dalvikvm(19211): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=44)
12-18 18:00:01.749 I/ActivityThread(19211): Publishing provider
calendar: com.android.providers.calendar.Ca

[android-developers] Re: Shape with open border

2009-12-01 Thread Alexey Volovoy
Anybody figured this out yet ? I need same thing..

On Nov 16, 5:44 pm, Matthew Wardrop  wrote:
> I too would like to know this.
>
> On Oct 23, 1:31 pm, junker37  wrote:
>
>
>
> > I am wondering how to do this as well.  Also, I can't seem to find
> > where this is documented.
>
> > On Oct 19, 4:19 am, Viktor Bresan  wrote:
>
> > > Hi all.
>
> > > I would like to have ashapethat hasborderonly on 3 sides: top,
> > > left and right, i.e. I want bottom to beopen.  How can I achieve that
> > > definingshapeinXML?
>
> > > Currently I have a normal 4 sideborderusing the followingshapeXML
> > > definition:
>
> > > 
> > > http://schemas.android.com/apk/res/android";
> > >     android:layout_width="fill_parent"
> > >     android:layout_height="fill_parent"
> > >         >
>
> > >          > >                    />
>
> > >      > >                 android:color="#808480"
> > >                 />
>
> > >      > >                  android:top="1dp"
> > >              android:right="1dp"
> > >              android:bottom="1dp"
> > >              />
> > > 
>
> > > Many thanks, Viktor.

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

2009-11-17 Thread Alexey Volovoy
Thanks Mark, that is strange - i'll test more tomorrow but Sprint hero
with both roms work fine ( or it least it was reported to me that they
are ). I'm going to recheck tomorrow morning.

On Nov 17, 8:03 pm, Mark Murphy  wrote:
> Alexey Volovoy wrote:
> > With eris behavior is like this - if i download app from the market
> > everything is fine. User reported he turned device off and then he
> > turn it back on, app seems to "lost" some images. For example launch
> > icon changed to the random image ( which was supplied with the app as
> > well) background was simply lost etc. Uninstall/reinstall helps, but i
> > think it's going to be till next reboot.
> > i'm realize that somehow it's related to the way i put the drawables
> > but not sure of what exactly is going on.
>
> There have been a number of reports of this problem with the HTC Hero,
> and the Droid Eris is Verizon's rebranded Hero IIRC.
>
> http://groups.google.com/group/android-developers/browse_frm/thread/3...http://groups.google.com/group/android-developers/browse_frm/thread/8...http://groups.google.com/group/android-developers/browse_frm/thread/5...
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 Available!

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


[android-developers] weird issues with resources on Verizon Eris.

2009-11-17 Thread Alexey Volovoy
Hi all, i'll have more info tomorrow, once i'll have this device
again, but i was shown very weird stuff  today.
We've updated app with hi-res graphics for the Droid ( only
drawables ) around 4 days ago .
Resources organized
res
drawable
drawable-hdpi-v6
App was tested in working fine on devices droid, all tmo devices
including cliq, all sprint devices with both 1.5 and 1.6 roms, and
some unbranded European hero.
With eris behavior is like this - if i download app from the market
everything is fine. User reported he turned device off and then he
turn it back on, app seems to "lost" some images. For example launch
icon changed to the random image ( which was supplied with the app as
well) background was simply lost etc. Uninstall/reinstall helps, but i
think it's going to be till next reboot.
i'm realize that somehow it's related to the way i put the drawables
but not sure of what exactly is going on.
I'll try to get reproduce that tomorrow in the office.
If anybody have any idea what's going on on Eris build with res
selection - i really appreciate any help / hints.

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


[android-developers] Re: Person using Sprint Hero can't see application?

2009-11-14 Thread Alexey Volovoy
Most of the Heros running 1.5 , although upgrade afaik is available.
So minSdk should be 3 ( or you'll run into the same problem with CLIQ
users )
target SDK should be 4

On Nov 14, 9:53 am, g1bb  wrote:
> Hello,
>
> I have someone e-mailing me that they can't see my application in the
> Market. Is there something specific that I need to put in my manifest?
> They're using a Sprint Hero.
>
> Here's my manifest:
> 
> http://schemas.android.com/apk/res/android";
>       package="com.droidfart.app" android:versionCode="14"
> android:versionName="1.1.2">
> 
>                            android:label="@string/app_name"
>                   android:screenOrientation="portrait">
>             
>                 
>                  android:name="android.intent.category.LAUNCHER" />
>             
>         
>
>                          android:label="@string/app_name"
>                 android:screenOrientation="portrait"/>
>
>                          android:label="@string/app_name"
>                 android:screenOrientation="portrait"/>
>
>                  android:label="@string/app_name"
>         android:screenOrientation="portrait"/>
>
>                  android:label="@string/app_name"
>         android:screenOrientation="portrait"/>
>
>                  android:label="@string/app_name"
>         android:screenOrientation="portrait"/>
>
>                                   android:enabled="true">
>                         
>                                                                          
> android:name="android.provider.Telephony.SMS_RECEIVED" />
>                         
>         
>         
>     
>        
>     
> 
>
>  
>    
>  
>
> 
>  permission>
>  permission>
>  permission>
>  permission>
> 
>
> Thanks in advance.

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


[android-developers] Re: How to test if app is shown on Market for all screensizes

2009-11-12 Thread Alexey Volovoy
How's your uses-sdk part of manifest looks like ?

On Nov 12, 4:29 pm, Klaus Kartou  wrote:
> Can anyone enlighten me? :)
> It looks like our app doesnt show up on the market on HTC Tattoo. What else
> should we specify in the manifest?
>
>
>
> On Thu, Nov 12, 2009 at 4:01 PM, Klaus Kartou  wrote:
> > Hi!
>
> > We have uploaded a new version of our app where we added the following to
> > the manifest:
>
> >  > android:smallScreens="true"
> >  android:normalScreens="true"
> > android:largeScreens="true"
> >  android:anyDensity="true"
> > />
>
> > However, we are receiving complaints that users cannot find the app on the
> > market using their HTC Tattoo and HTC Dragon phones. Any ideas what we are
> > doing wrong, and is there a way for the developers to test if the app is
> > visible on the market?
>
> > Cheers!

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

2009-11-11 Thread Alexey Volovoy
hi all , not sure if it's a bug or i'm using that in the wrong place.
If i have following line (s ) of code in onCreate ()
iconView.setImageResource(R.drawable.my_icon);
And ONLY if my device(Droid) or emulator running 2.0 in landscape it
cause activity go through lifecycle endlessly like described in this
thread :
http://groups.google.com/group/android-developers/browse_thread/thread/d3d6f944c6167952
If i move code to onStart() - life is good again.
Weird thing it only happens if i'm testing 2.0 and only landscape. I
realize that onCreate may be not the best choice to put such things
in, but still it's weird that it doesn't work only in landscape.

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

2009-11-11 Thread Alexey Volovoy
I have same issue cause by this line of code i onCreate();
iconView.setImageResource(R.drawable.mylogor);

On Oct 29, 9:18 pm, Nmix  wrote:
> Ok, I found it -- it's my bug. Mark, you were partly right, and that
> helped. It was related to the configuration. Here is the guilty code,
> which is in onCreate():
>
> mRes = getResources();
> mConfig = mRes.getConfiguration();
> mConfig.setToDefaults();      //Error here.
>
> There should not be a call to setToDefaults(). I don't remember now
> what I was thinking at the time, and the Android doc is very
> uninformative for this method. Possibly I copied an example from
> somewhere. Removing this line solved the problem.
>
> Funny thing is that the bad code works fine pre-2.0 releases. However,
> once I found it I carefully scoured the logcat on a 1.6 AVD and I did
> find the same warning log spit out from the system process. Of course,
> since nothing was broken and there was no way to relate the log to my
> process, I had no idea.
>
> I know now because it breaks in 2.0 by forcing a restart of the
> activity that resembles a config change. I don't know if the 2.0
> behavior is right or wrong since the write-up for setToDefaults() says
> very little.
>
> fadden: I did consider filing a bug, but that seemed premature when I
> wasn't able to localize the problem. I didn't want to simply point to
> the app on Android Market. Now the point is moot. Thanks.
>
> On Oct 29, 7:04 pm, Nmix  wrote:
>
>
>
> > Apart from a Log.d() that I just added to produce the logcat trace and
> > the super call, there was just one line of code (an 'if' with a
> > condition which isn't satisfied) which is pretty boring. Regardless, I
> > commented that out. No change in behavior. Thanks for the suggestion,
> > Mark, but I am beginning to think that something quite a bit more
> > subtle is going on.
>
> > Now I'm getting quite worried about when 2.0 shows up in OTA updates
> > because it may/will break my app and I have no idea what to do. Up to
> > 1.6 the app is solid as a rock.
>
> > On Oct 29, 5:30 pm, Mark Murphy  wrote:
>
> > > Nmix wrote:
> > > > I did some additional testing on the 2.0 AVD, including numerous
> > > > project cleans, compiling with 1.5, 1.6 and 2.0, and cutting out large
> > > > swaths of code. The problem persists. Yet other apps I have work fine
> > > > on 2.0.
>
> > > > I peppered logs in each of the major life cycle methods I implement,
> > > > and this is what I get:
> > > > 10-29 20:33:23.561: DEBUG/tag(502): onCreate
> > > > 10-29 20:33:24.271: DEBUG/tag(502): onResume
> > > > 10-29 20:33:26.101: DEBUG/tag(502): onSaveInstanceState
> > > > 10-29 20:33:26.214: DEBUG/tag(502): onPause
> > > > 10-29 20:33:26.311: DEBUG/tag(502): onCreate
> > > > 10-29 20:33:26.561: DEBUG/tag(502): onRestoreInstanceState
> > > > 10-29 20:33:26.571: DEBUG/tag(502): onResume
> > > > 10-29 20:33:27.081: DEBUG/tag(502): onSaveInstanceState
> > > > 10-29 20:33:27.130: DEBUG/tag(502): onPause
> > > > 10-29 20:33:27.211: DEBUG/tag(502): onCreate
> > > > 10-29 20:33:27.601: DEBUG/tag(502): onRestoreInstanceState
> > > > 10-29 20:33:27.611: DEBUG/tag(502): onResume
> > > > 10-29 20:33:28.162: DEBUG/tag(502): onSaveInstanceState
> > > > 10-29 20:33:28.201: DEBUG/tag(502): onPause
> > > > 10-29 20:33:28.541: DEBUG/tag(502): onCreate
> > > > 10-29 20:33:28.951: DEBUG/tag(502): onRestoreInstanceState
> > > > 10-29 20:33:28.960: DEBUG/tag(502): onResume
> > > > 10-29 20:33:29.631: DEBUG/FatCalc(502): onPause
>
> > > > I finally kill it with the back key, though it sometimes takes a few
> > > > tries because the timing is critical.
>
> > > > Elsewhere in the log, I found something in the logs put out by the
> > > > system process that from their timestamp may be correlated with the
> > > > uninstall/install process initiated by ADB:
>
> > > > 10-29 20:33:14.391: WARN/ResourceType(55): Resources don't contain
> > > > package for resource number 0x7f06
> > > > 10-29 20:33:14.461: WARN/ResourceType(55): Resources don't contain
> > > > package for resource number 0x7f060001
>
> > > > These correspond to string resources in the app, both of which appear
> > > > to display normally when the app runs, in the momentary glimpses of
> > > > the app's UI display before it gets destroyed.
>
> > > > This really has me puzzled. Any help appreciated.
>
> > > Something in your onResume() would appear to be triggering behavior
> > > reminiscent of a screen rotation or other configuration change.
>
> > > I'd start by commenting out everything in onResume() and seeing if the
> > > problem persists.
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > Android 1.6 Programming Books:http://commonsware.com/books

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

Re: [android-developers] Re: Using MediaPlayer best practices?

2009-11-05 Thread Alexey Krasnoriadtsev
You can register the buffering listener and save the current buffering
position.
You can also poll for current position say every second (using your ui
handler), and if current position did not change since last poll, show ui
message (or dialog).

Alexey Krasnoriadtsev
Agile Fusion Corp


On Wed, Nov 4, 2009 at 9:23 AM, Moto  wrote:

> Thanks Alex!
>
> When you say peek at the MediaPlaybackService you mean android
> framework code?
>
> I was afraid that MediaPlayer would somehow end in an invalid state if
> the internal server died or something but I guess reset() cleans it
> up...  As of now I just use Reset() to stop playback.. :P seems to be
> faster than Stop() plus it cleans the MediaPlayer to be ready for
> another SetDataSource() and Prepare()...
>
> Something I don't like about MediaPlayer is that you can't get the
> audio status!  Say it's progressively playing a file from the internet
> and  all the sudden audio stops because it doesn't have enough
> data...  I want to know when that happens and there is no information
> for that...  Any ideas on this part?
>
> Thanks,
> -Moto
>
> On Nov 4, 3:34 am, Alexey Krasnoriadtsev 
> wrote:
> > Preparing a mediaPlayer is the most expensive operation.
> > calling stop() or pause() and then start() works best for me. You can
> > also peek at the MediaPlaybackService for inspiration.
> >
> > Why do you think it will get into the bad state?
> >
> > On Nov 3, 7:14 pm, Moto  wrote:
> >
> > > What is the best way to use the MediaPlayer when needed multiple
> > > times?
> >
> > > Reuse the instantiated MediaPlayer throughout the session?  Or
> > > constantly stop() release() and instantiate a new MediaPlayer() ?
> >
> > > If I reuse I'm afraid the player could be in a bad state?
> > > What about performance wise? what's better? reuse or renew?
> >
> > > Note: This is for using as a music player so one audio be present at
> > > one given time...
> >
> > > Thank!
> > > -Moto!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Using MediaPlayer best practices?

2009-11-04 Thread Alexey Krasnoriadtsev
Preparing a mediaPlayer is the most expensive operation.
calling stop() or pause() and then start() works best for me. You can
also peek at the MediaPlaybackService for inspiration.

Why do you think it will get into the bad state?


On Nov 3, 7:14 pm, Moto  wrote:
> What is the best way to use the MediaPlayer when needed multiple
> times?
>
> Reuse the instantiated MediaPlayer throughout the session?  Or
> constantly stop() release() and instantiate a new MediaPlayer() ?
>
> If I reuse I'm afraid the player could be in a bad state?
> What about performance wise? what's better? reuse or renew?
>
> Note: This is for using as a music player so one audio be present at
> one given time...
>
> Thank!
> -Moto!

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

2009-10-27 Thread Alexey

Is there a way to get HTC Hero system image for the emulator?

Sense UI has quite some changes to activities like Contacts. So
intents to select Phone number (new Intent(Intent.ACTION_PICK,
Phones.CONTENT_URI) ) work differently from default Contacts app, and
things like viewing Call Log ( new Intent
("com.android.phone.action.RECENT_CALLS"); ) do not work at all.
Is there a way to test my code against Hero device, beside getting
physical device.

 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] Android 2.0 Force close in contacts app

2009-10-27 Thread Alexey

When I launch Contacts app in the emulator for API level 5, then go to
Menu - Accounts, I get exception. Anyone else see this. How to try new
multiple Accounts feature?

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

2009-10-27 Thread Alexey Volovoy

Hi All  getDeviceID() and LineNumber1 return null in th 2.0 emulator.
Anybody knows how to fake those ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView/Adapter Crash in 1.6 only: illegalStateException. 1.6 bug?

2009-10-19 Thread Alexey

Thanks, Romain, I will try...

On 19 окт, 14:00, Romain Guy  wrote:
> There's no performance issue: you do all the work on a background thread and
> then you add everything in the adapter on the UI thread. A simple loop to
> add() several hundreds elements should not freeze the UI.
>
> On Oct 19, 2009 2:49 AM, "Alexey"  wrote:
>
> On 16 окт, 20:10, Romain Guy  wrote: > > (it is a
> quote from sources ListVi...
> Thanks, Sergey.
>
> > If you modify the adapter without changing the number of items it can >
>
> also be bad. It's just th...
> Ok, Romain, this is clear. but what about performance?
> In example, we have the ListView that should be filled with the data
> from the server. When we will fill it on UI thread will it cause UI
> freezing if we have a lot of elements (several hundred)?
>
> --~--~-~--~~~---~--~~ You received this
> message because you are sub...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView/Adapter Crash in 1.6 only: illegalStateException. 1.6 bug?

2009-10-19 Thread Alexey



On 16 окт, 20:10, Romain Guy  wrote:
> > (it is a quote from sources ListView.java) and only in this case.
> > Thus,  if number of elements wasn't changed, everything is ok.

Thanks, Sergey.

> If you modify the adapter without changing the number of items it can
> also be bad. It's just that ListView does not detect this case.

Ok, Romain, this is clear. but what about performance?
In example, we have the ListView that should be filled with the data
from the server. When we will fill it on UI thread will it cause UI
freezing if we have a lot of elements (several hundred)?

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



[android-developers] Re: ListView/Adapter Crash in 1.6 only: illegalStateException. 1.6 bug?

2009-10-15 Thread Alexey

Romain, one more question. Is this rule applicable for adding/removing
elements from adapter (in other words - changing number of elements in
ListView) or also when changing content of elements?

On 15 окт, 16:31, Alexey  wrote:
> Romain, your answers are clear, but confusing. As I understood
> modifying adapter should be done in worker thread and only
> notifyDataSetChanged in UI thread.
> Now as I see the concept is different, but what if we need to add
> several hundred items into adapter, won't UI thread be in freeze for
> this time?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView/Adapter Crash in 1.6 only: illegalStateException. 1.6 bug?

2009-10-15 Thread Alexey

Romain, your answers are clear, but confusing. As I understood
modifying adapter should be done in worker thread and only
notifyDataSetChanged in UI thread.
Now as I see the concept is different, but what if we need to add
several hundred items into adapter, won't UI thread be in freeze for
this time?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Dynamic Image loading from Resources in ImageView

2009-08-02 Thread Alexey Krasnoriadtsev

you can place your images directly under assets directory, and then
use getResources().getAssets().open("path to file");



On Jul 31, 1:55 pm, DroidDude  wrote:
> Hi,
>
> I am very new to Android Development and I have a doubt regarding
> Image Loading in ImageView from R.drawable.
>
> Just to brief What I am trying to accomplish is :Showing a ListView
> with ImageView and TextView using ViewWrapper pattern.
>
> I get the Text Value for TextView from one http service and I store
> all the values in String Array. I have implemented my own Adapter with
> my own implementation of getView().
>
> Now the issue:
>
> I have put all the images i want to show in res/drawable folder. now
> based on the value of text I want to pick that image from the folder
> and show it in the Imageview.
>
> For Example:
> if i get "aaa" as the value of TextView. I already have aaa.jpg in res/
> drawable folder and I want to set that image in ImageView.
>
> I don't know how to get the handle for aaa.jpg in androind.
>
> I have tried follwoing with no luck:
> ImageView.setImageResource() - But it takes the rID as argument which
> is of type int. I cant generate "R.drawable."+myVairable.
>
> ImageView.setImageDrawable(Drawable.createFromPath(PATHVariable))-But
> I don't know how to give the path to the image. I tried "./res/
> drawable/"+variable+".jpg"
>
> BitmapFactory takes the similar argument for all its method.
>
> I really don't want to write any Async Image Loader based on any
> server based URIs as I dont have any hosting server available.
>
> Kindly help.
>
> 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: Widgets ( frequent updates )

2009-07-31 Thread Alexey Volovoy

At this moment no - but in new version i've provided ability to
refresh content on demand. hopefully it'll solve complains problem

On Jul 31, 9:15 am, String  wrote:
> On Jul 31, 2:46 pm, Alexey Volovoy  wrote:
>
> > Rationale behind frequent updates - if i'm not rotating headlines in
> > visible fashion people complain that widget is "not working".
>
> Have you made the update interval user-configurable? I'd like to think
> this would cut down on such complaints, or at least give you somewhere
> to point them.
>
> String
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Widgets ( frequent updates )

2009-07-31 Thread Alexey Volovoy

At this moment no - but in new version i've provided ability to
refresh content on demand. hopefully it'll solve complains problem

On Jul 31, 9:15 am, String  wrote:
> On Jul 31, 2:46 pm, Alexey Volovoy  wrote:
>
> > Rationale behind frequent updates - if i'm not rotating headlines in
> > visible fashion people complain that widget is "not working".
>
> Have you made the update interval user-configurable? I'd like to think
> this would cut down on such complaints, or at least give you somewhere
> to point them.
>
> String
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Widgets ( frequent updates )

2009-07-31 Thread Alexey Volovoy

At this moment no - but in new version i've provided ability to
refresh content on demand. hopefully it'll solve complains problem

On Jul 31, 9:15 am, String  wrote:
> On Jul 31, 2:46 pm, Alexey Volovoy  wrote:
>
> > Rationale behind frequent updates - if i'm not rotating headlines in
> > visible fashion people complain that widget is "not working".
>
> Have you made the update interval user-configurable? I'd like to think
> this would cut down on such complaints, or at least give you somewhere
> to point them.
>
> String
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Widgets ( frequent updates )

2009-07-31 Thread Alexey Volovoy

that's what i did. it is set to 0. and i'm updating via alarm manager.
and i'm scheduling with setInexactRepeating(). Further looking into
the log tonight - it's is working, i had some cases with 5-10 minutes
without logging an update. Of course my update will join any other
update that wakes device up ( gmail, twitter feed etc ). Bottom line -
it's working as designed, but due to the nature of the widget it's
still be nicer to base updates on the screen state rather on device
state. I'd rather cancel all alarms if screen is off and start
scheduling new ones once it back on..
Rationale behind frequent updates - if i'm not rotating headlines in
visible fashion people complain that widget is "not working". Service
is basically just puts new headline and image on RemoteViews.

On Jul 31, 12:27 am, Jeff Sharkey  wrote:
> When you register for AppWidget updates through the updatePeriodMillis
> parameter, the system schedules an update for you using
> setInexactRepeating() with a WAKEUP flag.  (Which forces the device
> awake for every update.)  Here's the relevant system service code:
>
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
> The rationale behind this is that users don't want all their widgets
> to begin updating the moment they wake up a phone, slowing it down.
> Any updates should continue happening, even when the phone is asleep,
> so widgets are always ready and updated.  Several places it's been
> mentioned that you should avoid update intervals shorter than, say,
> every hour, precisely because of this fact.
>
> Keep in mind that you're completely free to set updatePeriodMillis to
> "0" (which disables updates) and manage your own update alarms without
> the WAKEUP flag.
>
> j
>
>
>
> On Mon, Jun 22, 2009 at 2:31 PM, Mark Murphy wrote:
>
> > Alexey Volovoy wrote:
> >> Hi All , i'm looking for the best strategy for the following -- widget
> >> suppose to go through cached headlines. And once a 3 hours or so -
> >> pull new ones.
> >> Update are scheduled from widget config file. Everything seems to be
> >> working, except I don't want to running my updates which are simply
> >> changing info on the screen while phone is sleeping. What's the best
> >> strategy to avoid that ? Desired  behavior - phone is not sleeping -
> >> i'll run update which will change headline to next one and check if
> >> there is  a time to pull new headlines. If phone is sleeping - i don't
> >> want to do any of that.
>
> > AFAIK, widgets don't update while the device is asleep. Do you have
> > evidence to the contrary?
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Development Wiki:http://wiki.andmob.org
>
> --
> Jeff Sharkey
> jshar...@android.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] Re: Widgets ( frequent updates )

2009-07-31 Thread Alexey Volovoy

that's what i did. it is set to 0. and i'm updating via alarm manager.
and i'm scheduling with setInexactRepeating(). Further looking into
the log tonight - it's is working, i had some cases with 5-10 minutes
without logging an update. Of course my update will join any other
update that wakes device up ( gmail, twitter feed etc ). Bottom line -
it's working as designed, but due to the nature of the widget it's
still be nicer to base updates on the screen state rather on device
state. I'd rather cancel all alarms if screen is off and start
scheduling new ones once it back on..
Rationale behind frequent updates - if i'm not rotating headlines in
visible fashion people complain that widget is "not working". Service
is basically just puts new headline and image on RemoteViews.

On Jul 31, 12:27 am, Jeff Sharkey  wrote:
> When you register for AppWidget updates through the updatePeriodMillis
> parameter, the system schedules an update for you using
> setInexactRepeating() with a WAKEUP flag.  (Which forces the device
> awake for every update.)  Here's the relevant system service code:
>
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
> The rationale behind this is that users don't want all their widgets
> to begin updating the moment they wake up a phone, slowing it down.
> Any updates should continue happening, even when the phone is asleep,
> so widgets are always ready and updated.  Several places it's been
> mentioned that you should avoid update intervals shorter than, say,
> every hour, precisely because of this fact.
>
> Keep in mind that you're completely free to set updatePeriodMillis to
> "0" (which disables updates) and manage your own update alarms without
> the WAKEUP flag.
>
> j
>
>
>
> On Mon, Jun 22, 2009 at 2:31 PM, Mark Murphy wrote:
>
> > Alexey Volovoy wrote:
> >> Hi All , i'm looking for the best strategy for the following -- widget
> >> suppose to go through cached headlines. And once a 3 hours or so -
> >> pull new ones.
> >> Update are scheduled from widget config file. Everything seems to be
> >> working, except I don't want to running my updates which are simply
> >> changing info on the screen while phone is sleeping. What's the best
> >> strategy to avoid that ? Desired  behavior - phone is not sleeping -
> >> i'll run update which will change headline to next one and check if
> >> there is  a time to pull new headlines. If phone is sleeping - i don't
> >> want to do any of that.
>
> > AFAIK, widgets don't update while the device is asleep. Do you have
> > evidence to the contrary?
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Development Wiki:http://wiki.andmob.org
>
> --
> Jeff Sharkey
> jshar...@android.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] Re: Widgets ( frequent updates )

2009-07-30 Thread Alexey Volovoy

is there anyway to get to the state of the phone/screen without
listening to broadcasts ?

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

2009-07-30 Thread Alexey Volovoy

Oh man.. that not going to fly .. I can't do it from the service,
because service runs like for a second to update the widget and
stopSelf(). So if i register something onStart() i'd have to
unregister that onDestroy(). Therefore to actually catch that event
while service is running becomes kind of tricky.
Sigh.. still don't understand why the hell it running updates during
the sleep...

On Jul 30, 3:16 pm, "Mark Murphy"  wrote:
> > Ok.. so i already have an receiver for the widget... and adding
> > screen_on/screen_off should do it ?
> >      
> >          > android:label="@string/app_name" >
> >             
> >                  > android:name="android.intent.action.SCREEN_ON" />
> >                  > android:name="android.intent.action.SCREEN_OFF" />
> >                  > android:name="android.appwidget.action.APPWIDGET_UPDATE" />
> >             
> >              > android:resource="@xml/widget_news" />
> >         
> > Strangely i don't receive SCREEN_OFF/SCREEN_ON in my
> > �...@override
> >     public void onReceive(Context context, Intent intent) {
> >  }
>
> Nuts. Further research indicates that, at least as of last December, you
> can only get SCREEN_OFF/SCREEN_ON from in-Java registered receivers:
>
> http://groups.google.com/group/android-developers/browse_frm/thread/8...
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Widgets ( frequent updates )

2009-07-30 Thread Alexey Volovoy

Ok.. so i already have an receiver for the widget... and adding
screen_on/screen_off should do it ?
  








Strangely i don't receive SCREEN_OFF/SCREEN_ON in my
 @Override
public void onReceive(Context context, Intent intent) {
 }

On Jul 29, 5:20 pm, Mark Murphy  wrote:
> Alexey Volovoy wrote:
> > Hm.. let's say i'm not going to schedule next update via alarm if
> > screen is off. Service will shut itself down. Then screens is coming
> > back what will listen to that broadcast ?
>
> A BroadcastReceiver registered in your manifest. That receiver then
> starts up your service. You may already have one of these if your
> service needs to start up at boot time.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Widgets ( frequent updates )

2009-07-29 Thread Alexey Volovoy

Hm.. let's say i'm not going to schedule next update via alarm if
screen is off. Service will shut itself down. Then screens is coming
back what will listen to that broadcast ?
My goal is eliminate service runs while i don't need to, not minimize
amount of work service does during the run.

On Jul 29, 5:08 pm, Mark Murphy  wrote:
> Alexey Volovoy wrote:
> > Thanks for reply Dianne - my worry is that 30 sec interval for update
> > is not enough to let device fall asleep and my updates basically
> > prevent that. I've tried to disconnect device for an hour or so and
> > it's still updating according to the logs. Do you have any
> > recommendation of how i can update widget frequently when device is
> > awake and screen is on and don't update at all while it's sleeping ?
> > I'm using alarm manager now and the android:updatePeriodMillis="0" in
> > the appwidget-provider
>
> Rather than focusing on "sleeping", perhaps focus on the screen being
> off. Listen for the ACTION_SCREEN_OFF and ACTION_SCREEN_ON broadcast
> Intents and tailor your behavior at that point.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Widgets ( frequent updates )

2009-07-29 Thread Alexey Volovoy

Thanks for reply Dianne - my worry is that 30 sec interval for update
is not enough to let device fall asleep and my updates basically
prevent that. I've tried to disconnect device for an hour or so and
it's still updating according to the logs. Do you have any
recommendation of how i can update widget frequently when device is
awake and screen is on and don't update at all while it's sleeping ?
I'm using alarm manager now and the android:updatePeriodMillis="0" in
the appwidget-provider

On Jul 29, 4:18 pm, Dianne Hackborn  wrote:
> Being plugged in to usb keeps the device awake.  There are also often things
> that will wake up the device in the background that can allow your own alarm
> to go off.
>
>
>
> On Wed, Jul 29, 2009 at 1:06 PM, Alexey Volovoy  wrote:
>
> > I don't set any WakeLocks . So yes it's seems to be something is
> > preventing device to go to sleep .. And i think it's my frequent
> > updates. I set go to sleep on red button via spare parts which will do
> > this:
> > 07-29 14:59:39.986: DEBUG/WindowManager(58): I'm tired
> > mEndcallBehavior=0x2
> > 07-29 14:59:40.234: DEBUG/Sensors(58): sensors=, real=
> > 07-29 14:59:40.424: DEBUG/AKMD(39): Compass CLOSE
> > 07-29 14:59:40.574: DEBUG/SurfaceFlinger(58): About to give-up screen,
> > flinger = 0x16a458
> > then i see this
> > 07-29 14:59:50.014: DEBUG/UpdateService(3813): Requested UPDATE_ALL
> > action
> > 07-29 14:59:50.014: DEBUG/UpdateService(3813): OnStart()
> > 07-29 14:59:50.024: DEBUG/UpdateService(3813): Processing thread
> > started
> > 07-29 14:59:50.024: DEBUG/UpdateService(3813): Widget ID:11
> > 07-29 14:59:50.024: DEBUG/UpdateService(3813):
> > Info:AppWidgetProviderInfo(provider=ComponentInfo{package/
> > package.widget.NewsWidget})
> > 07-29 14:59:50.024: DEBUG/MPPNewsWidget(3813): buildUpdate()
> > 07-29 14:59:50.034: DEBUG/MPPNewsWidget(3813): getNextItem:position{4}
> > size {10}
> > 07-29 14:59:50.074: DEBUG/MPPNewsWidget(3813): UpdateIntent:25598174
> > 07-29 14:59:50.074: DEBUG/MPPNewsWidget(3813): widgetID:11
> > 07-29 14:59:50.114: DEBUG/UpdateService(3813): Widget ID:12
> > 07-29 14:59:50.124: DEBUG/UpdateService(3813):
> > Info:AppWidgetProviderInfo(provider=ComponentInfo{package.dev/
> > package.NewsWidget})
> > 07-29 14:59:50.124: DEBUG/MPPNewsWidget(3813): buildUpdate()
> > 07-29 14:59:50.134: DEBUG/MPPNewsWidget(3813): getNextItem:position
> > {31} size {40}
> > r=2009-07-28T194846Z_01_BTRE56L0YDE00_RTROPTP_0_PEOPLE-
> > JACKSON&w=&w=150
> > 07-29 14:59:50.184: DEBUG/MPPNewsWidget(3813): UpdateIntent:25579477
> > 07-29 14:59:50.194: DEBUG/MPPNewsWidget(3813): widgetID:12
> > 07-29 14:59:50.234: INFO/ActivityManager(58): Stopping service:
> > package.dev/package.widget.UpdateService
> > and like this every 30 sec .. then after i press menu again i see..
> > 07-29 15:03:49.568: DEBUG/KeyguardViewMediator(58): wakeWhenReadyLocked
> > (82)
> > 07-29 15:03:49.568: DEBUG/KeyguardViewMediator(58): handleWakeWhenReady
> > (82)
> > 07-29 15:03:49.574: DEBUG/KeyguardViewMediator(58): pokeWakelock(5000)
> > 07-29 15:03:49.584: DEBUG/AKMD(39): Compass OPEN
> > 07-29 15:03:49.594: DEBUG/Sensors(58): sensors=0001, real=0001
> > 07-29 15:03:49.794: DEBUG/SurfaceFlinger(58): Screen about to return,
> > flinger = 0x16a458
>
> > Now i disconnected the device from usb and will see if that will do
> > the trick.
>
> > On Jul 29, 2:49 pm, Mark Murphy  wrote:
> > > Alexey Volovoy wrote:
> > > > I see it the logs of course. Every 30 sec it's starting the service as
> > > > it should if it's not asleep.
>
> > > Are you holding a WakeLock anywhere?
>
> > > Is anything else perhaps keeping the device/emulator awake? In other
> > > words, how do you know it went to sleep?
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com|
> >http://twitter.com/commonsguy
>
> > > Looking for Android opportunities?http://wiki.andmob.org/hado
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Widgets ( frequent updates )

2009-07-29 Thread Alexey Volovoy

I don't set any WakeLocks . So yes it's seems to be something is
preventing device to go to sleep .. And i think it's my frequent
updates. I set go to sleep on red button via spare parts which will do
this:
07-29 14:59:39.986: DEBUG/WindowManager(58): I'm tired
mEndcallBehavior=0x2
07-29 14:59:40.234: DEBUG/Sensors(58): sensors=, real=
07-29 14:59:40.424: DEBUG/AKMD(39): Compass CLOSE
07-29 14:59:40.574: DEBUG/SurfaceFlinger(58): About to give-up screen,
flinger = 0x16a458
then i see this
07-29 14:59:50.014: DEBUG/UpdateService(3813): Requested UPDATE_ALL
action
07-29 14:59:50.014: DEBUG/UpdateService(3813): OnStart()
07-29 14:59:50.024: DEBUG/UpdateService(3813): Processing thread
started
07-29 14:59:50.024: DEBUG/UpdateService(3813): Widget ID:11
07-29 14:59:50.024: DEBUG/UpdateService(3813):
Info:AppWidgetProviderInfo(provider=ComponentInfo{package/
package.widget.NewsWidget})
07-29 14:59:50.024: DEBUG/MPPNewsWidget(3813): buildUpdate()
07-29 14:59:50.034: DEBUG/MPPNewsWidget(3813): getNextItem:position{4}
size {10}
07-29 14:59:50.074: DEBUG/MPPNewsWidget(3813): UpdateIntent:25598174
07-29 14:59:50.074: DEBUG/MPPNewsWidget(3813): widgetID:11
07-29 14:59:50.114: DEBUG/UpdateService(3813): Widget ID:12
07-29 14:59:50.124: DEBUG/UpdateService(3813):
Info:AppWidgetProviderInfo(provider=ComponentInfo{package.dev/
package.NewsWidget})
07-29 14:59:50.124: DEBUG/MPPNewsWidget(3813): buildUpdate()
07-29 14:59:50.134: DEBUG/MPPNewsWidget(3813): getNextItem:position
{31} size {40}
r=2009-07-28T194846Z_01_BTRE56L0YDE00_RTROPTP_0_PEOPLE-
JACKSON&w=&w=150
07-29 14:59:50.184: DEBUG/MPPNewsWidget(3813): UpdateIntent:25579477
07-29 14:59:50.194: DEBUG/MPPNewsWidget(3813): widgetID:12
07-29 14:59:50.234: INFO/ActivityManager(58): Stopping service:
package.dev/package.widget.UpdateService
and like this every 30 sec .. then after i press menu again i see..
07-29 15:03:49.568: DEBUG/KeyguardViewMediator(58): wakeWhenReadyLocked
(82)
07-29 15:03:49.568: DEBUG/KeyguardViewMediator(58): handleWakeWhenReady
(82)
07-29 15:03:49.574: DEBUG/KeyguardViewMediator(58): pokeWakelock(5000)
07-29 15:03:49.584: DEBUG/AKMD(39): Compass OPEN
07-29 15:03:49.594: DEBUG/Sensors(58): sensors=0001, real=0001
07-29 15:03:49.794: DEBUG/SurfaceFlinger(58): Screen about to return,
flinger = 0x16a458


Now i disconnected the device from usb and will see if that will do
the trick.


On Jul 29, 2:49 pm, Mark Murphy  wrote:
> Alexey Volovoy wrote:
> > I see it the logs of course. Every 30 sec it's starting the service as
> > it should if it's not asleep.
>
> Are you holding a WakeLock anywhere?
>
> Is anything else perhaps keeping the device/emulator awake? In other
> words, how do you know it went to sleep?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Looking for Android opportunities?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Widgets ( frequent updates )

2009-07-29 Thread Alexey Volovoy

I see it the logs of course. Every 30 sec it's starting the service as
it should if it's not asleep.

On Jul 29, 2:35 pm, Mark Murphy  wrote:
> Alexey Volovoy wrote:
> > Well.. i've tried to use alarm manager like:
> > AlarmManager alarmManager = (AlarmManager)getSystemService
> > (Context.ALARM_SERVICE);
> > alarmManager.set(AlarmManager.RTC, nextUpdate, pendingIntent);
> > thinking behind it was - if devices is not a sleep, i'll loop through
> > my headlines in 30 sec interval. If it goes a sleep i don't need to do
> > anything.
> > Well after putting devices to sleep i still see updates. It's
> > obviously i'm doing something wrong but have no idea what exactly..
>
> If the device is asleep, how do you "see" updates?
>
> Bear in mind:
>
> "This alarm does not wake the device up; if it goes off while the device
> is asleep, it will not be delivered until the next time the device wakes
> up. "
>
> Hence, it may be you are getting the alarm as you are coming out of sleep.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Looking for Android opportunities?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Widgets ( frequent updates )

2009-07-29 Thread Alexey Volovoy

Well.. i've tried to use alarm manager like:
AlarmManager alarmManager = (AlarmManager)getSystemService
(Context.ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC, nextUpdate, pendingIntent);
thinking behind it was - if devices is not a sleep, i'll loop through
my headlines in 30 sec interval. If it goes a sleep i don't need to do
anything.
Well after putting devices to sleep i still see updates. It's
obviously i'm doing something wrong but have no idea what exactly..

On Jun 22, 9:09 pm, Alexey Volovoy  wrote:
> Skip the work is not a really good option in my case. I have very
> little work to do, get next headline and push widget update. So it's
> probably will spend equal amount of time of starting and stopping
> service
> alarm manager , yes it's really good option and you don't need set
> very long time - setting it to 0 does the job.
>
> On Jun 22, 6:00 pm, Mark Murphy  wrote:
>
> > Alexey Volovoy wrote:
> > > hm.. based on the  logs from UpdateService onStart - it's still
> > > executing update after i've uchecked the setting.
>
> > That's odd. That means they must be using a WAKEUP form of AlarmManager.
> > I would have expected otherwise.
>
> > One option is for you to watch for ACTION_SCREEN_ON and
> > ACTION_SCREEN_OFF broadcast Intents in your service (or use some other
> > method to see if the screen is not -- not sure if there's a simple API
> > for that). When you know the screen is off, skip the work in the update.
>
> > Another alternative is for you to specify an effectively infinitely long
> > updateTimeMillis (2 billion milliseconds or so is over a year) and use
> > AlarmManager yourself. You can push updates to the widget whenever you
> > want -- updateTimeMillis is just a convenient means for doing so. In
> > your own AlarmManager work, don't use one of the WAKEUP variants, and
> > the alarm will fire when the phone next awakens if it ordinarily would
> > have fired while the phone was asleep.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Warescription: Three Android Books, Plus Updates, $35/Year
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Alternatives to Multitouch

2009-07-19 Thread Alexey Krasnoriadtsev

double tap, that circles through predefined zoom levels.

On Jul 18, 11:18 am, Jason Van Anden 
wrote:
> I need to zoom-in/zoom-out for my app.  Multitouch would be the most obvious
> way to go about this *sigh*.
>
> I would prefer not to use the zoom-in/out widget.
>
> I have been trying a number of other techniques but am not satisfied with
> the feel.
>
> Looking for suggestions from the community on alternative approaches.  A one
> fingered zoom?
>
> Thanks,
> Jason Van Anden
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Linking to apps in the Android Market

2009-07-13 Thread Alexey Volovoy

http://developer.android.com/guide/publishing/publishing.html#marketintent

On Jul 13, 2:58 pm, Carl Whalley  wrote:
> Is it possible to put a link to an app in the market on a webpage?
> If not, and the apk is hosted directly, can we assume download stats
> in the market will be unaffacted?
> 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: Error on SharedPreferences for AppWidget

2009-07-13 Thread Alexey Volovoy

I think it's an issue with exiting config activity before saving
widget settings. Put some logging around create/delete widget and in
the service and see how many widgets you're ended up getting while
rotating screen
Log.d(TAG, " appWidgetId=" + appWidgetId);
You can put some logging around updates too.

On Jul 10, 7:55 am, "Stefano Sanna (gerdavax)" 
wrote:
> Hi.
>
> I'm working on an AppWidget which manages settings using
> SharedPreferences. I'm experiencing a strange behaviour (on a Dream)
> on its configuration Activity:
>
> 1)  if I use software keyboard (that is: without opening physical
> keyboard) to edit text, everything works fine and preferences are
> stored. The happens if the application starts with keyboard already
> open.
>
> 2) if I open physical keyboard (and activity is being restarted and
> rendered in landscape), when saving preferences the widget does not
> appear on the desktop. Sometimes I get an error message ("unable to
> unlink" to the path of application's data).
>
> It seems that, when restarted on keyboard open, the configuration
> Activity looses ownership of its sharedpreferences.
>
> Any idea?
>
> Thank you.
>
> Ciao,
> Stefano.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Bitmap memory leaks with onClick...

2009-07-13 Thread Alexey Volovoy

Hi All i have strange memory leak with Bitmaps. First what i have - an
activity that based on the workspace view from Launcher ( 3 screens
current prev + next ) . This layout is supplied with adapter , so then
i flipping left/right it loads next view.
The views that adapter is providing is an ImageView (picture) with
decodeBitmap + TextView(Caption).  I also have on click listener that
is set on the views that toggles captions which calls this:

public void onToggleCaption() {
mAdapter.toggleCaption(); // sets boolean if is should display
caption
int currentScreen = mImageLayout.getCurrentScreen(); // 
remembers
current screen number.
mImageLayout.removeAllViews(); // Removes all three children
mImageLayout.setCurrentScreen(currentScreen); // Set back 
everything
back ( but now adapter will show or hide captions )
}

When i call this from the menu - everything is just fine. Heap stays
same +/- 1K. If i execute this code via onClick listener - i'm loosing
memory quite quickly and in about 20th iteration - VM out of budget.

adapter.public View getView(int position, View convertView, ViewGroup
parent) {
View newView = null;
byte[] mFullImage;
Enclosure enclosure = (Enclosure) getItem(position);

if (convertView != null)
newView = convertView;
else {
LayoutInflater layout = LayoutInflater.from(mContext);
newView = layout.inflate(R.layout.image_layout, null);

}
//TODO - this can be optimized
ImageView iView = (ImageView) newView.findViewById(R.id.image);
TextView tView = (TextView) newView.findViewById(R.id.caption);

Bitmap image = null;
// mFullImage is a byte[]
mFullImage = enclosure.getImage();
if (mFullImage != null) {
try {
image = 
BitmapFactory.decodeByteArray(mFullImage, 0,
mFullImage.length);

} catch (RuntimeException e) {
Log.w(TAG, e);
}
}

if (image != null) {
iView.setImageBitmap(image);
String caption = enclosure.getContent();

if (!caption.equals("") && mShowCaption) {
tView.setVisibility(View.VISIBLE);
tView.setText(caption);
} else {
tView.setVisibility(View.GONE);
}
}
newView.setClickable(true);
return newView;
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Handle Multiple Adapters for one ListView

2009-07-12 Thread Alexey Krasnoriadtsev

If you would like to animate your transitions, where one list slides
out and second slides in, all you need is two listviews. And in your
activity, you would need to keep track of one that is currently
visible, and the other one, that is invisible.
When there comes a point that you need to switch listviews, your logic
becomes something like this:

ListView oldView = this.currentList;
ListView incomingView = this.invisibleList;
this.currentList = incommingList;
this.invisibleList = oldView;

this.slideOutAnimation.setAnimationListener( .. code here,
onAnimationEnd(oldView.setVisibility(View.GONE));

incomingView.setVisiblity(View.VISIBLE);

incomingView.startAnimation(this.slidInAnimation);
oldView.startAnimation(this.slideOutAnimation);

On Jul 11, 10:35 am, Moto  wrote:
> The reason for this post was to use one ListView for multiple adapters
> because I thought it would help decrease the level of complexity my
> xml layout would have, therefore starting my activity much faster.
> Apparently it's not such a good idea.
>
> As of now, if this matters anyways, my fatty Activity uses at most 70%
> of the given 3.9MB Heap size.
>
> Thanks Mark and well I'll take into consideration your ideas and try
> to make it one slim and faster Activity.
>
> Thanks,
> Moto!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Media AspectRatio

2009-07-11 Thread Alexey Krasnoriadtsev

Is the aspect ration is really different, or do you think youtube app
just re sizes video to fit the screen?

You can dynamically adjust SurfaceView layout parameters to take all
you screen, maintaining aspect ration.

On Jul 10, 8:26 am, glory  wrote:
> Hi,
>
> I am playing the video from the you tube link.But the video played by
> my Application has different aspect ratio then what played by the
> youtube application. How to play the video in the same aspect ratio as
> that of the youtube application.
>
> I am using Video View for playing the application.
>
> Please help me out
>
> Thanks in advance
> Glory
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Associate app to open email attachments

2009-07-10 Thread Alexey Krasnoriadtsev

You are correct that you should use contentResolver.openInputStream
(uri), to get the data from gmail attachments.

Default Email app, is very dumb and is hardcoded to only open audio
and image attachments.
(disclaimer, that was the case 6 month ago, the last time i looked at
it).


On Jul 8, 10:16 am, Mirko Nasato  wrote:
> Hi all,
>
> I've written an app that can handle the VIEW action for a given
> mimeType, say "application/foo". By adding the following to
> AndroidManifest.xml the Browser automatically uses my app to open
> downloads of that type:
>
>   
>      
>      
>      
>   
>
> The GMail app also tries to use my app to Preview attachments of that
> type, but it's passing a URI with scheme "gmail-ls://" rather than a
> "file://" URI. I guess I need to use a ContentProvider to get the
> attachment data, I haven't looked into that yet.
>
> But the real mystery is the Email app... there just doesn't seem any
> way to make it open the attachments.
>
> Any pointers? Opening attachments is a very common requirement of
> course, and I would expect the Android platform to encourage
> developers to write apps to handle more mime types. Instead I couldn't
> find any answers:
>
>  http://groups.google.com/group/android-developers/browse_thread/threa...
>  http://groups.google.com/group/android-developers/browse_thread/threa...
>
> Thanks
>
> Mirko
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Image

2009-07-09 Thread Alexey Krasnoriadtsev

You can create your class that will extend from ImageView.
at some point store a Drawable of the small image as an instance
variable.

overwrite
public void onDraw(Canvas canvas){
  super.onDraw(canvas);
  mDrawable.setBounds(0, 0, drawableWidth, drableHeight);
  mDrawable.draw(canvas);
}


This will draw your smaller image (mDrawable), in the top left corner.


On Jul 7, 10:45 pm, peeyush varshney 
wrote:
> I want that user can move smaller one and drop any where he want over Big
> Image.
> It is almost same as SeekBar. I tried same with vertical SeekBar with also.
> but SeekBar Thumb  is not getting adjust according to progress.
>
> On Wed, Jul 8, 2009 at 11:00 AM, Balwinder Kaur (T-Mobile) <
>
>
>
> balwinder.k...@t-mobile.com> wrote:
>
> > You can try something like this :
>
> > Create a mutable bitmap from your original image.
> > //You can use the BitmapFactory class for that.
> >http://developer.android.com/reference/android/graphics/BitmapFactory...
> > Lets call it Bitmap b;
> > Create a Canvas c as show below.
> > Canvas c = new Canvas(b);
> > Create another bitmap from the "small Seeker Type image". Lets call it
> > Bitmap bsmall.
> > c.drawBitmap(bsmall, ...); //Choose one of the drawBitmap methods
> >http://developer.android.com/reference/android/graphics/Bitmap.html
>
> > Balwinder Kaur
> > Open Source Development Center
> > ·T· · ·Mobile· stick together
>
> > The views, opinions and statements in this email are those of the
> > author solely in their individual capacity, and do not necessarily
> > represent those of T-Mobile USA, Inc.
>
> > On Jul 7, 10:02 pm, peeyush varshney 
> > wrote:
> >  > Hi All,
> > >         Has anyone customized the Image. Actually I want to have one
> > Image
> > > and over that one more samll Seeker Type image,
> > > Is it possible. Do anyone have some Idea please help me out..
>
> > > --
> > > Thank & Regards
> > > Peeyush Varshney
>
> --
> Thank & Regards
> Peeyush Varshney
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: loop through strings.xml

2009-07-02 Thread Alexey Volovoy

I didn't check if you'll have an access to that file. If you do - then
you can parse it ( SAX ). But WHY ?

On Jul 1, 11:41 pm, Josh  wrote:
> Is there a way to loop through the values of strings.xml?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Theme.Dialog Activity and Context Menu

2009-07-01 Thread Alexey Volovoy

thanks for reply Dianne.

On Jul 1, 11:20 am, Dianne Hackborn  wrote:
> The current platform doesn't support menus on non-fullscreen windows, sorry.
>
>
>
> On Wed, Jul 1, 2009 at 8:31 AM, Alexey Volovoy  wrote:
>
> > bump ?
>
> > On Jun 22, 8:59 am, Alexey Volovoy  wrote:
> > > Hi All , i have dialog style activity
> > > android:theme="@android:style/Theme.Dialog"
>
> > > When i attachedcontextmenuto it
> > >         @Override
> > >         public void onCreate(Bundle savedInstanceState) {
> > >                 super.onCreate(savedInstanceState);
> > >                 setContentView(R.layout.main);
> > >         }
>
> > >         @Override
> > >         public boolean onCreateOptionsMenu(Menumenu) {
> > >                 super.onCreateOptionsMenu(menu);
>
> > >                 MenuItem item = null;
> > >                 item =menu.add(0,Menu.FIRST,Menu.NONE, "TestContextMenuin
> > > Dialog Theme");
> > >                 item.setIcon(android.R.drawable.ic_menu_edit);
>
> > >                 return true;
> > >         }
>
> > > Themenuappears about 50 px from the bottom of this dialog. So if
> > > activity screen is too small - it right in the middle of the screen.
> > > Is there any way to anchor  menuto the bottom of the screen ?
> > > layout :
> > > 
> > >  > >         xmlns:android="http://schemas.android.com/apk/res/android";
> > >         android:layout_width="fill_parent"
> > >         android:layout_height="fill_parent"
>
> > >          > >                 android:id="@+id/icon"
> > >                 android:layout_width="wrap_content"
> > >                 android:layout_height="wrap_content"
> > >                 android:layout_marginLeft="10sp"
> > >                 android:src="@drawable/icon" />
> > >          > >                 android:id="@+id/title"
> > >                 android:layout_toRightOf="@id/icon"
> > >                 android:layout_width="fill_parent"
> > >                 android:layout_height="wrap_content"
> > >                 android:layout_alignTop="@id/icon"
> > >                 android:layout_alignBottom="@id/icon"
> > >                 android:gravity="left|center"
> > >                 android:text="Title" />
> > >          > >                 android:id="@+id/divider"
> > >                 android:layout_width="fill_parent"
> > >                 android:layout_height="wrap_content"
> > >                 android:layout_below="@id/icon"
> > >                 android:layout_gravity="left"
> > >                 android:src="@drawable/dialog_divider_horizontal_light"
> > />
> > >          > >                 android:id="@+id/note"
> > >                 android:layout_width="fill_parent"
> > >                 android:layout_height="wrap_content"
> > >                 android:layout_below="@id/divider"
> > >                 android:layout_marginLeft="10sp"
> > >                 android:layout_marginBottom="10sp"
> > >                 android:layout_marginTop="10sp"
> > >                 android:text="Some Text" />
>
> > > 
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Theme.Dialog Activity and Context Menu

2009-07-01 Thread Alexey Volovoy

bump ?

On Jun 22, 8:59 am, Alexey Volovoy  wrote:
> Hi All , i have dialog style activity
> android:theme="@android:style/Theme.Dialog"
>
> When i attachedcontextmenuto it
>         @Override
>         public void onCreate(Bundle savedInstanceState) {
>                 super.onCreate(savedInstanceState);
>                 setContentView(R.layout.main);
>         }
>
>         @Override
>         public boolean onCreateOptionsMenu(Menumenu) {
>                 super.onCreateOptionsMenu(menu);
>
>                 MenuItem item = null;
>                 item =menu.add(0,Menu.FIRST,Menu.NONE, "TestContextMenuin
> Dialog Theme");
>                 item.setIcon(android.R.drawable.ic_menu_edit);
>
>                 return true;
>         }
>
> Themenuappears about 50 px from the bottom of this dialog. So if
> activity screen is too small - it right in the middle of the screen.
> Is there any way to anchor  menuto the bottom of the screen ?
> layout :
> 
>          xmlns:android="http://schemas.android.com/apk/res/android";
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>
>                          android:id="@+id/icon"
>                 android:layout_width="wrap_content"
>                 android:layout_height="wrap_content"
>                 android:layout_marginLeft="10sp"
>                 android:src="@drawable/icon" />
>                          android:id="@+id/title"
>                 android:layout_toRightOf="@id/icon"
>                 android:layout_width="fill_parent"
>                 android:layout_height="wrap_content"
>                 android:layout_alignTop="@id/icon"
>                 android:layout_alignBottom="@id/icon"
>                 android:gravity="left|center"
>                 android:text="Title" />
>                          android:id="@+id/divider"
>                 android:layout_width="fill_parent"
>                 android:layout_height="wrap_content"
>                 android:layout_below="@id/icon"
>                 android:layout_gravity="left"
>                 android:src="@drawable/dialog_divider_horizontal_light" />
>                          android:id="@+id/note"
>                 android:layout_width="fill_parent"
>                 android:layout_height="wrap_content"
>                 android:layout_below="@id/divider"
>                 android:layout_marginLeft="10sp"
>                 android:layout_marginBottom="10sp"
>                 android:layout_marginTop="10sp"
>                 android:text="Some Text" />
>
> 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with setExtra

2009-06-22 Thread Alexey Volovoy

logs ?

On Jun 22, 9:24 pm, Will  wrote:
> Sorry, I wasn't clear. That "putExtra" call actually crashes the
> program, which is why I'm so stumped. Why would a putExtra() call
> crash the app?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Widgets ( frequent updates )

2009-06-22 Thread Alexey Volovoy

Skip the work is not a really good option in my case. I have very
little work to do, get next headline and push widget update. So it's
probably will spend equal amount of time of starting and stopping
service
alarm manager , yes it's really good option and you don't need set
very long time - setting it to 0 does the job.

On Jun 22, 6:00 pm, Mark Murphy  wrote:
> Alexey Volovoy wrote:
> > hm.. based on the  logs from UpdateService onStart - it's still
> > executing update after i've uchecked the setting.
>
> That's odd. That means they must be using a WAKEUP form of AlarmManager.
> I would have expected otherwise.
>
> One option is for you to watch for ACTION_SCREEN_ON and
> ACTION_SCREEN_OFF broadcast Intents in your service (or use some other
> method to see if the screen is not -- not sure if there's a simple API
> for that). When you know the screen is off, skip the work in the update.
>
> Another alternative is for you to specify an effectively infinitely long
> updateTimeMillis (2 billion milliseconds or so is over a year) and use
> AlarmManager yourself. You can push updates to the widget whenever you
> want -- updateTimeMillis is just a convenient means for doing so. In
> your own AlarmManager work, don't use one of the WAKEUP variants, and
> the alarm will fire when the phone next awakens if it ordinarily would
> have fired while the phone was asleep.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Widgets ( frequent updates )

2009-06-22 Thread Alexey Volovoy

hm.. based on the  logs from UpdateService onStart - it's still
executing update after i've uchecked the setting.

On Jun 22, 4:35 pm, Alexey Volovoy  wrote:
> One sec.. you might be right - i think i have a dev setting on the
> phone that prevents it from sleeping ..
>
> On Jun 22, 4:31 pm, Mark Murphy  wrote:
>
> > Alexey Volovoy wrote:
> > > Hi All , i'm looking for the best strategy for the following -- widget
> > > suppose to go through cached headlines. And once a 3 hours or so -
> > > pull new ones.
> > > Update are scheduled from widget config file. Everything seems to be
> > > working, except I don't want to running my updates which are simply
> > > changing info on the screen while phone is sleeping. What's the best
> > > strategy to avoid that ? Desired  behavior - phone is not sleeping -
> > > i'll run update which will change headline to next one and check if
> > > there is  a time to pull new headlines. If phone is sleeping - i don't
> > > want to do any of that.
>
> > AFAIK, widgets don't update while the device is asleep. Do you have
> > evidence to the contrary?
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Development Wiki:http://wiki.andmob.org
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Widgets ( frequent updates )

2009-06-22 Thread Alexey Volovoy

One sec.. you might be right - i think i have a dev setting on the
phone that prevents it from sleeping ..

On Jun 22, 4:31 pm, Mark Murphy  wrote:
> Alexey Volovoy wrote:
> > Hi All , i'm looking for the best strategy for the following -- widget
> > suppose to go through cached headlines. And once a 3 hours or so -
> > pull new ones.
> > Update are scheduled from widget config file. Everything seems to be
> > working, except I don't want to running my updates which are simply
> > changing info on the screen while phone is sleeping. What's the best
> > strategy to avoid that ? Desired  behavior - phone is not sleeping -
> > i'll run update which will change headline to next one and check if
> > there is  a time to pull new headlines. If phone is sleeping - i don't
> > want to do any of that.
>
> AFAIK, widgets don't update while the device is asleep. Do you have
> evidence to the contrary?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Widgets ( frequent updates )

2009-06-22 Thread Alexey Volovoy

Hi All , i'm looking for the best strategy for the following -- widget
suppose to go through cached headlines. And once a 3 hours or so -
pull new ones.
Update are scheduled from widget config file. Everything seems to be
working, except I don't want to running my updates which are simply
changing info on the screen while phone is sleeping. What's the best
strategy to avoid that ? Desired  behavior - phone is not sleeping -
i'll run update which will change headline to next one and check if
there is  a time to pull new headlines. If phone is sleeping - i don't
want to do any of that.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Capture the Android's browser HTTP petitions

2009-06-22 Thread Alexey Krasnoriadtsev

GIT is the repository where all android code is.
for Browser, here is the specific link:
http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a=summary


On Jun 21, 1:02 pm, psaltamontes  wrote:
> @Alexey :
>
> What's the meaning of "git"?
>
> @ Hamy :
>
> ¡ I needed this line :) ! -> resp.getEntity().writeTo(bao);
>
> I'm sure that the code that you are put help me a lot.
>
> @ Raphael :
>
> I used Google before put my question here.
>
> If you search this 
> -->http://www.google.com/search?q=set+proxy+for+android+web+browser
>
> The information that Google found is about change the "general/main"
> proxy, I only want redirect the browser's traffic.
>
> Thank you people.
>
> On 21 jun, 00:56, Raphael  wrote:
>
> > On Fri, Jun 19, 2009 at 7:57 AM, psaltamontes wrote:
>
> > > Yes, I want to say request :), sorry , I need improve my English.
>
> > > I don't want my application modify the settings of the browser, the
> > > idea is that the user configure the proxy of the browser and install
> > > my application. This application is a service that listen theHTTP
> > > requests and send to the Internet.
>
> > This might help:
> >  http://www.google.com/search?q=set+proxy+for+android+web+browser
>
> > R/
>
> > > I want capture theHTTPrequest and modify the headers because, in the
> > > header, I put a number to identify the client that connect to my
> > > webserver, doing this, the user don't have to put an user name and a
> > > password. I have written the code to do this, in PC works, but in
> > > Android I don't know how to get this behaviour.
>
> > > How can I do?
>
> > > On 18 jun, 21:14, "Mark Murphy"  wrote:
> > >> > I need capture the Android's browserHTTPpetitions.
>
> > >> I think you mean "request", not "petition".
>
> > >> > In PC to capture theHTTPpetitions is easy, I change the browser
> > >> > configuration, I put localhost and a port () and it's works. But,
> > >> > in Android I don't know how to change the browser configuration.
>
> > >> I would be rather surprised if they allowed applications to adjust the
> > >> proxy server settings of the browser application. That would be a way for
> > >> spyware to attack the user.
>
> > >> For the emulator, you can set up a proxy server from outside the emulator
> > >> environment itself:
>
> > >>http://developer.android.com/guide/developing/tools/emulator.html#proxy
>
> > >> --
> > >> Mark Murphy (a Commons Guy)http://commonsware.com
> > >> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Theme.Dialog Activity and Context Menu

2009-06-22 Thread Alexey Volovoy

Hi All , i have dialog style activity
android:theme="@android:style/Theme.Dialog"

When i attached context menu to it
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);

MenuItem item = null;
item = menu.add(0, Menu.FIRST, Menu.NONE, "Test Context Menu in
Dialog Theme");
item.setIcon(android.R.drawable.ic_menu_edit);

return true;
}

The menu appears about 50 px from the bottom of this dialog. So if
activity screen is too small - it right in the middle of the screen.
Is there any way to anchor  menu to the bottom of the screen ?
layout :

http://schemas.android.com/apk/res/android";
android:layout_width="fill_parent"
android:layout_height="fill_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] Re: Capture the Android's browser HTTP petitions

2009-06-20 Thread Alexey Krasnoriadtsev

You can create your own Browser application, that will allow proxy
configuration. You can also take original Browser app as the base
(it's available in git).

Those users who need proxy will be able to install your browser
application and use it.


On Jun 19, 9:44 am, psaltamontes  wrote:
> Here,
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> there is information about classes that I can use to modify HTTP
> requests. I will try something with this classes.
>
> On 19 jun, 17:34, psaltamontes  wrote:
>
> > Do you know/think if this option will be in the future?
>
> > Now, I'm trying to do something with a webview and webviewclient. But
> > I don't know how to send a "RAW HTTP request" using these classes.
>
> > I can send/receive RAW HTTP with sockets, but I don't know how to link
> > these sockets with the webview.
>
> > Any idea?
>
> > Thanks.
>
> > On 19 jun, 17:14, "Mark Murphy"  wrote:
>
> > > > Yes, I want to say request :), sorry , I need improve my English.
>
> > > > I don't want my application modify the settings of the browser, the
> > > > idea is that the user configure the proxy of the browser and install
> > > > my application. This application is a service that listen the HTTP
> > > > requests and send to the Internet.
>
> > > Hmmm...I do not see where users can set their proxy server, either.
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Use drawable in TextView with SimpleAdapter

2009-06-18 Thread Alexey Krasnoriadtsev

you can extend SimpleAdapter and textView.setCompoundDrawable() while
you build view.


On Jun 18, 3:17 pm, vovkab  wrote:
> Hello
>
> I want to use TextView as ListView item.
> Is any way to assign left drawable to TextView via SimpleAdapter?
>
> Thanks for any help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Howto detect media actions

2009-06-18 Thread Alexey Krasnoriadtsev

Have you tried forcing any of the MediaScanner actions? like adding
new image to the sd card, removing/inserting sdcard.
download img or mp3 through browser.

On Jun 18, 10:01 am, JayBird  wrote:
> Hi Folks,
>
> I'm trying to detect media events.  As a test I created a simple
> broadcast receiver so that I can understand the media events.
> However, for some reason I'm not receiving the broadcast.  Here is my
> code segment and manifest below
>
> 
> http://schemas.android.com/apk/res/android";
>       package="com.test"
>       android:versionCode="1"
>       android:versionName="1.0">
>     
>         
>             
>                  android:name="android.intent.action.ACTION_MEDIA_BAD_REMOVAL" />
>                  android:name="android.intent.action.ACTION_MEDIA_MEDIA_CHECKING" />
>                  android:name="android.intent.action.ACTION_MEDIA_EJECT" />
>                  android:name="android.intent.action.ACTION_MEDIA_MOUNTED" />
>                  android:name="android.intent.action.ACTION_MEDIA_NOFS" />
>                  android:name="android.intent.action.ACTION_MEDIA_REMOVED" />
>                  android:name="android.intent.action.ACTION_MEDIA_SHARED" />
>                  android:name="android.intent.action.ACTION_MEDIA_UNMOUNTABLE" />
>                  android:name="android.intent.action.ACTION_MEDIA_UNMOUNTED" />
>                 
>             
>         
>     
>
> 
>
>   Code Segment 
>
> package com.test;
>
> import android.content.BroadcastReceiver;
>
> public class MSDEBroadcastReceiver extends BroadcastReceiver {
>     @Override
>     public void onReceive(Context context, Intent intent) {
>         // Get the details of the intent
>         String action = intent.getAction();
>         Log.i(LOG_TAG, "-> IntentAction: " + action);
>     }
>     private static final String LOG_TAG = "MSDEBroadcastReceiver";
>
> }
>
> I verified via a logcat that my receiver is working by doing the
> following in a shell
>
> # am broadcast -a com.test.jay
>
> Did I miss something?
>
> Thanks in advance,
> Jay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Wake Locks and Services

2009-06-16 Thread Alexey Krasnoriadtsev

http://developer.android.com/reference/android/view/View.html#attr_android:keepScreenOn

This will keep the screen on, while your view is visible.

On Jun 16, 3:52 am, Thomas Riley  wrote:
> How would I go about doing this.
>
> I have the wake lock working ok now but no harm in knowing a different
> method...
>
> On Jun 16, 8:49 am, Dianne Hackborn  wrote:
>
> > Do  you REALLY need to hold a full wake lock like this?  The vast majority
> > of apps should use the window flag to keep the screen on while their UI is
> > shown.  This way you don't need the power permission, and you are much less
> > likely to have bugs that leave the screen on and cause the user's battery to
> > drain.
>
> > On Sat, Jun 13, 2009 at 3:04 PM, Thomas Riley 
> > wrote:
>
> > > I need to use a wakelock to hold the screen active while its required.
> > > I was recommended to use a service which I have been trying but on the
> > > onDestroy I am getting "wl cannot be resolved". Code below:
>
> > > public class WakeLockService extends Service {
>
> > >       �...@override
> > >        public IBinder onBind(Intent arg0) {
> > >                // TODO Auto-generated method stub
> > >                return null;
> > >        }
>
> > >        public void onCreate() {
> > >                PowerManager pm = (PowerManager) getSystemService
> > > (Context.POWER_SERVICE);
> > >                PowerManager.WakeLock wl = pm.newWakeLock
> > > (PowerManager.FULL_WAKE_LOCK, "My Tag");
> > >                wl.acquire();
> > >        }
>
> > >        public void onDestroy() {
> > >                wl.release();
> > >        }
>
> > > }
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: postInvalidate not work in non-UI thread

2009-06-16 Thread Alexey Volovoy

do this :
http://android-developers.blogspot.com/2009/05/painless-threading.html


On Jun 16, 3:38 am, waterblood  wrote:
> Dear all,
>
>    I cannot make postInvalidate() work in non-UI thread in sdk1.5.
> Below are my code, let me know if i am wrong in some place. It is
> supposed to update imageview every seconds. But it never be updated
> from the bitmap.
>
> public class ThumbnailActivity extends Activity  implements
> OnClickListener{
>         private static final String TAG = "FSL MM Thumbnail TEST";
>         private Thread thumbnailThread;
>         private boolean thumbnailStoped = false;
>
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         Log.i(TAG,"ThumbnailActivity onCreate");
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.thumbnail);
>
>         thumbnailStoped = false;
>         thumbnailThread = new Thread(new Runnable() {
>             public void run() {
>                         Log.i(TAG,"***thumbnailThread run***");
>                         while(! thumbnailStoped ) {
>                                  Bitmap bitmap;
>                                  ImageView thumbimage;
>                                  thumbimage = (ImageView)findViewById
> (R.id.thumbnail_image);
>                                  bitmap = BitmapFactory.decodeFile("/sdcard/
> some.jpeg");
>                                  if(bitmap == null)
>                                          Log.i(TAG,"Error!not get bitmap from 
> .jpg");
>                                  thumbimage.setImageBitmap(bitmap);
>                                  thumbimage.postInvalidate();
>
>                                 Log.i(TAG, "***thumbnailThread
> continue running***");
>                                 SystemClock.sleep
> (1000);
>                               }
>                        });
>
>     }
>
> }
>
> the xml of layout as below:
>
> 
> http://schemas.android.com/apk/res/
> android"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent">
>
>              android:id="@+id/thumbnail_autopreview_button"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_alignParentLeft="true"
>         android:layout_marginTop="8dip"
>         android:layout_marginLeft="10dip"
>         android:text="Auto"
>     />
>
>              android:id="@+id/thumbnail_nextimage_button"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_toRightOf="@id/thumbnail_autopreview_button"
>         android:layout_alignTop="@id/thumbnail_autopreview_button"
>         android:layout_marginLeft="10dip"
>         android:text="Next"
>     />
>
>              android:id="@+id/thumbnail_stoppreview_button"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_toRightOf="@id/thumbnail_nextimage_button"
>         android:layout_alignTop="@id/thumbnail_nextimage_button"
>         android:layout_marginLeft="10dip"
>         android:text="Stop"
>     />
>
>              android:id="@+id/filename_label"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:text="File: /sdcard/hello.mp4"
>         android:layout_below="@id/thumbnail_stoppreview_button"
>     />
>
>              android:id="@+id/thumbnail_image"
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>         android:layout_marginLeft="4dip"
>         android:layout_marginRight="2dip"
>         android:layout_marginTop="8dip"
>         android:layout_below="@id/filename_label"
>     />
> 
>
> Best Regards
> Guoyin Chen
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Relative layout and include tag

2009-06-15 Thread Alexey Volovoy

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