[android-developers] ADB will not install APK file on Android Emulator. Just says: “Performing Streamed Install”

2021-07-21 Thread Henrik Rosenø
Hi!

6 days ago I posted the above question here: 
https://stackoverflow.com/questions/68391618/adb-will-not-install-apk-file-on-android-emulator-just-says-performing-stream
 
But I have not received any answers yet. 
I just tried to post it here on Google Groups, but the post looked 
TERRIBLE, so I deleted it again... 
I hope you will read it on stackoverflow.com... Thank you!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/6d555291-85ba-4b87-bca0-3dfc8ad19826n%40googlegroups.com.


[android-developers] ADB will not install APK file on Android Emulator. Just says: “Performing Streamed Install”

2021-07-21 Thread Henrik Rosenø
Hi! 

I posted this question on stackoverflow.com 6 days ago - 
https://stackoverflow.com/questions/68391618/adb-will-not-install-apk-file-on-android-emulator-just-says-performing-stream
 
- but no one has answered. 

Maybe it's most practical and logical if you answer it there. But here 
comes the question:

ADB will not install my 32-bit APK file on an emulator. But it is not 
showing any error message when trying to install it:

In Android Studio 4.2.2 (on my Ubuntu 20.04.2 LTS laptop) I installed an 
emulator: Pixel_2_API_27_Android_8.1_x86_

I then open a Terminal window and do this:

```

:~$ /home/henrik/Android/Sdk/platform-tools/adb start-server * daemon not 
running; starting now at tcp:5037 * daemon started successfully :~$ which 
adb :~$ /home/henrik/Android/Sdk/platform-tools/adb devices -l List of 
devices attached :~$ emulator @Pixel_2_API_27_Android_8.1_x86_ emulator: 
Android emulator version 30.7.4.0 (build_id 7453540) (CL:N/A) 
handleCpuAcceleration: feature check for hvf cannot add library 
/home/henrik/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: 
failed added library 
/home/henrik/Android/Sdk/emulator/lib64/vulkan/libvulkan.so cannot add 
library /home/henrik/Android/Sdk/emulator/lib64/vulkan/libvulkan.so.1: full 
emulator: INFO: GrpcServices.cpp:315: Started GRPC server at 
127.0.0.1:8554, security: Local emulator: INFO: 
EmulatorAdvertisement.cpp:93: Advertising in: 
/run/user/1000/avd/running/pid_68812.ini qemu-system-i386: warning: TSC 
frequency mismatch between VM (2711993 kHz) and host (2711986 kHz), and TSC 
scaling unavailable

```

In a new Terminal tab I do this:

```
:~$ /home/henrik/Android/Sdk/platform-tools/adb devices -l List of devices 
attached emulator-5554 device product:sdk_gphone_x86 
model:Android_SDK_built_for_x86 device:generic_x86 transport_id:1 :~$ 
/home/henrik/Android/Sdk/platform-tools/adb -s emulator-5554 install 
/mnt/4AF15A0435E762B4/mypython/storage/bin/storage-0.1-armeabi-v7a-debug.apk 
Performing Streamed Install 

```

But then, nothing happens. (I waited a very long time.)

If I copy the APK file to my physical MOTO G5 Android 8.1.0 phone and 
install it, at least I get en error message showing that it DID install.


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/d354bebf-1757-4dc7-83d2-424779bfa63en%40googlegroups.com.


Re: [android-developers] Email Signup - Terms of Service and Privacy Policy

2016-05-29 Thread Henrik
OK, thanks. I guess I'll have to, because there are no guidelines on this 
topic - at least I can't find any. I also use the EU Cookie Consent Policy 
message at launch, however, it's also not black and white if you need it or 
not (EU is not really sure what they want).

On Monday, May 30, 2016 at 6:57:10 AM UTC+2, TreKing wrote:
>
>
> On Sat, May 28, 2016 at 2:53 PM, Henrik <henri...@gmail.com > 
> wrote:
>
>> I want to implement an email signup form to one of our apps. I wonder if 
>> I need a user consent when they launch the app?
>>
>> Some apps present their Terms of Service and Privacy Policy and the users 
>> needs to accept them if they want to use the app. But I'm not sure if this 
>> is necessary or not.
>>
>
> That's a question for your lawyer.
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
> transit tracking app for Android-powered devices
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To 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/22360ab2-980c-4ad4-beea-f40a3bde173b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Email Signup - Terms of Service and Privacy Policy

2016-05-28 Thread Henrik
Hello,

I want to implement an email signup form to one of our apps. I wonder if I 
need a user consent when they launch the app?

Some apps present their Terms of Service and Privacy Policy and the users 
needs to accept them if they want to use the app. But I'm not sure if this 
is necessary or not.

Thanks!

-- 
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/928634b8-7cb6-4d57-a44b-ef7b6475e0c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: in-app biliing purchase flow with promo code return empty payload, why?

2016-03-02 Thread Henrik Lindqvist
I've tried to get an answer to the same problem:
http://stackoverflow.com/questions/35381104/promo-codes-breaks-remote-server-verification


On Wednesday, February 10, 2016 at 9:39:04 PM UTC+1, Frédéric Ravetier 
wrote:
>
> Hi, 
>
> I code in ap billing in my application. Everything works fine except when 
> I use a promo code in the app. Google returns an empty payload, even if I 
> send an ID. Then when I chick if the ID is equal to payload I reject the 
> transaction.
>
> Why ? 
>
> Thank you for your help!
>
> Regards,
> Fred
>

-- 
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/bcf6336a-9060-4b18-b755-45e88f03875a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Minimum hardware requirements to run Android?

2016-01-04 Thread Henrik Fritzon
Hi!

I am trying to run Android on one core but it stops working after a while 
(~ 1-2 minutes), i.e I can open apps, rotate the screen turn the screen 
on/off etc. 

I wonder if anyone knows the minimum hardware requirements(number of CPUs 
etc) to be able to run Android(preferably Lollipop)?
So than I can conclude if it is possible to run Android on a single 
Cortex-A53 at approx. 1.5 GHz.

Best regards
Henrik 

  

-- 
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/55b3c831-144d-4c4c-86f5-423323281440%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Android 4.4 WebView cannot load content:// urls in html page

2014-02-19 Thread Henrik Lindqvist
This is a app breaking change. Android's content sharing is built around 
content:// uri's, this make that impossible.

Every one please star:

https://code.google.com/p/android/issues/detail?id=63033



On Friday, January 10, 2014 8:30:05 PM UTC+1, ankur wrote:

 We found some behavior changes on Kitkat's new Chromium webview 
 implementation.  One issue we encountered was the content:// urls in a 
 downloaded html page are no longer getting loaded via the content provider. I 
 was able to put together a small Android app to demonstrate this behavior 
 change (https://github.com/lhwa/KitkatWebviewTest). When the page contains an 
 image src url in content:// scheme, the image cannot be loaded on Kitkat 
 and we get the following errors in logcat: 

 INFO/chromium(6759): [INFO:CONSOLE(9)] Not allowed to load local resource: 
 content://com.testing.image/kitkat.png, source: 
 https://googledrive.com/host/0B6yymhTJtX7ZRVdoRjNuWDA5NGc/example.html (9)

 The image can be loaded correctly in webview on Android 4.3 and priori 
 versions. I was not able to find any websettings to work around this on 
 Kitkat.  Can anyone help address this behavior change on Kitkat? Or share 
 some insights on the given error and suggest any workaround? 


 Thanks and regards,

 Ankur.



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


[android-developers] Developer console (store page) analytics

2013-09-28 Thread Henrik Lindqvist
In the Google I/O 2013 video presenting coming features for the Developer 
Console, Riccardo Govoni talks about Analytics for Google Play Store page 
view etc.:

https://www.youtube.com/watch?feature=player_detailpagev=SDaf7f9yl6E#t=1259

When will this feature be launched?

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


[android-developers] Google Play Store hidden ratings

2013-03-27 Thread Henrik Lindqvist
My app only got 3 written review and 2 ratings. Why can't i see who gave 
the rating only, i see who made the written review!?

Wasn't the whole point of forcing users to user Google+ to make anonymous 
reviews/ratings impossible!

Does the pre-Google+ ratings score for as much as the post-Google+ ratings 
when calculating the app listing position? 
If it does, it very unfair to new apps since nowdays rating/review seems to 
rarely be made.

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




[android-developers] OpenGL ES 3.0 support on Android - timeframe?

2012-12-19 Thread Henrik Rydgård
Hi,

The OpenGL ES 3.0 specification was released this 
summer: http://www.khronos.org/opengles/

Does anyone know when we can expect to see it supported on Android?

Several newer mobile GPUs have the feature set required, and it would be 
nice to be able to access it.

Thanks,
Henrik

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ADT export wizard with Proguard obfuscation enabled does not work

2011-06-02 Thread Henrik
I had a similar problem with the error message:
Error: D:\Work (Access is denied)

My android project files was in the folder D:\Work\#svn-android
\project name.
Removing the '#' in the folder name solved to problem.

I hope this helps,
Henrik

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

2011-01-29 Thread henrik
On 29 Jan, 02:54, davemac davemac...@gmail.com wrote:
 I'm trying to download Honeycomb preview but I get this from
 sdk_manager:

 Downloading SDK Platform Android Honeycomb Preview, revision 1
 File not 
 found:http://dl-ssl.google.com/android/repository/android-3.0_pre_r01-linux...

 I've tried with https also with the same result. Where is it now
 please?

I've got the same problem.  android-3.0_pre_r01-linux.zip is nowhere
to be found...

H

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

2011-01-29 Thread henrik
On Jan 29, 9:03 pm, circle kenne...@gmail.com wrote:
 Same. It seems that Google removed the file.

 I found some links on the web, but don't feel very comfortable installing
 from unofficial source...

By some links I guess you mean 
http://burnbit.com/torrent/162617/android_3_0_pre_r01_linux_zip.
It's useless, since no-one is seeding.

H

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

2011-01-25 Thread Henrik Lindqvist
The docs say you should do the following if you only want some corners
rounded:

corners android:radius=15dp android:bottomRightRadius=0dip
android:bottomLeftRadius=0dip /

Never got that it work tho.


On Jan 25, 2:30 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Lior,

 Apparently, something like this works a little better:

 corners
 android:topLeftRadius=15dp
 android:topRightRadius=15dp
 android:bottomRightRadius=0.1dp
 android:bottomLeftRadius=0.1dp /

 -- Kostya

 25.01.2011 15:58, Smiley пишет:



  Hi,
  I am following the instruction here:
 http://developer.android.com/guide/topics/resources/drawable-resource...

  and I am trying to draw a rectangle with only 2 rounded corners.

  Here is my xml

  ?xml version=1.0 encoding=utf-8?
  shape xmlns:android=http://schemas.android.com/apk/res/android;

     corners android:radius=15dp android:bottomRightRadius=0dp
              android:bottomLeftRadius=0dp /
     gradient android:angle=90 android:startColor=#c45209
             android:endColor=#edb18c android:centerColor=#ea6814 /
  /shape

  I tried many variations, with or without the android:radius attribute
  but no luck.
  Any suggestions?
  Thanks,
  Lior

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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] startActivity(ForResult) at Activity start (on/Create/Start/Resume) not working

2011-01-18 Thread Henrik Lindqvist
I'am trying to start a child Activity with startActivity(ForResult)
when the main Activity starts. It doesn't work. If the child Activity
used Theme.Dialog it doesn't show up at all. With a normal Theme it's
displayed, but when I close the top child activity, a RuntimeException
is thrown:

ActivityThread.performResumeActivity(IBinder, boolean) line: 2851
ActivityThread.handleResumeActivity(IBinder, boolean, boolean) line:
2866
BinderProxy(ActivityThread$H).handleMessage(Message) line: 1819
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4203
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 791
ZygoteInit.main(String[]) line: 549
NativeStart.main(String[]) line: not available [native method]

There is no problem calling startActivity(ForResult) on a click or
menu selection. Should I use any intent flags?

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

2011-01-17 Thread Henrik Lindqvist
My AppWidgets are updated by a Service at user-defined intervals or
when certain intents occur. To save battery, I only update the
AppWidgets when the screen is on (SCREEN_ON).

Is there any other way to stop updating AppWidgets unnecessarily?

Only when the home screen is visible?
Only when a specific AppWidget is on screen?

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

2011-01-17 Thread Henrik Lindqvist

On Jan 17, 4:17 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Henrik,

 SCREEN_OFF is usually followed by the device entering sleep mode, so that
 issue pretty much takes care of itself.

I stop updating on SCREEN_OFF, the start again on SCREEN_ON. This
saves alot, but I was wondering if I can do more.


 Checking for the current virtual home screen, and currently active home app
 among several possibly installed doesn't really fit the widget programming
 model - it's more a push rather than pull (as it is with regular views, that
 are drawn on demand). I hope that home screen apps have some smarts for that
 (and maybe they really do).

The AppWidget model is very basic, that's why I'am asking on how to
work around the limitations.


 I found it very useful to implement checks for stale widget ids in my
 apps, so my code doesn't waste time updating 5-10-88 (yes, I've seen that
 number) widgets when there is only one on the screen.

 http://kmansoft.wordpress.com/2010/06/22/per-widget-options-stale-wid...

Thanks for the tip. I'am already doing this.


 Some causes of this are fixed in 2.2, but I'm keeping that code just in
 case.

 -- Kostya

 2011/1/17 Henrik Lindqvist henrik.lindqv...@gmail.com

  My AppWidgets are updated by a Service at user-defined intervals or
  when certain intents occur. To save battery, I only update the
  AppWidgets when the screen is on (SCREEN_ON).

  Is there any other way to stop updating AppWidgets unnecessarily?

  Only when the home screen is visible?
  Only when a specific AppWidget is on screen?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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: Widgets size

2011-01-17 Thread Henrik Lindqvist
This is how I calculate the AppWidget size:

  protected Point getAppWidgetPixelSize (AppWidgetProviderInfo
appWidgetInfo, Point point) {
int cx = (appWidgetInfo.minWidth  + 2) / 74;
int cy = (appWidgetInfo.minHeight + 2) / 74;
float density = getResources().getDisplayMetrics().density;
switch (getResources().getConfiguration().orientation) {
  case Configuration.ORIENTATION_PORTRAIT:
point.x = (int)( 80 * cx * density + .5f);
point.y = (int)(100 * cy * density + .5f);
return point;
  case Configuration.ORIENTATION_LANDSCAPE:
point.x = (int)(106 * cx * density + .5f);
point.y = (int)( 74 * cy * density +.5f);
return point;
  //case Configuration.ORIENTATION_SQUARE:
  //case Configuration.ORIENTATION_UNDEFINED:
  default:
throw new IllegalStateException(orientation);
}
  }



On Jan 17, 5:54 pm, Cleverson clevers...@gmail.com wrote:
 Hi,

 I'm trying to understand how the home screen calculates how many cells
 will be assigned to a given widget. I came across the following
 sentence in the Android Developer Site:

 Because the Home screen's layout orientation (and thus, the cell
 sizes) can change, as a rule of thumb, you should assume the worst-
 case cell size of 74 pixels for the height and width of a cell.
 However, you must subtract 2 from the final dimension to account for
 any integer rounding errors that occur in the pixel count. To find
 your minimum width and height in density-independent pixels (dp), use
 this formula:
 (number of cells * 74) - 2
 Following this formula, you should use 72 dp for a height of one cell,
 294 dp and for a width of four cells.

 What if I have a mdpi (160dpi) device whose resolution is 480x800?

 In a mdpi device, each 1 dip stands for 1 pixel. So, if my widget is
 72dip x 294dip, it would take 72px x 294px in the mdpi device.
 As far as I cound understand, in the example above, the widget would
 not take 4 cells in this device. The device is 480 pixels wide and 294
 pixels would be covered by 3 cells.

 Who's wrong here? The formula or my interpretation?

 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: ImageView, no scaling and gravity

2011-01-16 Thread Henrik Lindqvist
I've already tried that. It works if the bitmap is smaller than the
ImageView, it aligns to the right edge correctly. But, if the bitmap
is larger, its cropped at both left and right side. Seems like an
ImageView can't expand to be larger than it's parent, even inside an
FrameLayout.

Any trick to make a ImageView larger than it's parent FrameLayout?


On Jan 16, 7:20 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 Use a layout that supports the android:layout_gravity attribute, such
 as FrameLayout.  The regular android:gravity is only used the
 TextViews to position the text if the view is larger than the text.

 On Jan 16, 11:12 am, Henrik Lindqvist henrik.lindqv...@gmail.com
 wrote:

  I have a runtime generated Bitmap, for a RemoteView, that I wan't
  displayed within a ImageView without scaling, so I use
  scaleType=center. Now, if the bitmap is smaller than the ImageView I
  wan't it to gravitate to the right. Or, if the bitmap is to large,
  crop the left side.

  ImageView seems to ignore gravity. I've tried everything. Nesing
  inside a FrameLayout etc, nothing works! Any other options?

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

2011-01-16 Thread Henrik Lindqvist
On Jan 16, 5:04 pm, Mark Murphy mmur...@commonsware.com wrote:

 On Sun, Jan 16, 2011 at 11:02 AM, Henrik Lindqvist

 henrik.lindqv...@gmail.com wrote:
  I've already tried that. It works if the bitmap is smaller than the
  ImageView, it aligns to the right edge correctly. But, if the bitmap
  is larger, its cropped at both left and right side. Seems like an
  ImageView can't expand to be larger than it's parent, even inside an
  FrameLayout.

 Of course. That's a rule for any container/child relationship in Android.

If a child view can't be larger than it's parent, how does a
ScrollView work?


  Any trick to make a ImageView larger than it's parent FrameLayout?

 Move it outside of the FrameLayout into some larger container. Or,
 expand the FrameLayout.

I can't, it's an AppWidget.


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

 _Android Programming Tutorials_ Version 3.1 Available!

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


[android-developers] Re: ImageView, no scaling and gravity

2011-01-16 Thread Henrik Lindqvist

On Jan 16, 5:19 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 I think it should work to put it inside a frame layout with exact values for
 width/height (specifying maximum image size before cropping occurs). Then on
 the image view, specify layout_gravity=right, and width/height as
 wrap_content.


layout_gravity=right, and width/height as wrap_content is what I do
now. Almost works.

Setting width/height on the FrameLayout is a problem. It's an
AppWidget so I don't really know the size. How does this affect the
offset of the child?

If only ImageView could honor gravity this wouldn't be a problem. Or
setting custom typefaces through xml. Sigh.

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com
 16.01.2011 19:06 пользователь Mark Murphy mmur...@commonsware.com
 написал:

  On Sun, Jan 16, 2011 at 11:02 AM, Henrik Lindqvist
  henrik.lindqv...@gmail.com wrote:
  I've already tried that. It works if the bitmap is smaller than the
  ImageView, it aligns to the right edge correctly. But, if the bitmap
  is larger, its cropped at both left and right side. Seems like an
  ImageView can't expand to be larger than it's parent, even inside an
  FrameLayout.

  Of course. That's a rule for any container/child relationship in Android.

  Any trick to make a ImageView larger than it's parent FrameLayout?

  Move it outside of the FrameLayout into some larger container. Or,
  expand the FrameLayout.

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

  _Android Programming Tutorials_ Version 3.1 Available!

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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: ImageView, no scaling and gravity

2011-01-16 Thread Henrik Lindqvist
Wow, thanks. Your suggestion with a larger FrameLayout fixed it!

...LinearLayout etc...
FrameLayout
  android:layout_width=1000px
  android:layout_height=wrap_content
  android:layout_gravity=right
  ImageView
android:id=@+id/image
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_gravity=right
android:scaleType=center/
/FrameLayout
...LinearLayout etc...

You said a child view couldn't be larger than it's parent/container!?
Now the FrameLayout is forcefully wider than it's parents and the
whole app-widget.

Now, if I only could get the clipped edge faded for a nice ellipsize
effect. :)


On Jan 16, 7:38 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Sun, Jan 16, 2011 at 11:48 AM, Henrik Lindqvist

 henrik.lindqv...@gmail.com wrote:
  Of course. That's a rule for any container/child relationship in Android.

  If a child view can't be larger than it's parent, how does a
  ScrollView work?

 The visible bounds of the child are still not bigger than the visible
 bounds of the parent.

   Any trick to make a ImageView larger than it's parent FrameLayout?

  Move it outside of the FrameLayout into some larger container. Or,
  expand the FrameLayout.

  I can't, it's an AppWidget.

 Inflate a different layout for the app widget, one where the ImageView
 is moved outside the FrameLayout into a larger container, or expand
 the FrameLayout.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 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] ImageView, no scaling and gravity

2011-01-15 Thread Henrik Lindqvist
I have a runtime generated Bitmap, for a RemoteView, that I wan't
displayed within a ImageView without scaling, so I use
scaleType=center. Now, if the bitmap is smaller than the ImageView I
wan't it to gravitate to the right. Or, if the bitmap is to large,
crop the left side.

ImageView seems to ignore gravity. I've tried everything. Nesing
inside a FrameLayout etc, nothing works! Any other options?

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

2011-01-15 Thread Henrik Lindqvist
The receiver needs to have a diffrent android:name, provider class.
Just create one for each size.

On Jan 16, 4:30 am, John Gaby jg...@gabysoft.com wrote:
 Is there a way to allow the user to choose the size of the App Widget
 when he places it on his Home screen?  I tried creating 2
 receiver ... /receiver sections in the manifest for 2 different
 sizes, but only the first shows up.

 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: TextView setCompoundDrawables inconsistent size

2011-01-09 Thread Henrik Lindqvist
I set the drawable using xml android:drawableBottom so
setCompoundDrawablesWithIntrinsicBounds should be used. I've it now
also tried setting it programmatically, same result. I'am going back
to using nested LinearLayout's for label and button, this is to much
of a hassle.


On Jan 9, 4:04 am, Romain Guy romain...@android.com wrote:
 You should use setCompoundDrawablesWithIntrinsicBounds()

 On Sat, Jan 8, 2011 at 6:40 PM, Henrik Lindqvist henrik.lindqv...@gmail.com



  wrote:
  I'am trying to use TextView's setCompoundDrawables feature because i
  wan't a button with a label above it. I set android:drawableBottom to
  my button drawable, which is a layer-list with a button background,
  an icon and a toggle indicator.

  First app launch every thing looks nice, close app, launch again and
  the drawables seems to have lost their padding. If I close the app and
  wait a few more seconds, GC runs or something, then the buttons looks
  ok again.

  Does the drawables gets altered at first launch? Doesn't the TextView
  set the bounds on the drawables the second launch? Very inconsistent.

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

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them

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


[android-developers] TextView setCompoundDrawables inconsistent size

2011-01-08 Thread Henrik Lindqvist
I'am trying to use TextView's setCompoundDrawables feature because i
wan't a button with a label above it. I set android:drawableBottom to
my button drawable, which is a layer-list with a button background,
an icon and a toggle indicator.

First app launch every thing looks nice, close app, launch again and
the drawables seems to have lost their padding. If I close the app and
wait a few more seconds, GC runs or something, then the buttons looks
ok again.

Does the drawables gets altered at first launch? Doesn't the TextView
set the bounds on the drawables the second launch? Very inconsistent.

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


[android-developers] Re: NFC hardware to test Android 2.3 apps

2011-01-05 Thread henrik
On 17 Des 2010, 04:17, Eric ekbel...@gmail.com wrote:
 I am looking at using the NFC APIs in Android.  Are there any tags or other
 hardware that you would recommend for testing?  I'd like some tags that are
 programmable.  

I just tried an Oyster card (for the London Underground), and it was
detected by the demo app.  I don't know if it's writable, since it's
detected as an Unknown tag type.

Henrik

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ProgressBar with moving image. Drawable resource using translate.

2011-01-05 Thread Henrik Lindqvist
Think I've got it, even without the 9-patch hack.

Using scale to translate/move a separate bitmap with gravity to
prevent scaling the needle itself. Sure at low progress it will be
clipped, as the 9-patch would be squashed. But that's easy to
compensated for.


On Jan 5, 3:57 am, Henrik Lindqvist henrik.lindqv...@gmail.com
wrote:
 Thanks for the tips. Seems ProgressBar is useless in this case, so
 I'll probably need to hack my own.

 The ApiDemos contains a resource for circular progress-bars, \samples
 \android-8\ApiDemos\rescircular_progress.xml:

 layer-list xmlns:android=http://schemas.android.com/apk/res/
 android
   item android:drawable=@drawable/progress_circular_background /
   item
     rotate
       android:pivotX=50%
       android:pivotY=50%
       android:fromDegrees=0
       android:toDegrees=360
       android:drawable=@drawable/progress_particle /
   /item
 /layer-list

 So rotate is supported. Too bad translate isn't.

 On Jan 5, 3:39 am, Mark Murphy mmur...@commonsware.com wrote:

  AFAIK, neither rotate nor translate are valid for a drawable
  resource. Those are used with tween animations for animation
  resources:

 http://developer.android.com/guide/topics/resources/animation-resourc...

  As for how to solve your problem, one solution put an ImageView with
  your needle atop your ProgressBar and use margins to position it.
  Crude, but as you point out, in app widgets, you don't exactly have
  tons o' options.

  Another possible solution is to make your progress drawable be a
  nine-patch PNG, where the needle is outside of the stretch area. That
  may not give you quite accurate results for low progress values, but
  it will asymptotically approach accuracy by the time you complete the
  bar.

  On Tue, Jan 4, 2011 at 9:30 PM, Henrik Lindqvist

  henrik.lindqv...@gmail.com wrote:
   I'am trying to make a ProgressBar with a moving needle. Since it's in
   a app-widget I can't make any custom code. It all needs to be done
   with Drawables.

   Creating a rotating ProgressBar is easy, just use rotate. But to
   move a needle image I've tried translate, it gives an error invalid
   drawable tag translate.

   Anyone got any suggestions?

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

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

  Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2

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


[android-developers] ProgressBar with moving image. Drawable resource using translate.

2011-01-04 Thread Henrik Lindqvist
I'am trying to make a ProgressBar with a moving needle. Since it's in
a app-widget I can't make any custom code. It all needs to be done
with Drawables.

Creating a rotating ProgressBar is easy, just use rotate. But to
move a needle image I've tried translate, it gives an error invalid
drawable tag translate.

Anyone got any suggestions?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ProgressBar with moving image. Drawable resource using translate.

2011-01-04 Thread Henrik Lindqvist
Thanks for the tips. Seems ProgressBar is useless in this case, so
I'll probably need to hack my own.

The ApiDemos contains a resource for circular progress-bars, \samples
\android-8\ApiDemos\rescircular_progress.xml:

layer-list xmlns:android=http://schemas.android.com/apk/res/
android
  item android:drawable=@drawable/progress_circular_background /
  item
rotate
  android:pivotX=50%
  android:pivotY=50%
  android:fromDegrees=0
  android:toDegrees=360
  android:drawable=@drawable/progress_particle /
  /item
/layer-list

So rotate is supported. Too bad translate isn't.



On Jan 5, 3:39 am, Mark Murphy mmur...@commonsware.com wrote:
 AFAIK, neither rotate nor translate are valid for a drawable
 resource. Those are used with tween animations for animation
 resources:

 http://developer.android.com/guide/topics/resources/animation-resourc...

 As for how to solve your problem, one solution put an ImageView with
 your needle atop your ProgressBar and use margins to position it.
 Crude, but as you point out, in app widgets, you don't exactly have
 tons o' options.

 Another possible solution is to make your progress drawable be a
 nine-patch PNG, where the needle is outside of the stretch area. That
 may not give you quite accurate results for low progress values, but
 it will asymptotically approach accuracy by the time you complete the
 bar.

 On Tue, Jan 4, 2011 at 9:30 PM, Henrik Lindqvist



 henrik.lindqv...@gmail.com wrote:
  I'am trying to make a ProgressBar with a moving needle. Since it's in
  a app-widget I can't make any custom code. It all needs to be done
  with Drawables.

  Creating a rotating ProgressBar is easy, just use rotate. But to
  move a needle image I've tried translate, it gives an error invalid
  drawable tag translate.

  Anyone got any suggestions?

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

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

 Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2

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


[android-developers] One local service multiple binding activities

2010-11-20 Thread Henrik Lindqvist
I have a local Service to which multiple activites needs to bind. In
the first launched Activity, bindService returns true and
onServiceConnected is called. But in any additionally launched
activites bindService returns false, and I can't get a reference to my
Service.

How can multiple activities simultaneously be connected to a local
Service?

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


[android-developers] Re: One local service multiple binding activities

2010-11-20 Thread Henrik Lindqvist
On further investigation. It works fine, unless a TabActivity/TabHost
launches the Activity that calls bindService.

Reading this thread from 2008:
http://groups.google.com/group/android-developers/browse_thread/thread/978fc19ae5976efa/0b830abad32d572a

 * you can't bind to a service, onServiceConnected will never be
 called.

This is a bug that should be fixed in the future.  Not documented because we
didn't realize it was broken. :)

Seems like an old, ignored bug in TabActivity. Sigh!


On Nov 20, 6:53 pm, Henrik Lindqvist henrik.lindqv...@gmail.com
wrote:
 I have a local Service to which multiple activites needs to bind. In
 the first launched Activity, bindService returns true and
 onServiceConnected is called. But in any additionally launched
 activites bindService returns false, and I can't get a reference to my
 Service.

 How can multiple activities simultaneously be connected to a local
 Service?

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


[android-developers] Re: One local service multiple binding activities

2010-11-20 Thread Henrik Lindqvist
Solution:
http://stackoverflow.com/questions/2914921/android-context-bindservice-always-returns-false-and-serviceconnection-object-is

Use:
getApplicationContext().bindService(...)

Issue:
http://code.google.com/p/android/issues/detail?id=2483

On Nov 20, 8:20 pm, Henrik Lindqvist henrik.lindqv...@gmail.com
wrote:
 On further investigation. It works fine, unless a TabActivity/TabHost
 launches the Activity that calls bindService.

 Reading this thread from 
 2008:http://groups.google.com/group/android-developers/browse_thread/threa...

  * you can't bind to a service, onServiceConnected will never be
  called.

 This is a bug that should be fixed in the future.  Not documented because we
 didn't realize it was broken. :)

 Seems like an old, ignored bug in TabActivity. Sigh!

 On Nov 20, 6:53 pm, Henrik Lindqvist henrik.lindqv...@gmail.com
 wrote:

  I have a local Service to which multiple activites needs to bind. In
  the first launched Activity, bindService returns true and
  onServiceConnected is called. But in any additionally launched
  activites bindService returns false, and I can't get a reference to my
  Service.

  How can multiple activities simultaneously be connected to a local
  Service?



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


[android-developers] AlarmManager starting service, API Level?

2010-11-10 Thread Henrik Lindqvist
I've read comment that the AlarmManager in a earlier API version
couldn't start services. Prior to which API Level was that?

I'am currently testing in the emulator with API Level 4 and it start a
service just fine.

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

2010-11-10 Thread Henrik Lindqvist
Thanks. I'am using the AlarmManager to send PendingIntent.getService
with a Explicit Intent to an IntentService.

Read this post from July 2008:

The Alarm Service sample code in ApiDemos at
http://code.google.com/android/samples/ApiDemos/src/com/google/androi...
is intended to provide the best practices for this.  The current
example is a little overly complex because of the need of the
intermediate receiver.  In a future SDK where you can have the alarm
manager directly start a service, this is a lot cleaner.



On Nov 11, 1:10 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Nov 10, 2010 at 7:00 PM, Henrik Lindqvist

 henrik.lindqv...@gmail.com wrote:
  I've read comment that the AlarmManager in a earlier API version
  couldn't start services. Prior to which API Level was that?

 I don't know where you read that. PendingIntents have been able to
 start services since the beginning.

 I am a bit nervous about how WakeLocks work when starting a service
 directly versus going through a BroadcastReceiver, but otherwise
 AlarmManager starting services works like a champ. It's great for app
 widgets, if you have an IntentService that is doing the updates and
 you are controlling the update schedule yourself rather than using
 android:updatePeriodMillis, for example.

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

 _Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Re: AlarmManager starting service, API Level?

2010-11-10 Thread Henrik Lindqvist
Thank. I'll sleep well tonight knowing raptors are extinct.

On Nov 11, 1:30 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Nov 10, 2010 at 7:27 PM, Henrik Lindqvist

 henrik.lindqv...@gmail.com wrote:
  Thanks. I'am using the AlarmManager to send PendingIntent.getService
  with a Explicit Intent to an IntentService.

  Read this post from July 2008:

  The Alarm Service sample code in ApiDemos at
 http://code.google.com/android/samples/ApiDemos/src/com/google/androi...
  is intended to provide the best practices for this.  The current
  example is a little overly complex because of the need of the
  intermediate receiver.  In a future SDK where you can have the alarm
  manager directly start a service, this is a lot cleaner.

 July of 2008 is the Jurassic era of Android development. Personally, I
 was nearly eaten by a raptor.

 :-)

 Seriously, that would have been the Android M5 pre-release. Anything
 older than, say, October 2008 should be viewed with a bit of
 skepticism.

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

 _Android Programming Tutorials_ Version 3.0.1 Available!

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


[android-developers] Stop AlarmManager sending past repeating alarm.

2010-11-10 Thread Henrik Lindqvist
When the device awakens from sleep state the AlarmManager sends all
missed alarms. Can I prevent this from happening, grouping past
alarm to a single intent instead?

There is an intent extra android.intent.extra.ALARM_COUNT which
seems to suggest it's possible?

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


[android-developers] service intent-filter

2010-11-09 Thread Henrik Lindqvist
I've got a IntentService started by an alarm. I also want it to start
on other intents, like ACTION_TIME_CHANGED. Do I have to create an
BroadcastReceiver that start the service when it receivers the
TIME_SET intent, can't the service be started by the intent in the
first place. I tried to add service/intent-filter/action but
didn't work. Should 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: service intent-filter

2010-11-09 Thread Henrik Lindqvist
Wow. Quick reply. Thanks.

Ok. So to let the service act on the broadcast intents I'll forward
them in the BroadcastReceiver:

public void onReceive (Context context, Intent intent) {
  context.startService(intent.setClass(context, MyService.class));
}

Is that good practice?


On Nov 10, 1:53 am, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Nov 9, 2010 at 7:51 PM, Henrik Lindqvist

 henrik.lindqv...@gmail.com wrote:
  I've got a IntentService started by an alarm. I also want it to start
  on other intents, like ACTION_TIME_CHANGED. Do I have to create an
  BroadcastReceiver that start the service when it receivers the
  TIME_SET intent, can't the service be started by the intent in the
  first place. I tried to add service/intent-filter/action but
  didn't work. Should it?

 There are three channels, if you will, on the Intent message bus:

 -- starting activities (Activity)
 -- starting services (Service)
 -- sending broadcasts (BroadcastReceiver)

 ACTION_TIME_CHANGED is a broadcast action (as indicated in the docs).
 That can only be received by a BroadcastReceiver. It cannot be
 received by a service.

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

 Android App Developer 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


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

2010-05-30 Thread Henrik Sandström
The requirement was 5000 downloads by February 28th.

On Mon, May 31, 2010 at 7:47 AM, NightGospel wutie...@gmail.com wrote:
 Hi all,

 Does this program still continue? Because I have one app achived the
 threshold (over 5000 downloads and average rating is 3.5 up) two weeks
 ago, I hope I can be one of the receivers. :)

 NightGospel

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

2010-05-19 Thread Henrik
No they are not, java threads runs within the dvm and
nativ threads are running in kernelspace..


/Henrik

On 9 Maj, 03:11, ls02 agal...@audible.com wrote:
 Does anyone know how Java thread relates to Android native thread?
 Does it map one to one?

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

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


[android-developers] Can I create a sticky dialog?

2010-05-18 Thread henrik
Hi.

I have an app that performs an asynchronous login as part of its
startup sequence.  This  eventually displays a list of items.

A separate thread performs integrity checks on a database on the
sdcard during the startup sequence.  If something is unexpected, I do
a sendBroadcast() that triggers a showDialog() on my base activity
class.  This asks the user on how to react to the unexpected event.

My problem is: this dialog disappears as soon as the startup sequence
finishes and displays the list of items.  Is it possible to make my
dialog stay on top no matter what?

Best regards,
Henrik

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


[android-developers] Re: Can I create a sticky dialog?

2010-05-18 Thread henrik
On May 18, 5:33 pm, TreKing treking...@gmail.com wrote:
 On Tue, May 18, 2010 at 8:22 AM, henrik henrik.aron...@gmail.com wrote:
  My problem is: this dialog disappears as soon as the startup
  sequence finishes and displays the list of items.

 Why does you startup sequence complete and show items if there was an error
 the user has to respond to?

Because the startup is not dependent on the background check.

Henrik

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


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

2010-04-29 Thread Henrik Sandström
Got tracking number from Fedex! They are going to deliver my phone
today. Too bad no one will be home :(
This is the path it took:
VELDHOVEN NL
PARIS FR
STOCKHOLM-ARLANDA SE
I am in Sweden

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


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

2010-04-29 Thread Henrik Sandström
Fedex come to your door, if you are not there they leave a note with a number.

You can get in touch with fedex by calling them or chatting and ask
them to try to retrieve your tracking number.


On Thu, Apr 29, 2010 at 1:20 PM, fhucho fhu...@gmail.com wrote:
 I have never received anything from Fedex or similar company before,
 how does it work? Do they call you in advance? I have one missed call
 (I erased the number), so I'm little worried. Answer quickly please,
 I'm quite impatient ;)

 On Apr 29, 1:12 pm, Lim Sim lim@gmail.com wrote:
 Hmm...should I be worried that the guy on the live chat says they can't find
 a package for my address?

 On 29 April 2010 11:53, feilfly feil...@gmail.com wrote:





  mine is confirmed it will arrive today and I got the tracking number
  now, I'm in UK

  Thanks google.

  :-)

  Anyone who wants to track their  package just go to the live chat on
  FedEx and ask.

  here is UK FedEx live chat link :
 http://www.fedex.com/ukservices/helpme/index.html

  On Apr 29, 11:33 am, dgoemans dgoem...@gmail.com wrote:
   Currently installing stuff on my new Nexus One in the Netherlands.
   Thank you Google!

   On Apr 29, 12:18 pm, Mads Kalør mkal...@gmail.com wrote:

Looking forward to receiving mine, but how do you check your delivery
status? We don't have a tracking number, do we?

Den 4 29, 2010 12:14 PM skrev Al alcapw...@googlemail.com:

Apparently mine arrive today aswell, london uk :D, wish i could get
home now!

Thanks google!

On Apr 29, 11:08 am, Olivier Bonal olivier.bo...@gmail.com wrote: 
  Just
got mine in Marseille Fr...

 On Thu, Apr 29, 2010 at 12:01 PM, Mark Gjøl bitflips...@gmail.com
  wrote:
  How do you see this...

  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2Bunsubs

cr...@googlegroups.comandroid-developers%2Bunsubs

  cr...@googlegroups.com   For more
  options,

visit this group athttp://...
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2Bunsubs

cr...@googlegroups.comandroid-developers%2Bunsubs

  cr...@googlegroups.com  For more
  options,

visit this group athttp:// ...   
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2Bunsubs

cr...@googlegroups.comandroid-developers%2Bunsubs

  cr...@googlegroups.com For more options,
  visit

this group athttp://  ...  
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2Bunsubs

cr...@googlegroups.comandroid-developers%2Bunsubs

  cr...@googlegroups.comFor more options,
  visit

this group athttp://   ... 
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2Bunsubs

cr...@googlegroups.comandroid-developers%2Bunsubs

  cr...@googlegroups.com   For more options,
  visit this

group athttp://...
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2Bunsubs

cr...@googlegroups.comandroid-developers%2Bunsubs

  cr...@googlegroups.com  For more options, visit
  this

group athttp:// ...   
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2Bunsubs

cr...@googlegroups.comandroid-developers%2Bunsubs

  cr...@googlegroups.com For more options, visit
  this

group athttp://  ...  
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2Bunsubs

cr...@googlegroups.comandroid-developers%2Bunsubs

  cr...@googlegroups.comFor more options, visit this
  group

at   http://...

  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2Bunsubs
cr...@google...
 ...

 read more »

--

You received this message because you are subscribed to the Google
  Groups
Android Developers group...

--
You received this message because you are subscribed to the Google
Groups Android 

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

2010-04-26 Thread Henrik Sandström
I think the phones will arrive soon... as in blizzard soon:
http://www.wowwiki.com/Soon

http://www.wowwiki.com/SoonVerizon has given up on the Nexus one now. The
phone is old even before we get it.

http://www.wowwiki.com/Soon

On Mon, Apr 26, 2010 at 8:15 PM, Joël Bourquard joel.bourqu...@gmail.comwrote:

 Here's my scientific estimate:

 Time scale:

   (Now)(*1)-(*2)--
 --(*3)--(*4)|

 *1 == Google Market Seeding phones get delivered to Europe
 *2 == Early leak of beta Hero firmware 2.1
 *3 == Duke Nukem Forever gets released
 *4 == End of Time

 Remember - that's not the only thing we're waiting for ;-)

 Did this help improve our troops' morale ?


 On Apr 26, 12:33 pm, Kubecz3k kubec...@gmail.com wrote:
  Interesting, but I guess the reason is not important right now.
  For now, the point is - when shipping will start for real.
 
  On Apr 26, 12:25 pm, Lim Sim lim@gmail.com wrote:
 
 
 
   Ah.  I see.
 
   Maybe we're not getting our phones cause Vodafone has got it.
 
  http://www.engadget.com/2010/04/26/nexus-one-launches-on-vodafone-uk-.
 ..
 
   
 http://www.engadget.com/2010/04/26/nexus-one-launches-on-vodafone-uk-...
 
   On 26 April 2010 06:19, String sterling.ud...@googlemail.com wrote:
 
On Apr 25, 10:58 pm, Lim Sim lim@gmail.com wrote:
 
 Cool!  I've been seeing Radar Now around.  Going to download it and
 give
it
 a spin.  Looks cool.  Should have got it when we had the volcanic
 ash
last
 week.
 
I'm making a guess from these 2 statements, but... Be aware that
 Radar
Now! is US-only.
 
 On 25 April 2010 22:51, Maps.Huge.Info (Maps API Guru) 
 cor...@gmail.com
wrote:
 
 Radar Now! - 250,000+ downloads, 4.32 average rating, #13 in News
 
 Weather
 
John, just FYI, posting a ranking like this is pretty well
meaningless. The order of apps in the Market varies by country,
handset, carrier, and probably some other factors that Google has
never made clear. For example, I have an app which is #8 in Reference
here in the UK on my G1, but shows up as #5 on a Droid in the USA.
 
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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en
 
   --
   Lim Sim
   t: +44 790 4181648
   f:http://www.flickr.com/photos/limsim
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group athttp://
 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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group athttp://
 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.comandroid-developers%2bunsubscr...@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] MediaPlayer skips even though PARTIAL_WAKE_LOCK is set

2010-04-25 Thread henrik
Hi.

I have a problem with MediaPlayer on my HTC Hero.  When I set it to
decrypt  play a local file in the background, it starts skipping
after a minute or two, even though I have aquired the
PARTIAL_WAKE_LOCK.  This only happens when the phone is running on
battery:  I'm unable to reproduce this with the USB cable plugged in.
In addition, this only happens when I leave the phone to play.  If I'm
using another app actively, the music never skips.

Does the CPU lower its frequency when running on battery?  The logs
look the same whether I'm playing on battery or not.  Also, if I

Best regards,
Henrik

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

2010-04-25 Thread henrik
On 25 apr, 12:08, henrik henrik.aron...@gmail.com wrote:
 I have a problem with MediaPlayer on my HTC Hero.  When I set it to
 decrypt  play a local file in the background, it starts skipping
 after a minute or two, even though I have aquired the
 PARTIAL_WAKE_LOCK.  This only happens when the phone is running on
 battery:  I'm unable to reproduce this with the USB cable plugged in.
 In addition, this only happens when I leave the phone to play.  If I'm
 using another app actively, the music never skips.

The weird thing is, the problem goes away if I use
SCREEN_DIM_WAKE_LOCK instead.  But I really don't want to drain my
users' batteries needlessly.

Henrik

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] MediaPlayer stops playing when streaming over 3G on the Nexus One

2010-04-23 Thread henrik
Hi.

I am maintaining a streaming music player, and I'm running into a
similar problem as  
http://www.last.fm/group/Last.fm+Android/forum/114391/_/593575

My player stop after roughly 1-2 minutes, and there are no log
messages except for I/AudioHardwareQSD( 52): AudioHardware pcm
playback is going to standby just after the playback stops.

This happens when I run it on the Nexus One over 3G.  It does not
happen over Wifi, and it does not happen on my HTC Hero with android
1.5 over 3G.

Do you guys have any hints on how to debug this? Is it e.g. possible
to monitor the memory available to the media player object?

All help is appreciated :)

Best regards,
Henrik

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: MediaPlayer stops playing when streaming over 3G on the Nexus One

2010-04-23 Thread henrik
On 23 apr, 10:02, henrik henrik.aron...@gmail.com wrote:
 My player stop after roughly 1-2 minutes, and there are no log
 messages except for I/AudioHardwareQSD( 52): AudioHardware pcm
 playback is going to standby just after the playback stops.

 This happens when I run it on the Nexus One over 3G.  It does not
 happen over Wifi, and it does not happen on my HTC Hero with android
 1.5 over 3G.

Another small thing:  It doesn't matter whether the Nexus One is
sleeping or not.  I happens even though I set the device and screen to
never sleep.

Henrik

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: MediaPlayer stops playing when streaming over 3G on the Nexus One

2010-04-23 Thread henrik
On 23 apr, 10:02, henrik henrik.aron...@gmail.com wrote:
 My player stop after roughly 1-2 minutes, and there are no log
 messages except for I/AudioHardwareQSD( 52): AudioHardware pcm
 playback is going to standby just after the playback stops.

 This happens when I run it on the Nexus One over 3G.  It does not
 happen over Wifi, and it does not happen on my HTC Hero with android
 1.5 over 3G.

Here's another thing.  When I'm on 3G on the Nexus One, I get a
SocketException when it starts buffering.  I guess I get a chunk of
the song, then it fails.  MediaPlayer also continuously call
onBufferingUpdate(), which doesn't happen on Wifi.

E/HttpServer( 1525): java.net.SocketException: The connection was
reset
E/HttpServer( 1525):at
org.apache.harmony.luni.platform.OSNetworkSystem.receiveStreamImpl(Native
Method)
E/HttpServer( 1525):at
org.apache.harmony.luni.platform.OSNetworkSystem.receiveStream(OSNetworkSystem.java:
478)
E/HttpServer( 1525):at
org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:
565)
E/HttpServer( 1525):at
org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:
87)
E/HttpServer( 1525):at
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:
103)
E/HttpServer( 1525):at
org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:
134)
E/HttpServer( 1525):at
org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:
174)
E/HttpServer( 1525):at
org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:
159)
E/HttpServer( 1525):at
java.io.BufferedInputStream.read(BufferedInputStream.java:341)
E/HttpServer( 1525):at
org.apache.http.entity.InputStreamEntity.writeTo(InputStreamEntity.java:
92)
E/HttpServer( 1525):at
org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:
97)
E/HttpServer( 1525):at
org.apache.http.impl.AbstractHttpServerConnection.sendResponseEntity(AbstractHttpServerConnection.java:
182)
E/HttpServer( 1525):at
org.apache.http.protocol.HttpService.handleRequest(HttpService.java:
209)
E/HttpServer( 1525):at my.player.http.HttpServer
$WorkerThread.run(HttpServer.java:93)

Best regards,
Henrik

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


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

2010-04-23 Thread Henrik Sandström
I am getting one for Throw a Panda.

I'm in Sweden and got a response from google almost 2 weeks ago saying that
the phone should arrive within 2 weeks.

I am starting to wounder what their problem is. They said that they had a
shipping problem 2 weeks ago that was resolved, which means that the phones
should have arrived by now. So one could blame this on ash, however, no one
seems to have gotten their phone outside the US. Someone in Asia the phones
are should have gotten their phone if ash was the problem.
 Or am I wrong?

On Fri, Apr 23, 2010 at 1:15 PM, fhucho fhu...@gmail.com wrote:

 Out of curiosity, what is the app you guys are getting Nexus / Droid
 for?

 On Apr 23, 11:05 am, Lim Sim lim@gmail.com wrote:
  haha. maybe they are upgrading the phones in transit?
 
  On Apr 23, 2010 10:00 AM, fhucho fhu...@gmail.com wrote:
 
  @Lim Sim
  LOL, they're not installing Froyo on it :) They said about a month ago
  that all the phones have been sent. If they wanted to install Froyo on
  it they would do it over the air.
 
  On Apr 23, 7:07 am, dgoemans dgoem...@gmail.com wrote:
 
   Dude,
   1. What do you mean your instru...
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group athttp://
 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.comandroid-developers%2bunsubscr...@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: MediaPlayer stops playing when streaming over 3G on the Nexus One

2010-04-23 Thread henrik

On 23 apr, 12:35, henrik henrik.aron...@gmail.com wrote:
 Here's another thing.  When I'm on 3G on the Nexus One, I get a
 SocketException when it starts buffering.  I guess I get a chunk of
 the song, then it fails.  MediaPlayer also continuously call
 onBufferingUpdate(), which doesn't happen on Wifi.

I switched to our secondary streaming server, and things started to
work again.  I have no idea why, because it's supposed to be
identical.

Henrik

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


[android-developers] extending soft-keyboard with language switching support?

2010-04-22 Thread Henrik
I just got my HTC Desire with Android 2.1, and the first problem I'm
running into a lot is when using the visual keyboard.  Being
multilingual and having friends who only speak one particular
language, there's no single 'correct' input language setting for the
word prediction feature, so I started looking into how much work it
might be to extend the keyboard with two rather basic, though
essential, features:

1)  Showing the current language selection, so that I don't have to
type stuff, getting it mis-corrected, then discover the language
setting must be wrong, go into the settings, select to change
language, select language, etc... until I get back, erase the old text
and start over. That gets old real quick..

2)  Being able to simple change whatever language is used for the word
prediction by just having a button on the keyboard doing that
directly, i.e. a button that just cycles through the 'relevant'
languages with the key label showing which is currently active.

Improving it even further, one might imagine:

3)  Having a per contact setting, noting the word-prediction language
that should be used when communicating with that user.

But searching through the docs, I'm slowly coming to the realization
that the input text language setting may not even be available to be
changed outside the system settings dialog, making this impossible to
implement - is that correct?

Regards,
Henrik Gram

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

2010-04-15 Thread henrik
Hi.

I need to build several slightly different apps from one code base,
where only the styling and some variables are different in each app.

Right now I use an awful Constants class where I comment in/out the
correct values for each app, in addition to  copying the correct
graphic resources to the res/drawable/ folder.

One way to make this less painful would be to refer to a Java static
Constants#appVariant from styles.xml and splash.xml, e.g like this
pseudo-entry:

 style name=Artwork
item name=android:background@drawable/
border_{Constants.appVariant}/item
 /style

Is this possible?

And I guess there are better ways of solving this.  All hints are
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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Embedding Android project/library in another

2009-02-25 Thread Henrik Gustafsson


On Feb 25, 2009, at 21:14 , Mark Murphy wrote:


 In this example, doSomething() is implemented in the base JAR. The
 resources are not defined in the base JAR, but rather in the APK  
 that is
 using the base JAR. Hence, the base JAR not only does not have R.java,
 but it cannot even rely upon resources having certain numerical  
 values.

Hmm, isn't it possible to embed resources somehow? android.jar does  
that; is that treated in a special way somehow?

Ron, I asked more or less the same question here:
http://stackoverflow.com/questions/573581/specifying-android-project-dependencies-in-eclipse
http://groups.google.com/group/android-developers/browse_thread/thread/041db4d29b1d80dd#
but so far with no replies. The posted examples there works apart from  
the resource issue if it helps you.

// Henrik


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

2009-02-22 Thread Henrik Gustafsson

Hi all!

This was originally posted as a StackOverflow question (  
http://stackoverflow.com/questions/549451 
  ), but following advice from #android I will also post the question  
here.

I have two Android projects, a 'library project' containing a custom  
layout, and an 'application project' containing an application which  
uses the layout.

Everything seems to build and execute fine, except that the visual  
layout editor throws a ClassNotFoundException (which I assume is a bug  
in the plug-in), but when I try to start to make use of the attributes  
I defined for the custom layout in the xml, the build fails. That is;  
this works:

 ?xml version=1.0 encoding=utf-8?
 se.fnord.android.layout.PredicateLayout
 xmlns:android=http://schemas.android.com/apk/res/android;
 android:layout_width=fill_parent
 android:layout_height=fill_parent
   TextView
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=asdfasdf
 /
 /se.fnord.android.layout.PredicateLayout

Whereas this does not:

 ?xml version=1.0 encoding=utf-8?
 se.fnord.android.layout.PredicateLayout
 xmlns:android=http://schemas.android.com/apk/res/android;
 xmlns:fnord=http://schemas.android.com/apk/res/se.fnord.android 

 android:layout_width=fill_parent
 android:layout_height=fill_parent
   TextView
 fnord:layout_horizontalSpacing=1px
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=asdfasdf
 /
 /se.fnord.android.layout.PredicateLayout

The build fails with a message from aapt:

 ERROR No resource identifier found for attribute  
'layout_horizontalSpacing' in package 'se.fnord.android'

The resource identifier does exist in the R-file and attrs.xml  
contained the library project, and if I put the layout code and  
resources directly in the application project everything works fine.  
The layout_horizontalSpacing attribute (and layout_verticalSpacing) is  
a custom attribute used in the PredicateLayout.LayoutParam class to  
specify the distance to the next widget.

So far I've tried the standard eclipse ways by specifying project  
references and build path project dependencies. I was also told to try  
the uses-library tag in the application manifest, which did not help.

So, what do I need to do for the references in the xml-file to work?

I don't know if it's relevant, but the 'library' manifest looks like  
this:

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/ 
android
   package=se.fnord.android
   android:versionCode=1 android:versionName=1.0.0
 /manifest

The 'application' manifest like this:

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/ 
android
   package=se.fnord.appname
   android:versionCode=1 android:versionName=1.0.0
 application android:icon=@drawable/icon  
android:label=@string/app_name
 activity android:name=.AppName
   android:label=@string/app_name
 intent-filter
 action  
android:name=android.intent.action.MAIN /
 category  
android:name=android.intent.category.LAUNCHER /
 /intent-filter
 /activity
 /application
 /manifest

'se.fnord.android.layout.PredicateLayout', btw, is a cleaned-up  
version of the layout posted at http://stackoverflow.com/questions/549451 
  .

Thanks!

// Henrik


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