[android-developers] android.support.v4.view.BetterViewPager

2016-12-26 Thread hans
I found the class BetterViewPager (under the support library) by 
coincidence when Android Studio prompts the class when I was about to use 
ViewPager in my XML. I'm looking for API documentation of the class, or 
perhaps other fellow developers can direct me to relevant resources that 
explain improvements of BetterViewPager over ViewPager. 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 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/9d61b983-6e91-4b76-919b-cfb3ebfddf01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Reward player with Google Play Credit

2016-09-20 Thread Hans Jacobs
Hi,

I'm developing a game where it's a kind of a contest.
I want to give the winner a part of the in-app purchases for that period.
Is there some sort of way to reward Google Play Credit, like the Google 
Opinion Rewards app?

Thanks in advance!

-- 
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/59032b4c-edaa-410e-9e1f-a0fb3c02b9ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to remove class file editor in the debug perspective in eclipse indigo

2013-04-16 Thread karan hans
Hi, 
Could you please have a look at
http://stackoverflow.com/questions/16033382/how-to-remove-class-file-editor-in-the-debug-perspective-in-eclipse-indigo

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Polytonic (Ancient) Greek / System Fonts / Diacritics

2013-01-07 Thread Hans A. Hack
Hello,

I hope that this is the correct place to ask for help, respectively i am 
asking for ideas regarding the developement of an app to solve following 
severe problem:

The standard system font of Android does not support Polytonic Greek / 
Diacritics. As far as i understand the problem this is related to the lack 
of UTF-8 support of Android font. 

Since diacritics are of crucial importance to everyone concerned with 
ancient greek, *Android *devices are de facto *useless *for those.
Obviously there are apps that alleviate the change of system fonts; 
unfortunately not compatible to some devices.

Now, how should one approach that problem?

More information on that 
Problemhttp://code.google.com/p/android/issues/detail?id=26037 (Google 
Code)

I would like to emphasise that i am really suprised by the fact, that 
Android is not able to cope with ancient greek :-)
There definitely is need for action!

Let me assure: This problem is not only near my heart, but everyone's 
dealing with Classics.

Thank you very much 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: Localized Images in Google Play

2012-11-02 Thread Hans Maulwurf
Hmm, if noone knows whether this is possible I'll have to assume that it 
isn't posible at all...

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

2012-10-22 Thread Hans Maulwurf
Is it possible to have localized images for an App in Google Play?
I need to have a different Icon for Japan and this should be reflected by 
the icons displayed in Google Play.

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

2012-10-17 Thread Wayne Hans
I apologize in advance if this has been asked before, but I absolutely 
cannot find a solution.  I have a simple Android app (using HTML/Javascript 
and phonegap) which offers an email option that sends data from the app via 
mailto (with parameters) and window.open.  This worked fine until my users 
started updating to 4.0.  

var mailto_link = 'mailto:?subject=' + subject + 'body=' + body_message;
win = window.open(mailto_link, 'emailWindow');

Now that Android no longer supports this, I need to use webintents to send 
the email.  The current code using Phonegap 1.1.0 and webintents does not 
work for me.  I have tried several different versions of phonegap/cordova 
including cordova 2.1.0.  I have followed examples by Boris Smus... 

var extras = {};
  extras[WebIntent.EXTRA_SUBJECT] = subject;
  extras[WebIntent.EXTRA_TEXT] = body_message;
  extras[WebIntent.EXTRA_EMAIL] = 'some...@comcast.net';
  window.plugins.webintent.startActivity({
  action: WebIntent.ACTION_SEND,
  type: 'text/plain',
  extras: extras
},
function() {},
function() {
  alert('Failed to send email via Android Intent');
}
  );

 The new code keeps throwing the error Failed to send email via Android 
Intent.  I have made sure my files are importing webintent.js as well as 
phonegap/cordova.js

I need to get this working, so my question is - How can I get the details 
on what is actually causing the error?
Also, I feel that my AndroidManifest.xml may be causing the issue so here 
is a portion of my file where my intent filters are defined...

application android:icon=@drawable/icon 
android:label=@string/app_name 
activity android:name=com.android.SCAT2.SCAT2
  android:label=@string/app_name
  android:configChanges=orientation|keyboardHidden 
intent-filter
action android:name=android.intent.action.MAIN /   
 
category android:name=android.intent.category.LAUNCHER /
/intent-filter
intent-filter
action android:name=android.intent.action.SEND /
category android:name=android.intent.category.DEFAULT /
data android:mimeType=text/plain /
/intent-filter
/activity
/application

Any help is greatly appreciated and if I need to provide any additional 
details, please let me know.  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] camera doesnt work

2012-06-24 Thread karan hans
hi,
 
when i try to open the camera in the emulator( api level 4,7,8,15). it 
worked once when i started working with eclipse. actually iam using a face 
detection app for which the camera is necessary
 
please help
regards
Karan

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

2012-06-24 Thread karan hans
actually iam working on windows 7 based system. i dont have an android 
device. so like if and when i start the avd and click on the camera button 
it just gives me a chequered background of black and white with a white 
square bouncing off the walls.
 
sometimes wheni start the emulator the camera on top of my laptop 
screen/lid blinks with a blue light.however sometimes it doesnt. but in any 
case the camera view doesnt open up in emulator. i wonder what the problem 
could be.
On Sunday, June 24, 2012 3:35:27 PM UTC+5:30, karan hans wrote:

 hi,
  
 when i try to open the camera in the emulator( api level 4,7,8,15). it 
 worked once when i started working with eclipse. actually iam using a face 
 detection app for which the camera is necessary
  
 please help
 regards
 Karan


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

2012-06-24 Thread karan hans
otherwise the camera works fine with skype
On Sunday, June 24, 2012 4:28:33 PM UTC+5:30, karan hans wrote:

 actually iam working on windows 7 based system. i dont have an android 
 device. so like if and when i start the avd and click on the camera button 
 it just gives me a chequered background of black and white with a white 
 square bouncing off the walls.
  
 sometimes wheni start the emulator the camera on top of my laptop 
 screen/lid blinks with a blue light.however sometimes it doesnt. but in any 
 case the camera view doesnt open up in emulator. i wonder what the problem 
 could be.
 On Sunday, June 24, 2012 3:35:27 PM UTC+5:30, karan hans wrote:

 hi,
  
 when i try to open the camera in the emulator( api level 4,7,8,15). it 
 worked once when i started working with eclipse. actually iam using a face 
 detection app for which the camera is necessary
  
 please help
 regards
 Karan



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

2012-05-30 Thread Hans Paul
I am attempting to connect to a serial device from a Android tablet, via 
USB-Serial Converter. In order to interface with this particular serial 
device, a linux library must be used as an interface.
This library takes an integer as an argument, and tries to connect to the 
device at the following location : /dev/ttySx, where x is the arguement. If 
2 is provided to the library, it will look for the device at /dev/ttyS2. 
Very simple.

When I connect the device to Ubuntu, there's is one simple extra step for 
this device to work with the USB-Serial convert. The converter is exposed 
at the location /dev/ttyUSB1. I just need to create a simple soft-link with 
the serial port pattern (etc ln -s /dev/ttyUSV1 /dev/ttyS99). It works 
perfectly.

Now the problem arises for Android. The converter is seen at 
/dev/bus/usb/01/01. I never seen this convention in other project. The 
question is how can I direct the I/O from /dev/ttySX to /dev/bus/usb/01/01




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

2012-05-03 Thread Hans
Thank you.
I try onTouch() and se if it helps me.
 
/Hans

Den onsdagen den 2:e maj 2012 kl. 21:10:50 UTC+2 skrev JTeagle:

 I want to disable swype to next page in a ViewPager when som itemes are 
 uncecked on current page. when all items are checked i want to enable 
 swyping. But still it shold be posible to swype to previus. 

 Nothing in ViewPager or its adapter particularly looks useful. 

 A rather inelegant solution might be to handle onPageSelected(), and then 
 put the previous page (you'd have to track it manually) back - but I doubt 
 that would look very good. 

 A possible alternative, though little better, might be to handle onTouch() 
 and at the times when they are not allowed to swipe, do nothing and return 
 true to 'eat' the event and prevent the system from acting on it - but 
 that 
 would stop *any* touch event on the pager (unless you could isolate the 
 correct action, but that didn't seem to have anything useful either). 




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

2012-05-02 Thread Hans
I want to disable swype to next page in a ViewPager when som itemes are 
uncecked on current page. when all items are checked i want to enable 
swyping. But still it shold be posible to swype to previus.
 
How am i doning 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] samuel could we get facepreview20120218.zip

2012-04-26 Thread karan hans
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] eclipse can't connect the debugger

2012-04-03 Thread karan hans
hi,
iam a newbie so please help me out.
 
I'am running the eclipse in debuggable mode. i have entered the debuggable 
mode in AndroidManifest.xml as true.
 
However eclipse hangs while running in debuggable mode.
 
i get the following message in the console window.
 

[2012-04-03 15:10:43 - Droid1] --

[2012-04-03 15:10:43 - Droid1] Android Launch!

[2012-04-03 15:10:43 - Droid1] adb is running normally.

[2012-04-03 15:10:43 - Droid1] Performing 
com.androidbook.droid1.Droid1Activity activity launch

[2012-04-03 15:10:43 - Droid1] Automatic Target Mode: Preferred AVD 'AVD' 
is not available. Launching new emulator.

[2012-04-03 15:10:43 - Droid1] Launching a new emulator with Virtual Device 
'AVD'

[2012-04-03 15:10:50 - Emulator] emulator: WARNING: Unable to create 
sensors port: Unknown error

[2012-04-03 15:10:50 - Droid1] New emulator found: emulator-5554

[2012-04-03 15:10:50 - Droid1] Waiting for HOME ('android.process.acore') 
to be launched...

[2012-04-03 15:11:50 - Droid1] HOME is up on device 'emulator-5554'

[2012-04-03 15:11:50 - Droid1] Uploading Droid1.apk onto device 
'emulator-5554'

[2012-04-03 15:11:53 - Droid1] Installing Droid1.apk...

[2012-04-03 15:12:44 - Droid1] Success!

[2012-04-03 15:12:44 - Droid1] Starting activity 
com.androidbook.droid1.Droid1Activity on device emulator-5554

[2012-04-03 15:12:46 - Droid1] ActivityManager: Starting: Intent { 
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
cmp=com.androidbook.droid1/.Droid1Activity }

[2012-04-03 15:12:47 - Droid1] Attempting to connect debugger to 
'com.androidbook.droid1' on port 8631

 

 

As you can see eclipse hangs and is unable to connect the debugger

What could be wrong?

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

[android-developers] how to use older adb to install .apk

2012-03-19 Thread karan hans
hi ,
iam trying to use facepreview-20120218.apk to run on the android emulator. 
ive had some success uninstalling and installing the app. however the 
installed app uses the 4.0.3 version of api while i need 2.2.how should i 
work it out.i couldnt get anything on google. i used the following cmd
C:\Program Files (x86)\Android\android-sdk\platform-toolsadb install -r  
facepr
eview-20120218.apk
110 KB/s (3814528 bytes in 33.829s)
pkg: /data/local/tmp/facepreview-20120218.apk
Success
 
however the api it uses is 4.0.3
 
because of which the app doesnt run
 
i request your helpplease be patient with me
 

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

Re: [android-developers] how to use older adb to install .apk

2012-03-19 Thread karan hans
infact the app runs on 2.2  he has already said that you should use 2.2
On Monday, March 19, 2012 3:43:20 PM UTC+5:30, Mark Murphy (a Commons Guy) 
wrote:

 Ask the developer of the APK to add support for Android 2.2.

 On Mon, Mar 19, 2012 at 6:03 AM, karan hans karanh...@gmail.com wrote:
  hi ,
  iam trying to use facepreview-20120218.apk to run on the android 
 emulator.
  ive had some success uninstalling and installing the app. however the
  installed app uses the 4.0.3 version of api while i need 2.2.how should i
  work it out.i couldnt get anything on google. i used the following cmd
  C:\Program Files (x86)\Android\android-sdk\platform-toolsadb install -r
  facepr
  eview-20120218.apk
  110 KB/s (3814528 bytes in 33.829s)
  pkg: /data/local/tmp/facepreview-20120218.apk
  Success
 
  however the api it uses is 4.0.3
 
  because of which the app doesnt run
 
  i request your helpplease be patient with me
 
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, 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/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5
 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

Re: [android-developers] facepreview20120218.apk does not install with adb

2012-03-18 Thread karan hans
i tried with the -r switch. i got this
 
C:\Program Files (x86)\Android\android-sdk\platform-toolsadb install -r  
facep
eview-20120218.apk
102 KB/s (3814528 bytes in 36.336s)
pkg: /data/local/tmp/facepreview-20120218.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
On Saturday, March 17, 2012 9:23:24 PM UTC+5:30, Kostya Vasilyev wrote:

 adb install -r filename
  17.03.2012 19:50 пользователь Ralph Bergmann | the4thFloor.eu 
 ra...@the4thfloor.eu написал:

 Am 17.03.12 16:41, schrieb karan hans:
  Failure [INSTALL_FAILED_ALREADY_EXISTS]
  ^^


 Ralph

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

2012-03-17 Thread karan hans
C:\Program Files (x86)\Android\android-sdk\platform-toolsadb install 
faceprevie
w-20120218.apk
75 KB/s (3814528 bytes in 49.143s)
pkg: /data/local/tmp/facepreview-20120218.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
 the author of this app was able to run it on his comp. his eaact words 
were that android is quite buggy so youll have to ask android developers.
and one more thing this app works on android8 and not android 15 so will i 
have to get a new adb
 
iam quite confused. iam a greenhorn so please help me out

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

[android-developers] Re: facepreview20120218.apk does not install with adb

2012-03-17 Thread karan hans
also i dont have an android device and am trying to run the application on 
emulator
On Saturday, March 17, 2012 9:11:56 PM UTC+5:30, karan hans wrote:

 C:\Program Files (x86)\Android\android-sdk\platform-toolsadb install 
 faceprevie
 w-20120218.apk
 75 KB/s (3814528 bytes in 49.143s)
 pkg: /data/local/tmp/facepreview-20120218.apk
 Failure [INSTALL_FAILED_ALREADY_EXISTS]
  the author of this app was able to run it on his comp. his eaact words 
 were that android is quite buggy so youll have to ask android developers.
 and one more thing this app works on android8 and not android 15 so will i 
 have to get a new adb
  
 iam quite confused. iam a greenhorn so please help me out


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

[android-developers] Re: facepreview20120218.apk does not install with adb

2012-03-17 Thread karan hans
in case youre wondering what this error msg is then look at the log when i 
first ran it
 
 
 
C:\Program Files (x86)\Android\android-sdk\platform-toolsadb install 
faceprevie
w-20120218.apk
104 KB/s (11286 bytes in 0.105s)
pkg: /data/local/tmp/facepreview-20120218.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
what is this signed unsigned business

On Saturday, March 17, 2012 9:11:56 PM UTC+5:30, karan hans wrote:

 C:\Program Files (x86)\Android\android-sdk\platform-toolsadb install 
 faceprevie
 w-20120218.apk
 75 KB/s (3814528 bytes in 49.143s)
 pkg: /data/local/tmp/facepreview-20120218.apk
 Failure [INSTALL_FAILED_ALREADY_EXISTS]
  the author of this app was able to run it on his comp. his eaact words 
 were that android is quite buggy so youll have to ask android developers.
 and one more thing this app works on android8 and not android 15 so will i 
 have to get a new adb
  
 iam quite confused. iam a greenhorn so please help me out


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

[android-developers] sample android app doesnt run in eclipse

2012-01-08 Thread karan hans
I'am trying to run a sample app snake the log is as follows

[2012-01-08 21:18:08 - Snake] --
[2012-01-08 21:18:08 - Snake] Android Launch!
[2012-01-08 21:18:08 - Snake] adb is running normally.
[2012-01-08 21:18:08 - Snake] Performing
com.example.android.snake.Snake activity launch
[2012-01-08 21:18:08 - Snake] Failed to find an AVD compatible with
target 'Android 4.0.3'.
[2012-01-08 21:18:14 - Snake] Performing
com.example.android.snake.Snake activity launch
[2012-01-08 21:18:22 - Snake] Launch canceled

it says No compatible targets found. Do you wish to add new Android
virtual device

please note that i have installed
Jdk
android sdk
Adt plusin for eclipse
and eclipse itself

Qs why cant it select the AVD automatically


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

2012-01-08 Thread karan hans
wheb i run helloworld app this is what  i get
[2012-01-08 17:06:11 - HelloWorld] --
[2012-01-08 17:06:11 - HelloWorld] Android Launch!
[2012-01-08 17:06:11 - HelloWorld] adb is running normally.
[2012-01-08 17:06:11 - HelloWorld] Performing
com.example.android.rs.helloworld.HelloWorld activity launch
[2012-01-08 17:06:11 - HelloWorld] Failed to find an AVD compatible
with target 'Android 4.0.3'.
[2012-01-08 17:06:43 - HelloWorld] Performing
com.example.android.rs.helloworld.HelloWorld activity launch
[2012-01-08 17:08:15 - HelloWorld] Launch canceled!
 please help newbie here

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


[android-developers] Start an intent from google calender, or third part calender

2011-10-27 Thread Hans
First excuse me for my bad English.

I want to start an intent from google calendar to open my own program,
if its possible. Becuse my users use that calender and i want somthing
like a button they press, or some kind of widget. So when they press
that they com into my program.

I dont know if its works with the new api, or if i only can read the
calender from my program, then i have to write my own calender on topp
of the google api for calenders.

But it should be easer if i just can use a calender withot to make a
new.

Or do somone knews a third part calender that you can custimize to
lunch your own intent.

Or is it possible on som other way.

thanks for reply

/Hans

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

2011-08-31 Thread hans
Hi.
I know some TCP Ports are already registered.(i.e. 8080)
I need to develope a application using static port not variable port.
What port of number would be appropriate ?
Is there a rule in order to use port?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Clarification on orientation angles (azimuth, pitch, roll)?

2011-07-14 Thread Hans Müller
Hi,

I think need some clarification on these orientation angles. Say my
android phone is lying flat on the table, with the top pointing
exactly to magnetic north, which, as far as I have understood,
corresponds to 0 degrees azimuth (clockwise rotation round Z axis
pointing out of the screen), 0 degrees roll (rotation around Y axis
pointing out of the top of the device) and 0 degrees pitch
(counterclockwise rotation around X axis pointing out of the left side
of the device).

Now I want to change its orientation, so that it, after I have turned
it, its orientation corresponds to A degrees azimuth, R degrees roll
and P degrees of pitch. In /which order/ do I have to turn?

 I tried the order azimuth, pitch, roll and got some crazy results.

I also saw there is another coordinate system with the z and x axis
inversed (at 
http://developer.android.com/reference/android/hardware/SensorManager.html
at getOrientation). Do I have to use this one?

Please don't point me to the getRotationMatrix-methods, as I want to
really understand what's going on (which I think is a little obscured
here). In which order are the rotations performed to get this matrix?

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: Is it impossible to move and merge text on an image

2011-05-06 Thread Hans-Erik
hello TreKing.
Actually i need help on all of it.
I was posting on :
http://stackoverflow.com/questions/5900463/android-how-to-merge-and-move-text-around-on-image,

and got an answer and will try that now.
If you have any thoughts about that answer please advice

On 6 Maj, 02:42, TreKing treking...@gmail.com wrote:
 On Thu, May 5, 2011 at 1:09 PM, Hans-Erik erikswed...@gmail.com wrote:
  Help is needed!

 With which part?

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

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


[android-developers] Re: Is it impossible to move and merge text on an image

2011-05-06 Thread Hans-Erik
i have not startet doing this so any ide is helpfull
was thinking i could write text on the bitmap
and then track x/y when using finger to move the text to new x/y
you have better ide?

On 6 Maj, 02:42, TreKing treking...@gmail.com wrote:
 On Thu, May 5, 2011 at 1:09 PM, Hans-Erik erikswed...@gmail.com wrote:
  Help is needed!

 With which part?

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

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


[android-developers] Re: Is it impossible to move and merge text on an image

2011-05-06 Thread Hans-Erik
I forgot to say i need to save the image with the added text, like
merge into a new image.
I guess that complicates things.

Im investigating and can see that the Canvas class has the drawText
method.
drawText will write the text solid on the image.
So i guess using Canvas is the way to go.

@Miguel Morales thanks and sorry i forgot to say the text and image
must be merged together and two ImageView cannot do that i think.

@ThreKing Thanks for taking your time. Since I dont know back from
front in this project i cannot ask for specific if i don't know if the
Egg came before the chicken or wise verse.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 it impossible to move and merge text on an image

2011-05-06 Thread Hans-Erik
 Well, simply do the saving when the user is finished moving the text or
 using the feature compose the image.
 The bitmap canvas supports basic things like drawing text.
 This doesn't complicate things.

yea you right i think, after playing around with this sample for 30
min
http://www.anddev.org/viewtopic.php?p=11603

Can replace one of the balls with text.
The question is how to input the text.
once the text is Inputed it can be moved but howto let user input
it.
Maybe longpress,, something

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 it impossible to move and merge text on an image

2011-05-05 Thread Hans-Erik
hi all.

This seem really hard to do since i cannot find any information about
it

- Open a jpg in full screen.
- Type text on the jpg.
- able to move that text where i want it positioned on the jpg.
- moving of text must be done with a finger (not in code).

Help is needed!

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


[android-developers] How do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik
hi
In the gallery I have added my Item to the share menu. But i can only
get one image and making my Activity start. This code give me the URL
for one image. Is it possible to set up the Gallery or the share menu
so that user can select one or many pictures?

if (Intent.ACTION_SEND.equals(action))
{ if extras.containsKey(Intent.EXTRA_STREAM))
{ Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM); 
//path
to image
Toast toast = Toast.makeText(this, path: +
getRealPathFromURI(uri),
Toast.LENGTH_SHORT); toast.show();
return;
} else if
(extras.containsKey(Intent.EXTRA_TEXT)) {
}

} public String getRealPathFromURI(Uri contentUri) { String[] proj =
{
MediaStore.Images.Media.DATA }; Cursor cursor =
managedQuery(contentUri,
proj, null, null, null); int column_index =
cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst(); return cursor.getString(column_index);
}

intent-filter
action android:name=android.intent.action.SEND /
category 
android:name=android.intent.category.DEFAULT /

data android:mimeType=image/* /
/intent-filter

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik
hi
In the gallery I have added my Item to the share menu. But i can only
get one image and making my Activity start. This code give me the URL
for one image. Is it possible to set up the Gallery or the share menu
so that user can select one or many pictures?

if (Intent.ACTION_SEND.equals(action))
   { if extras.containsKey(Intent.EXTRA_STREAM))
   { Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM);
  Toast toast = Toast.makeText(this, path:
+getRealPathFromURI(uri),
  Toast.LENGTH_SHORT); toast.show();
  return;
   } else if
   (extras.containsKey(Intent.EXTRA_TEXT)) {
   }

 }

public String getRealPathFromURI(Uri contentUri) { String[] proj =
{
   MediaStore.Images.Media.DATA };
   Cursor cursor = managedQuery(contentUri,proj, null, null, null);
   int column_index =
cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
   cursor.moveToFirst();
   return cursor.getString(column_index);
}

   intent-filter
 action android:name=android.intent.action.SEND /
 category android:name=android.intent.category.DEFAULT /
 data android:mimeType=image/* /
   /intent-filter

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik

On 22 Dec, 20:17, Mark Murphy mmur...@commonsware.com wrote:
 ACTION_SEND only supports sending one item.

Thanks for your reply
Do you know any other way to do this?
My Activity is dormant and awaken by the user selecting images.
There has to be another way to do this right?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik

On 22 Dec, 20:48, bruce palant...@gmail.com wrote:
 What you want is ACTION_SEND_MULTIPLE.  You will receive a set of
 Uris.

Thanks Bruce!
Coming from Java, Any book you can recommend learning android
infrastructure?

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

2010-12-18 Thread Hans-Erik

That's quite interesting thanks TreKing.
That is one approach but dont think it will work for me.

On scenario is if 200 phones connect to my server wanting to send one
jpg to another phone.
200 messages would go out trough google notifying all phones there is
jpg package for them.
Google has Limitations in that C2DM about Google limits the number of
messages a sender sends in aggregate. Also possible lagging.

My initial naive thought was that all those 200 phones could have an
app installed that make a connection to me PC server and keep that
connection alive.

I'm searching for a best way to do do this. What would you do?

- Services are bad design and a user might think his battery get
drained
- Activity with AsyncTask is beautiful if android not killing the app
Hmmm (not sure there).
  One AsyncTask constantely listening for incoming and another
AsyncTask gets created when
  user send jpg. Can an AsyncTask live that long, Is it possible to
protect the AsyncTask
  from onCreate updates, orientationchanges?


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

2010-12-18 Thread Hans-Erik

 I guess if you have a significantly large user base, but I'm assuming that's
 not the case, or is it?

Im planing ahead, trying to learn what it takes to make and app like
that

 Is some lagging or some delay in the delivery of these messages
 completely unacceptable?

yes im playing with the ide since mail or sms is no instant

 What is so urgent about these messages that they *must* be received
 instantaneously?

That is a powerful features for a mobile app

 Perhaps give the user a poll interval or an option for manually refreshing
 the data, if it makes sense for your app.

no, that way the phone is never ready to receive .

 I would rethink what you're trying to accomplish and try to work within the
 restrictions imposed by mobile devices.

your right ofcorce, im new to android but not to Java so the
transition is
a bit painful

 You can certainly keep your AsyncTask alive between orientation changes -
 but only as long as the user keeps your app in focus as the current
 Activity. Once you get put in the background you're subject to being killed.

AsyncTask out the door, Services welcome in.

 There's really no such thing as keeping a connection alive. Your process
 can and will be killed at some point, if not by the system then explicitly
 by the user.

In my Desire phone i see both fring and Google mssagin always running
Read some about a service being Sticky

I read elsewhere that a service can be started with a Brodcastcmmand
http://stackoverflow.com/questions/4468006/can-i-start-a-service-without-activity-or-receiver

cant wrap my head around the code implementation here.
after reading many questions here and elsewhere about this.
I think the method is:
- an apk file which contains a Service an activity and a
BroadcastReceiver Class.
- action.BOOT_COMPLETED will start only my Service, not the Activity.
  The user can from Main Launcher start Activity for in app settings
and I Bind
  to Service and Unbind when done

Yea will try this tomorrow after work.

I look at your TreKing app. Im impressed nice work
That app would really been helpful this morning
when i was waiting for the buss in the snowstorm.
Can I ask how did you tap into CTA bus tracker system
GPS signal for all there Busses location?




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

2010-12-16 Thread Hans-Erik
after reading the article
http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/

I want to ask about creating an Android app that need to run always!
The app is an ftp server listening for my PC client to send pictures.
The sending can occur anytime so the Android server MUST run

Here's the question:

From the article above a read
Service can be killed by the user and the android system.
The can fall asleep when the device falls asleep.

What about Activity´s,  can i do this simply trough an Activity?
If my activity create a thread for the server to run in.
When a client connect, the thread will receive the picture(s)
and notify Activity and then thread continue Listen.

What are the considerations here?


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


[android-developers] Re: Process and application lifecycles

2010-03-16 Thread hans
The first paragraph of
http://developer.android.com/guide/topics/fundamentals.html#procthread
indicates that anytime the FIRST component (activity, contentprovider,
service, bcastrcvr) needs to run, a new Linux process is created for
the app. If the process is killed, then the components have no place
to run, so in my opinion it is not possible to retain the app when its
underlying process has been killed.

However, the next paragraph of the above document indicates that
components of an app can be setup to run on more than one processes.
So, theoretically it is possible to arrange an app with M+N components
to run on two processes P and Q where P runs M components and Q runs
the remaining N components. If P is killed, then the M components will
get wiped out, but the other N components still run on the second
process Q... nevertheless a process is needed to run these remaining N
components.

My two cents I may be wrong and let's hear from the rest of the
group.

On Mar 15, 7:39 am, Fuzzyboy run...@gmail.com wrote:
 Being interested in Android development and still in the
 experimentation phase - there's something I haven't been able to
 grasp.

 As far as I've been able to understand, the process lifecycle and
 applikation lifecycles are seperate and as such, it would be possible
 for the application to still to exist, even if it's process has been
 killed.

 So I guess my question would be, in what scenario could this occur and
 how is the application accessible if the containing process has been
 killed?

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

2010-03-01 Thread Hans-Werner Hilse
Hi,

I would suggest discussing this matter further in the relevant mailing list
here:
http://groups.google.com/group/droidreader-developer-list

Please re-post there, here's just a short hint: Try rectifiing the jpeg/
subdirectory by unpacking a fresh, *new* version of libjpeg, i.e.
jpegsr8.zip. There just is no jinit_phuff_decoder in current code of
libjpeg, and it's not referenced in the master_selection function anymore (I
didn't check how long it's not in use anymore). I think the file layout of
libjpeg was once different and since I do a manual list of files to be
compiled in Android.mk, it would break for different layouts.

Hope I could help, and am happy my code is being used :-)

-hwh

2010/2/26 lalithalaxmi g lalitha@gmail.com

 hi all,

 I am using droid pdf reader in ndk. I am unable to generate libpdfreader.so
 file.
 while compiling i am getting following errors.


 out/apps/droidreader-read-only//libmupdf.a(jdmaster.o): In function
 `master_selection':
 apps/droidreader-read-only/jni/jpeg/jdmaster.c:380: undefined reference to
 `jinit_phuff_decoder'
 out/apps/droidreader-read-only//libmupdf.a(jddctmgr.o): In function
 start_pass':
 apps/droidreader-read-only/jni/jpeg/jddctmgr.c:117: undefined reference to
 `jpeg_idct_4x4'
 apps/droidreader-read-only/jni/jpeg/jddctmgr.c:117: undefined reference to
 `jpeg_idct_2x2'
 apps/droidreader-read-only/jni/jpeg/jddctmgr.c:117: undefined reference to
 `jpeg_idct_1x1'
 collect2: ld returned 1 exit status

 pls any one can help me to rectify those errors.


 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.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: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml

2009-10-30 Thread Hans

Adding sdkman.force.http=true to ~/.android/androidtool.cfg allowed me
to retrieve the Sites, Packages, and Archives via the Android SDK and
AVD Manager.

However, when I select, for example, SDK Platform Android 2.0, API 5,
revision 1, and click Install Selected (button), nothing happens.

I am running on Ubuntu version 9.10 x64 (released version).  The
machine has 4GB RAM.  JDK 6-15-1, via the Synaptic Package Manager, is
installed (along with the dependencies).

On Oct 29, 1:24 pm, Xavier Ducrohet x...@android.com wrote:
 On Wed, Oct 28, 2009 at 9:23 PM, orange80 jpsw...@gmail.com wrote:

  We already know about that... our problem is that the force http
  workaround DOES NOT work for us either.

 which, frankly, is mind boggling.
 Can you give me the exact output of the status window in the SDK
 Manager when you try to update from the repository?

 Also, can you tell me which JDK you are using, OS config, etc..

 thanks!
 Xav

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.

 Please do not send me questions directly. 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: Extracting files from APK

2009-08-05 Thread Hans A

That did the trick.  Thanks a lot.

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

2009-08-04 Thread Hans A

Hi

I'd like to extract classes.dex from an APK file.  I've tried using
aapt, but I can't see an option for extracting the files.  When I run
the aapt tool without options it prints out the list, dump, package,
remove, add and version commands, but it doesn't seem to me like any
of them extracts files.  Could someone please tell me which options I
would have to use to do it?

Thanks
Hans



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: As application developers are we allowed to access system properties like ro.config.sync?

2009-04-21 Thread Hans
 your user's experience with your application at
any time by moving a setting you expected to be there to some other
UI.

  i don't really see what the security
 issue is with starting background services.

Really?  You consider an application that obtains permission from the
user to enable/disable phone settings such as auto-sync insecure, but
a service that once installed by the user may be forgotten about and
be running, years later, on their phone and they don't remember it at
all, and it can basically do anything the user first gave it
permission to do?

Again, it seems like your saying Danger! Danger!  You shouldn't be
able to do X when you also argue that doing Y, Z, and the rest, are
totally acceptable.  I don't understand how taking away the ability to
turn data roaming on/off from our own UIs and Activities makes the
phone any more secure unless you plan to make everything impossible
for applications to do without going through a Google Android
activity.

  I would also like to close any
 holes for applications to send data over the network without explicitly
 requesting it, but am not sure what or when we might do that.

That would certainly make things more secure, and I can think of cases
where you could apply that, but in general, you'd be ruining the
phone.  The most attractive thing about Android is that you expect it
to be flexible.  BSD is a relatively secure computing environment and
they don't restrict developers from changing settings.  Seriously, you
need to leave most of these things open to users to decide, ignoring
the well established premise that users do crazy and dangerous things.

 Our goal should very much be to close holes as we find them, which you
 already see happening in Cupcake, not just give up and let applications do
 whatever they want.

The problem is that you (and others) see holes where I (and others) do
not.  I certainly don't consider it a hole for applications, who use
the settings write permission, to change settings.  The problem is
exacerbated by the fact that Vendors do not want to be tied to their
system image updates as a deployment mechanism for new and/or updated
applications.

 Where is this mysterious group who decides what's dangerous and what

  isn't, when it's all technically dangerous to begin with...?

 If you are coming at the position that security isn't useful because
 everything an application can do is dangerous, then I'm not sure what kind
 of useful discussion we can have. :}

I don't have a problem with fixing things that need fixing, I'm just
having a very hard time understanding how there are these terrifically
dangerous areas such as the SDCARD that you seem to think are fine (as
evidenced by your posts, barring a new permission set) but it's a
security hole to allow users to allow applications to manage their
phone settings.

 Anyway, the security engineers, core
 technical team, and engineers responsible for their area of the system makes
 these kinds of decisions.

Is there a forum (in the classical sense) where requests and
suggestions can be directed explicitly to this group?

 Thanks,

  Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] In case anyone wants to launch sync settings activity...

2009-04-21 Thread Hans

You need to specify the target package/class for the intent as it
doesn't appear to be registered for it explicitly (probably a reason
for that.)

Intent l_oIntent = new Intent();

l_oIntent.setAction( android.settings.SYNC_SETTINGS );
l_oIntent.setClassName( com.android.settings,
com.android.settings.SyncSettings );

startActivity( l_oIntent );
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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.provider.Sync - is this off limits?

2009-04-20 Thread Hans

I'm on the 1.1 r1 SDK and I don't see it in the documentation;
however, I can't find any other way to try and manage sync settings,
and I only found this by searching throught the Google source.

Presuming that this area is unprotected and liable to unnotified
deprecation, is there a 'safe' way to be able to turn auto-sync off
from code?  There's no system setting for it.

Thanks,

 Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] As application developers are we allowed to access system properties like ro.config.sync?

2009-04-20 Thread Hans

Google applications do it, and apparently it used to be part of the
public API (via android.os.SystemProperties.)

How are we supposed to enable/disable sync on the phone?

Disabling/enabling roaming is easy, but I'm beating my head against
the wall trying to find a non-hack method for disabling auto-sync
(much less the granularity that would actually be nice.)

Is this intentional by the framework team?  Is it a whoopsie that is
planned to be changed later?

Thanks,

Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: As application developers are we allowed to access system properties like ro.config.sync?

2009-04-20 Thread Hans


On Apr 20, 11:02 am, Romain Guy romain...@google.com wrote:
 ro stands for read only and even members of the Android team
 cannot write applications that change these properties. You can read
 the value of the ro.* properties but not change them.

Thanks for the info :).  Presumably, from looking through the source,
you can disable sync by setting 3 nulls to 'active' in a specific
database; however, there surely must be a 'proper' way to enable/
disable auto-sync yes/no/not-yet?

Thanks,

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: As application developers are we allowed to access system properties like ro.config.sync?

2009-04-20 Thread Hans

On Apr 20, 11:03 am, Jean-Baptiste Queru j...@android.com wrote:
 The proper way would be to start the relevant activity. I don't know
 whether the specific Intent to start that activity is documented as
 part of the public API, though.

 JBQ

Doesn't it seem like enormous overkill (cpu/memory/cycles) to launch
an activity to persist one simple setting?

Thanks,

 Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: As application developers are we allowed to access system properties like ro.config.sync?

2009-04-20 Thread Hans



On Apr 20, 12:11 pm, Jean-Baptiste Queru j...@android.com wrote:
 Well, that's not the kind of setting that you should change in the
 user's back. Launching an activity allows the user to make a conscious
 decision about the way they manage their phone.

 JBQ

Who said I'm doing it behind their back?

I'm writing a notification scheme for a vendor who wants their users
to know, in an clear and obvious fashion, when they enter/leave a
roaming service state.  Part of that notification is the ability to
change some settings when they enter/leave roaming.  These settings
aggregate options for the notification scheme itself, roaming options,
and (hopefully) auto-sync options; ergo, launching a separate activity
just to let someone check/un-check auto-sync is bizarre...

BTW, there are plenty of other things you can do behind the user's
back that are just as important that are available (data roaming for
example.)

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: As application developers are we allowed to access system properties like ro.config.sync?

2009-04-20 Thread Hans

On Apr 20, 12:06 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Apr 20, 11:03 am, Jean-Baptiste Queru j...@android.com wrote:
  The proper way would be to start the relevant activity. I don't know
  whether the specific Intent to start that activity is documented as
  part of the public API, though.

  JBQ

  Doesn't it seem like enormous overkill (cpu/memory/cycles) to launch
  an activity to persist one simple setting?

 It would appear SDK applications are not presently capable of providing a
 UI to do that, because thepropertiesare read-only from the perspective
 of SDK applications (per Mr. Guy's email). Hence, today, launching the
 built-in activity may be the only available option.

 If you would like thosepropertiesto be read-write to SDK applications
 (perhaps governed by a permission), post an issue tohttp://b.android.com

Thanks for the link Mark :).

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: As application developers are we allowed to access system properties like ro.config.sync?

2009-04-20 Thread Hans

On Apr 20, 1:02 pm, Dianne Hackborn hack...@android.com wrote:
 The data roaming thing is fixed in Cupcake.

Fixed?  It's not broken as far as I can tell.  It's a System setting.
Seriously, why on earth would you change it?  I'm sure that no
developer has requested this as a change, so why is it changing?

 If you are doing this for a vendor, you can have your app signed with the
 platform certificate for the vendor, and do many of these things.  What you
 are asking is not within the scope of the third party SDK, and is most
 likely something we don't want to have within it.

Apologies, but I don't understand how having my 'app signed' for a
vendor will suddenly make new features of the SDK available.  Does
doing this get me a different Android Jar that suddenly makes the Sync
Manager available?

Why wouldn't you want to be let applications control the functionality
of the phone?  Protecting the user?  That can't be it because you can
stomp all over the SDCARD, you can run background services that run at
boot, you can upload data from the phone to pretty much any website
you wish.

Where is this mysterious group who decides what's dangerous and what
isn't, when it's all technically dangerous to begin with...?

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



[android-developers] A simple question about a particular intent...

2009-04-19 Thread Hans

I'm stumped simply trying to find out information on the following
intent:

android.intent.action.SERVICE_STATE

Now, looking at the naming schema used, it would suggest, since
Android is 'sort of' Java that this would be something found in the
intent class (since action is not a child class) and, while there are
many intents listed there as constants, this intent is not one of
them.

Now, there are other intents, such as:

android.net.conn.CONNECTIVITY_CHANGE

This is, shocker, found in the android.net.ConnectivityManager class.
Now, that is still not syntactically matching between intent hierarchy
and class hierarchy, but at least  it's roughly nearby.

The only way I found where SERVICE_STATE was defined was by
downloading the Android Base source code and searching through it.
Bingo, it shows up under internal\telephony\telephonyintents.java.

What is going on with that?  Shouldn't it be named something more like
android.internal.telephony.SERVICE_STATE?

Surely, this is an intent that is meant be used as it is the only
intent I can find mention of anywhere (newsgroups, web, et cetera)
that will notify you of switches in your service state.

Are we not supposed to be aware of when a phone goes in/out of roaming
(as an example)?  If we are, why is this not documented?

How do I find out what is bundled with intents like this (for example,
how do I know if it is roaming that changed if I catch this in a
broadcast receiver?  My broadcast receiver won't have the previous
state information, so how do I know what it is that has changed?

Thanks,
 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Sorry if I've missed this somewhere, but what is the default thread stack size in Android...

2009-04-14 Thread Hans

Is this unanswered because nobody knows or because it's available
somewhere obvious and I've somehow missed it?

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Sorry if I've missed this somewhere, but what is the default thread stack size in Android...

2009-04-14 Thread Hans

I have found some extraneous information that suggests that 8kb is the
default thread stack size.

Is that still the case?

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Sorry if I've missed this somewhere, but what is the default thread stack size in Android...

2009-04-13 Thread Hans

...on the emulator and the G1?  I presume, at least for now, they're
the same.

Thanks,

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



[android-developers] Activity with no UI

2009-03-28 Thread Hans

Anyone know if this is possible?

I want to handle something launched by an ActivityChooser as invisibly
as possible.

Currently I simply do the processing in onCreate and tell the activity
to close.  This is fast, but there's a blink as the old activity is
replaced with the new which immediately vanishes and the old one comes
back.

This isn't the end of the world, but it would be nice to have no UI at
all.

 Thanks,
 Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Activity with no UI

2009-03-28 Thread Hans


On Mar 28, 6:14 pm, Pd lotusscr...@gmail.com wrote:
 Use a service

 http://developer.android.com/reference/android/app/Service.html

 Pd.

...want to handle something launched by an ActivityChooser ...


 Hans ;)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Photo Viewer Share menu -

2009-03-27 Thread Hans

I want to be able to handle the intent (which contains an image) which
is generated when a user chooses my 'activity' from the Share menu but
I want it to happen without displaying a UI after the user chooses my
entry on the 'Share' acitivty chooser menu.

Is it possible to create an Activity with no UI?  Normally I'd use a
receiver for this but the 'Share' button only enumerates activities
for its chooser, not receivers.  Worst case scenario I could have the
activity display an acknowledgement and then immediately close but I'd
rather have it handle the operation 'invisibly.'

Suggestions for solving this?

Thanks,

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 the system launches a ResolverActivity or ChooserActivity it doesn't present...

2009-03-19 Thread Hans

On Mar 18, 11:16 pm, Dianne Hackborn hack...@android.com wrote:
 They use queryIntentActivities(), which only returns activities.  In the
 package manager, the four component types are completely disjoint, and there
 is simply no call you can make that will give you a mix of them.

Thanks for the info :).

  BTW, does this mean that services will tend to only get 'sticky'
  broadcast intents, intents intended explicitly for them from a given
  activity or service, and the occasional intent that isn't handle by
  any activity currently registered for it?

 Services are just completely different from receivers, which are different
 from activities.  They don't receive any broadcasts at all.

They certainly do when you register for them dynamically.

  Neither do activities.

Ibidem

 Only receivers do.  (One exception is that you can dynamically
 create a BroadcastReceiver and register it at runtime, but in that case it
 is not the component itself receiving the broadcast.)

Presumably this difference only matters when the code in question is
not yet running.

 In other words:

 - You launch activities with startActivity().
 - You send to receivers with sendBroadcast().
 - You bind to services with bindService() (and make them run with
 startService(), but semantically this is not the same at all as starting an
 activity; we probably should have found a different verb to use here).

So - If I have a service that I want to run when certain things
happen, just for an example I want it to run when someone clicks
'share' on the photo viewer menu.
Presuming that service is not running, putting the proper intent
filter in the service's manifest won't make a difference because
services are never evaluated for intents, but a running service with a
broadcast receiver inside of it would have its broadcast receiver
evaluated, correct?

I presume that if you want a service started up because of a standard
broadcast message your service's package would also contain a
broadcast receiver that would actually be what was triggered and it
would in turn start the service, yes/no?

So, to sum up, unless an intent is sent via broadcast, a running
service has no approach to receive intents other than from binds and
starts/stops, correct?

Thanks,

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 the system launches a ResolverActivity or ChooserActivity it doesn't present...

2009-03-19 Thread Hans



On Mar 19, 1:08 pm, Dianne Hackborn hack...@android.com wrote:
 On Thu, Mar 19, 2009 at 7:33 AM, Hans hkess...@gmail.com wrote:
   Services are just completely different from receivers, which are
  different
   from activities.  They don't receive any broadcasts at all.
  They certainly do when you register for them dynamically.

 Seriously, they don't.  sendBroadcast() will never ever reach a Service.
 When you use registerReciever(), you are creating a dynamic
 BroadcastReceiver and delivery is going there; the Service component is not
 involved at all.

What don't?  If the receiver is in my service, it's going to my
service - just via the receiver.  Or are you saying that if my service
contains a broadcast receiver, which registers for broadcasts when the
service starts up, it won't receive broadcasts?  That doens't sound
right.

  So - If I have a service that I want to run when certain things
  happen, just for an example I want it to run when someone clicks
  'share' on the photo viewer menu.
  Presuming that service is not running, putting the proper intent
  filter in the service's manifest won't make a difference because
  services are never evaluated for intents, but a running service with a
  broadcast receiver inside of it would have its broadcast receiver
  evaluated, correct?

 Again, these are three completely different things.  When share is clicked,
 startActivity() is called.  The ONLY thing that will happen as a result of
 this is an activity being started, so you simply must have an activity
 component that will handle the share intent.

 Once you are in your activity, you can start your service or so whatever
 else you want.

  I presume that if you want a service started up because of a standard
  broadcast message your service's package would also contain a
  broadcast receiver that would actually be what was triggered and it
  would in turn start the service, yes/no?

 Correct.

  So, to sum up, unless an intent is sent via broadcast, a running
  service has no approach to receive intents other than from binds and
  starts/stops, correct?

 That makes it sound complicated. :)  startActivity - Activity, startService
 - Service, sendBroadcast - BroadcastReceiver.  Just don't think of Intent
 as a generic message system where all of them are routed through one common
 channel.  Intent is a primitive data structure with standard semantics for
 declaring and matching a simple language, which is used in various places to
 build specific routing facilities.

The problem is that this IS the message system for Android.

I guess, as usual, a new mindset for solving problems is needed.

I think the only thing I've found missing from the framework point of
view is that PACkAGE_ADDED doesn't get sent to the newly installed
package.

Android is extraordinary, thank you for all the hard work :).

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 the system launches a ResolverActivity or ChooserActivity it doesn't present...

2009-03-18 Thread Hans

...services which are registered for a particular intent does it?

What I mean, and I'll test this later when I get a chance, is that if
I create a service that registers for ACTION_SEND, and a user, in the
photo viewer, clicks 'Share' and the system launches a chooser
activity for ACTION_SEND, the service won't show up in that chooser
will it?

I presume that only activities would show up, but I can't check just
now.

 Thanks,

Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 the system launches a ResolverActivity or ChooserActivity it doesn't present...

2009-03-18 Thread Hans

On Mar 18, 3:39 pm, Dianne Hackborn hack...@android.com wrote:
 No, it only shows activities.  These are displayed to resolve the launching
 of an activity.  It wouldn't make sense to show services.

Thanks, I only asked because a cursory glance through
ChooserActivity.java and ResolverActivity.java didn't provide me with
anything I could see as discrimination between activities and
services.  Confirmed with testing tonight.  Appreciated.

I don't think it makes much sense to display services either, but I
certainly wasn't going to ASSume anything for certain ;).

BTW, does this mean that services will tend to only get 'sticky'
broadcast intents, intents intended explicitly for them from a given
activity or service, and the occasional intent that isn't handle by
any activity currently registered for it?

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: class com.android.camera.UploadService does not exist?

2009-03-16 Thread Hans


On Mar 16, 1:25 am, Ralf ralfo...@gmail.com wrote:
 Just to clarify:
 - is this Camera the one in the git android repository?

Yes.

 - are you trying to build from the android repository using make or
 from the SDK?

From the SDK.

 - what is your platform? (i.e. not windows)

Windows and/or OpenSUSE 10.3.

 Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: class com.android.camera.UploadService does not exist?

2009-03-16 Thread Hans


On Mar 15, 1:06 pm, Abdul Mateen abmat...@gmail.com wrote:
 What do you mean by the camera Application, I have mostly used Camera in my
 applications, are you asking about the invocation of the camera, or
 something else?

The Camera package, the system app denoted by Camera.apk.

http://android.git.kernel.org/?p=platform/packages/apps/Camera.git;a=tree

 Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] class com.android.camera.UploadService does not exist?

2009-03-15 Thread Hans

Manifest for Camera.git application lists this service.

I am trying to simply build the Camera application and am unable to do
so.  There have been several small issues (such as a resource file
having values not compatible with the latest SDK), but this one seems
a bit more of a problem ;)...

Anyone successfully built the full (not commented out here and there)
Camera application?

Tips appreciated.

Thanks :)

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: class com.android.camera.UploadService does not exist?

2009-03-15 Thread Hans

Much appreciated Jean-Baptiste.

Would the source for this actually be available to a phone OEM or ISP
(I'm not sure what term to use for a branded network provider) such as
T-Mobile.  If so, I have contacts there who could do the build for me;
or, would this only be something in-house at Google?  I'm just looking
for what my requirements would be in order to build the Camera
application if truly necessary.

Thanks,

 Hans



Appreciated - Hans

On Mar 15, 10:58 am, Jean-Baptiste Queru j...@android.com wrote:
 I haven't looked in detail, but this looks like yet another case of a
 platform application that uses private platform APIs and therefore
 can't be built against the SDK.

 JBQ





 On Sun, Mar 15, 2009 at 7:57 AM, Hans hkess...@gmail.com wrote:

  Manifest for Camera.git application lists this service.

  I am trying to simply build the Camera application and am unable to do
  so.  There have been several small issues (such as a resource file
  having values not compatible with the latest SDK), but this one seems
  a bit more of a problem ;)...

  Anyone successfully built the full (not commented out here and there)
  Camera application?

  Tips appreciated.

  Thanks :)

      Hans

 --
 Jean-Baptiste M. JBQ Queru
 Android Engineer, Google.

 Questions sent directly to me that have no reason for being private
 will likely get ignored or forwarded to a public forum with no further
 warning.- Hide quoted text -

 - Show quoted 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: class com.android.camera.UploadService does not exist?

2009-03-15 Thread Hans

Much appreciated.

I'd like to ask you one more question if I could JBQ.

I have built all kinds of things with Android now, from simple
activities, to OpenGL applications, to out of process servers running
in services with inter-process communication and callbacks, et
cetera.  All of this is great in Android and relatively simple in
comparison to doing it in other platforms; however, just trying to
build Camera.apk is proving problematic in that I'm probably just
taking the wrong approach.

Do you have any suggestions (which I'll not hold you to) for building
Camera.apk because I, of course, end up needing to reference classes
outside of both the SDK and the Camera.git source base (such as
com.android.text.format.DateFormat which I found in the base.git
repositiory) and not being an expert Eclipse/Java person I simply
tried linking in the base framework source folders.  That, of course,
doesn't work.  All of the base code references a different set of
resources.

Should I be building the base code as its own project, and linking
that project to my Camera project's build path?

Sorry if this is too far beneath your purview, but I'm struggling to
do something I had hoped would be simple - just build Camera.apk
without any changes...

I've googled on this a bunch but found nothing but vagaries that make
it sound like no ones actually doing this right now.

Thanks,
 Hans

On Mar 15, 11:40 am, Jean-Baptiste Queru j...@android.com wrote:
 Oh, I see. The real problem is that the class in question was deleted
 a long time ago, but the manifest still lists it by mistake. The
 manifest should be updated. For your own purposes you can just remove
 the line in question in the manifest.

 JBQ





 On Sun, Mar 15, 2009 at 8:03 AM, Hans hkess...@gmail.com wrote:

  Much appreciated Jean-Baptiste.

  Would the source for this actually be available to a phone OEM or ISP
  (I'm not sure what term to use for a branded network provider) such as
  T-Mobile.  If so, I have contacts there who could do the build for me;
  or, would this only be something in-house at Google?  I'm just looking
  for what my requirements would be in order to build the Camera
  application if truly necessary.

  Thanks,

      Hans

  Appreciated - Hans

  On Mar 15, 10:58 am, Jean-Baptiste Queru j...@android.com wrote:
  I haven't looked in detail, but this looks like yet another case of a
  platform application that uses private platform APIs and therefore
  can't be built against the SDK.

  JBQ

  On Sun, Mar 15, 2009 at 7:57 AM, Hans hkess...@gmail.com wrote:

   Manifest for Camera.git application lists this service.

   I am trying to simply build the Camera application and am unable to do
   so.  There have been several small issues (such as a resource file
   having values not compatible with the latest SDK), but this one seems
   a bit more of a problem ;)...

   Anyone successfully built the full (not commented out here and there)
   Camera application?

   Tips appreciated.

   Thanks :)

       Hans

  --
  Jean-Baptiste M. JBQ Queru
  Android Engineer, Google.

  Questions sent directly to me that have no reason for being private
  will likely get ignored or forwarded to a public forum with no further
  warning.- Hide quoted text -

  - Show quoted text -

 --
 Jean-Baptiste M. JBQ Queru
 Android Engineer, Google.

 Questions sent directly to me that have no reason for being private
 will likely get ignored or forwarded to a public forum with no further
 warning.- Hide quoted text -

 - Show quoted 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] What emulator version are people using for photo/camera testing?

2009-02-24 Thread Hans

I have 1.0 r2 and it takes garbage pictures, and crashes when trying
to view any saved image (I've only saved images taken from the
emulator's camera so I don't know if it shows images that were
pushed via adb properly.)

I'll try the 1.1 SDK, and failing that, an earlier version.

Is this a known issue, sort of a well, if you're really going to work
with pictures, you should be using a G1 anyhow... kind of thing?

Thanks,
 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 emulator version are people using for photo/camera testing?

2009-02-24 Thread Hans

LOL - Problem resolved with 1.1 r1.

Pictures still do a weird preview immediately after taking the picture
and saving, but when you go to the photos viewer, lo and behold
there's a big picture of LUMBERGH!  Lol...

Ahhh Google, that was 'vintage'... :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

You should only need the AIDL file to reside in the TestService's
folder because the IDL compiler will find it there.  Again, make sure
you have your build path setup properly for Service Monitor.

Iirc, I tested this on a laptop I'd not used for anything and it built
for me straight away when I put the zip contents into a blank
workspace and then imported the two projects.

Good luck! :)

P.S. If problems continue, let me know and we'll work it out.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Dumb question about SMS - what port does a normal text SMS come in...

2009-02-14 Thread Hans

...on?

Is that defined by the carrier or whoever has 'branded' the phone?

For example, on the G1 in the US, does T-Mobile define that?

If so, does anyone know?

I was hoping that I could find out more information about where an SMS
message came from when I received an Intent but it seems to just carry
the PDU data (so I can get the phone number, but not what port it came
in on.)

Thanks,

 Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

I'm not trying to be argumentative for the sake of being argumentative
Dianne, but if that was the case, how could the IPC calls to the
remote process be resolved if they are only declared in the manifest
for the service project which is in a different *.apk?  This would
mean that android was accidentally (presumably) bypassing the
requirement to declare your exposed service interfaces in your
manifest.

BTW, I would presume that there is an implementation of the class in
the local client's *.apk because otherwise the client would have to
use late/explicit binding to the interfaces exposed by the service...
This should be true anytime you write a client.

The bone of contention appears to be one of two things.

Either it should be impossible to start a remote service from a class
name or some other local to the client reference, or
the operating system should handle starting a remote service from a
class name 'properly' so that the main service thread can callback
into the client instead of just the service's thread pool being able
to.

In either case, it would be nice if the documentation about starting
services recommended using a global service name for starting remote
services, although I would certainly know less about Android if that
were the case, lol...

Is there a formal specification for the behavior of services in this
regard?

I certainly don't mean any of my comments to sound critical of
Android, it really is fantastic (if given to renaming things that had
perfectly valid names before :) ), and VERY easy to use.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

On Feb 14, 3:12 pm, Dianne Hackborn hack...@android.com wrote:
 On Sat, Feb 14, 2009 at 7:38 AM, sunil.mahar...@lntinfotech.com wrote:
  import com.android.TestService.*;

 Is this code part of the android platform?  No?  Then please don't use this
 namespace.  Thanks. :)

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

Apologies, just for my first two tests :).

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

Crud Suni - I accidentally left an error call (from when I was testing
out the weirdness of service creation the 'wrong' way) in the
StartService method in the Service Monitor class...

Right below the comment //Attempt to start the service there's a
call:

startService( new Intent( this, TestService.class ) );

THAT is not supposed to be there because it is started properly right
below it using the TEST_SERVICE name.

Sincerest apologies, I was using the other line to trace behavior when
it was created 'incorrect' (although the framework didn't complain.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans

Fixed and re-uploaded in case anyone else uses 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: Dumb question about SMS - what port does a normal text SMS come in...

2009-02-14 Thread Hans

So default text based SMS traffic does not travel over IP, but SMS
traffic can travel over IP?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 scrolling (in case anyone finds this useful)

2009-02-13 Thread Hans

This is rough and quick, but after a couple of minutes looking aroudn
I didn't find anything about asking Google to auto-scroll my TextView
(I'm sure there are several ways to do this), so I used this for now.


public void AdjustScroll( TextView in_oTextView )
{
/*
We know how big the control is, we know how big
a line is, we know how many lines there are,
so how much do we have to scroll to keep the latest
data in view?
*/
int l_nLineCount = in_oTextView.getLineCount();
int l_nViewHeight = in_oTextView.getHeight();
int l_nPixelsPerLine = in_oTextView.getLineHeight();

//The difference between view height and total text height
int l_nDifference = ( l_nLineCount * l_nPixelsPerLine ) -
l_nViewHeight;

if( l_nDifference  1 )
{
return;
}

in_oTextView.scrollTo( 0, l_nDifference );
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-13 Thread Hans

Sunil, I'll zip up my test projects (a client in its own package and
*.apk and a remote service it its own package, and *.apk, exposing 2
interfaces and using callbacks into the client), I'll post the URL
here when I've done it.

Hope it helps :).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-13 Thread Hans

Here's the URL: http://www.plugin-factory.com/storage/workspace.zip

There are two projects in it:

 (1)ServiceMonitor - a simple activity that has 3 buttons and a
text view.  One buttons starts and binds to the service, the other
stops and unbinds from the service, the third is a query button that
was used to test some functions of the service that were related to
checking network status (but that's not important now and I erased
that code to keep it clearer.)

 (2)TestService - an out of process service that exposes two
interfaces (there are 3 AIDL files in the project, one for each
interface, and another interface that exposes the callback mechanism
to interested clients), the first interface allows you to register/
unregister for callbacks, the second is just a test interface to show
you can expose multiple interfaces and on a service and bind to the
ones you want.

That's pretty much it.

The ServiceMonitor project imports from the TestService in order to
use the interfaces, and the TestService project manifest specifies a
global service reference name of TEST_SERVICE and also denotes that
the service runs in its own process.

 Hope this helps :).

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 specify the port when programmatically listening for SMS messages?

2009-02-13 Thread Hans

I can get SMS messages by using the syntax below:

IntentFilter l_oSMSIntentFilter = new IntentFilter
( android.provider.Telephony.SMS_RECEIVED );
in_oContext.registerReceiver( this, l_oSMSIntentFilter );


But what I really need to do is listen on a particular port.

It appears you can set it in the manifest like below, but this is a
utility class so it doesn't have a manifest:

data android:port=8192/

I'm looking at the IntentFilter documentation, but I'm not sure what
to use...

Does 'port' fall under Data Path?  Is it a Category?

Can you even add properties like that to a programmatically created
IntentFilter (I presume you can)?


Also, I am interested in reading the message (as part of a control
scheme), will this trigger some sort of notification to the user to
decide who/what gets to handle the SMS?

Thanks,

 Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Presumably there's no method to apply permissions to your code during runtime, correct?

2009-02-13 Thread Hans

Another solution would be to be able to associate a manifest with a
class in some manner and importing/using that class would aggregate
its manifest into your own.  Potentially for only a subset of a
current manifest's features...

Hmmm...  It just seems silly that if someone wants to use my Utility
class that includes SMS read/write capabilities, they have to add:
uses-permission android:name=android.permission.RECEIVE_SMS / to
their project's manifest.

Heck, a new version of a class can therefore break currently compiling
code (although you can of course stipulate that the permissions
requirements have changed, but again, that puts the onus on the person
using your code when I'd rather do the work for them.)

 Hans :)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] RemoteCallbackList register called on one thread, broadcast initiated on another...

2009-02-12 Thread Hans

Hi everyone,

I'm an experienced C++/Java dev who has been truly enjoying that past
two days of getting neck deep into the Android SDK.  I can foresee a
lot of sleepless nights ahead :).

Now, being arrogant due to experience (lol) I basically wrote a hello
world Activity, got it to work and promptly decided to write an out of
process service with accompanying client for project #2.

Android is so well thought out (if not exactly documented although
that's an 'over time' issue inmho) that I had basically implented
everything but callbacks into the client before realizing (and feeling
like a total idiot) that there's a very nice example called
RemoteService (lol @ me - again...)

Basically, this validated everything I'd been doing, although I did
notice that because my client is in its own project and namespace and
my service is in another project and namespace (but the same Eclipse
workspace) that I had to have the service entry in my service's
manifest AND my client's manifest (that one took me a while to figure
out) in order to bind on the service.

Anyhow, everything's great, I am starting to love on Android
(figuratively) but I've run into BRITISH-NESSa bit of a sticky
wicket, eh, wot?/BRITISH-NESS.

When my client Activity binds on my service (which is running in its
own process) and calls the equivalent of 'registerCallback', the
interface is added perfectly to the RemoteCallbackList object and I
can immediately (right on the next line of code) use the interface to
send a notification to the client.  Now, my problem is that when my
main service thread tries to pull the interface out of the
RemoteCallbackList via the broadcast methods, the RemoteCallbackList
is always 'empty' - it returns 0 from beginBroadcast.

After double checking ensure that I AM actually adding it to the list
(because I've been a collossal idiot before) and that I am getting
success back from 'register', I immediately think it's a threading
issue, so:  I add logging code to the service in key places to log
what the thread id is repeatedly, and I think uh, I think I need to
use a handler of some sort to make the call back in the thread that
handled the registration and to double check I call beginBroadcast
right after 'register' and find that it always returns back the
correct number of callback interfaces.  So it VERY much appears to be
a threading issue (to me) so now I'm a bit stuck -

I've written a handler so that my main service thread can request the
correct thread to actually call 'beginBroadcast' and then thought 'how
is it going to know what thread that is...?' and instead am now
thinking I need to pass, via a handler or something, the incoming
interface from the thread that runs when the client calls the
equivalent of 'registerCallback' to my main service thread.

What part of the proper paradigm am I missing?

BTW, as an example of the thread IDs, my main service thread is #1,
the runnable I use for tasks in the main service thread shows an ID of
#1, the message handler I was thinking I could use, shows an ID of #1,
but the thread ID I get in my code in the service that runs when the
user registers their callback is #7.

If I plan to notify clients when the service notices something it
thinks they need to know, do I need to notify (somehow) the clients
via the thread with ID #7 or do I need to pass the interface I get
when the user registers their callback from thread #7 to thread #1 and
call 'register' on the RemoteCallbackList from thread #1?

Sorry for the verbosity but I figured more is better than less.
Again, everything works great except this one little part.

:)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans

When I built my client/service code I had two projects, one for the
client (the Activity) and a different project for my Service.

Now, I spent about 3 hours struggling until I realized that for some
reason (probably because I was using an out of process service) I
needed to not only declare my service in the service project's
manifest BUT ALSO in the client project's manifest in exactly the same
manner (without the interface portions so just something like service
blah blah blah process:remote/), then bingo, my client stopped saying
not found.

If you're using a multi-project approach (as I presume anyone would if
they plan to have a re-usable service), make sure you've got service/
 declared in all your client application's manifests.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: RemoteCallbackList register called on one thread, broadcast initiated on another...

2009-02-12 Thread Hans

I'm sorry for not understanding, but it sounds like you're describing
how to get thread pool requests executed in the main thread, but
that's not the problem I'm describing (unless I've described it poorly
[if so, sorry...])

My problem is that as client Activities pass my service their callback
interfaces, the service's thread pool handles the interface code in my
service and the thread pool's thread calls
RemoteCallbackList.register.  When my service wants to send a message
to the registered client applications it tries to use the interfaces
which are stored in the RemoteCallbackList object but (and here is the
problem) there are no registered callbacks in the object.
RemoteCallbackList.beginBroadcast() returns 0 all the time, no matter
how many client's successfully bind to my service and register
themselves for callbacks.

Now, I put a simple bit of debug code to dump out how many clients are
registered each time the Service interface code is called and the
number there is exactly as I expect.  When the first one connects, the
Log.i output shows 1 client connected, when another Activity calls
to register its callback with my service, the service code reports 2
clients connected, et cetera.

So, my problem is that when the service's threadpool makes use of my
service's RemoteCallbackList object, everything is as expected, there
are several clients registered and their interfaces work, BUT, when my
service's main thread wants to notify the clients of some even, and it
tries to use the RemoteCallbackList object, it is empty when the
thread pool thread reports that it is NOT empty.

Thanks for looking at this for me.  Once I get this licked, I plan to
write up a very nice bit on how easy (I won't mention this part! LOL)
getting into Android is and include my service work.

 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: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans

I will try that, 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: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans

It didn't work.  I commented out the service declaration in my
Activity's manifest:

service android:name=com.android.TestService.TestService/

And modified my service's manifest to include 'exported' like this:

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.android.TestService
  android:versionCode=1
  android:versionName=1.0.0
application android:icon=@drawable/icon android:label=@string/
app_name
service android:name=.TestService android:exported=true
android:process=:remote 
intent-filter
!-- These are the interfaces supported by the 
service, which you
can bind to. --
action 
android:name=com.android.TestService.ITestService1/
action 
android:name=com.android.TestService.ITestService2/
/intent-filter
/service
/application
/manifest

And during runtime I got the old problem I had before adding the
service line to my client's manifest:

02-12 14:16:23.531: WARN/ActivityManager(50): Unable to start service
Intent { comp={com.android.servicemonitor/
com.android.TestService.TestService} }: not found

I'm sure I'm just doing something totally noobishly dumb, but my dumb
(lol) way I've got it working 99% of the way, now if I can just get
the main service thread to actually find the callbacks that I know are
in the RemoteCallbackList (but that's for another thread :)) - thanks
for putting up with me Dianne.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans

On Feb 12, 2:47 pm, Dianne Hackborn hack...@android.com wrote:
 Um.  This is the package your service is in:

 manifest xmlns:android=http://schemas.android.com/apk/res/android;
      package=*com.android.TestService*

 And yet you are trying to start a service in the other package:

 Unable to start service
 Intent { 
 comp={*com.android.servicemonitor*/com.android.TestService.TestService}

That's what the error is, I'm simply calling start service like this:

if( null == startService( new Intent( this, TestService.class ) ) )
{
if( null != in_oOutput )
{
in_oOutput.append( \nstartService returned 'null' );
}

return false;
}


My client class has imported TestService via:

import com.android.TestService.*;

So, I'm wondering why, unless I declare the service in the client's
manifest as I explained before (and change absolutely nothing else)
does it work just fine, but without the service line in the client
manifest it is trying, for some reason, to find it in the wrong place.

When it works, the activity manager reports in the log:

02-12 15:08:43.541: INFO/ActivityManager(50): Start proc
com.android.servicemonitor:remote for service
com.android.servicemonitor/com.android.TestService.TestService:
pid=621 uid=10018 gids={}

So it would seem that com.android.servicemonitor/
com.android.TestService.TestService is perfectly fine.

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: RemoteCallbackList register called on one thread, broadcast initiated on another...

2009-02-12 Thread Hans

The only thing different, as far as I can tell, between my approach,
and the sample's is that the client and service are in the same
project and share the same manifest, and in my service's manifest I
don't use something like:

action android:name=com.example.android.apis.app.REMOTE_SERVICE /

So, in the sample, the clients use this 'name' for the service to
start/bind to it.  I use the class name as is used in other service
examples.

I wonder if, because the service is remote, it makes a difference
using a specified name...

   Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans

It turns out that you can avoid using the service reference in your
client manifest if you declare what I presume is a global name in your
service's manifest and simply refer to this name in your client code.

This is what I added to my service's manifest:

action android:name=com.android.TestService.TEST_SERVICE /

Then I could delete the service/ entry in my client's manifest.

I still can't get my service to trigger callbacks on the service's
main UI thread.

Weirdly enough, I have found that the thread pool thread ID will
differ, on occasion (of course) when a client calls in to register
their callback, but each of the thread pool's thread can broadcast on
the RemoteCallbackList's items while the main thread cannot...
Crazy...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: RemoteCallbackList register called on one thread, broadcast initiated on another...

2009-02-12 Thread Hans

Wow, weirdness...

Starting the remote service, whose code is in another project than the
client's, via a global name resolved the thread issue.

So, to sum up:

IF you keep your service code in its own project
If you don't declare a name like this:

action android:name=com.android.TestService.TEST_SERVICE /

in your service's manifest you'll be unable to start the service
without adding a service entry to your client's manifest (service/),
which is a weird way to solve the problem but for some reason results
in instantiating the process remotely (if designated as being a remote
process.)

You can bind on this service, you can call methods on this service,
you can register a callback on this service (that's running in another
process) BUT you can't receive callbacks from the service's main
thread, only from its threadpool.

LOL.

Sigh.  One unusual thing down, billions to go.

Thanks for the pointers Dianne :).

 Hans :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: RemoteCallbackList register called on one thread, broadcast initiated on another...

2009-02-12 Thread Hans

Unless there are some serious bugs in the Log class (which I doubt) it
wasn't running two instances of the service because I logged every
aspect of the service and the client's life cycles and included thread
IDs and process IDs when doing so.

I did this for all the variations I used to try and solve the problem.

There was only ever one instance of the server.  This instance was
running in its own process.  The client was running in its own
process.  The client could start/stop the service just fine.  The
clients could bind the service just fine (for multiple interfaces as
well.)  The clients could register and unregister their callbacks just
fine.  The service could call the clients on their callback interfaces
just fine IF the service's threadpool was making the calls.  The
service could NOT call the clients on their callback interfaces IF the
service's main thread or message handler was making the calls.  All of
this was logged for analysis.

As I posted in both threads, removing the service/ entry in the
clients' manifests and simply adding a name action (in this case
TEST_SERVICE) and changing the clients' methods for starting/
stopping the service to use an Intent created via the TEST_SERVICE
allowed all the same abilities except you COULD call the clients' on
their callback interfaces from the service's main thread and/or
message handler.

It is probably very easy to reproduce.  Take the REMOTE_SERVICE name
out of the Remote Service section of the manifest for the API samples
and add a service/ entry for RemoteService in the sections of the
manifest for the remote binding/controlling activities.

 Hans
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans

On Feb 12, 5:09 pm, Dianne Hackborn hack...@android.com wrote:
 I replied to this in the other thread, but if you want to explicitly
 reference a component from one package that is in another, you need to
 explicitly build the ComponentName of both the package and class name of the
 target.  The shorthand new Intent(this, ...) creates ComponentName objects
 whose package is your own -- it is only for references components in your
 own package.

Then how was it starting the service, binding it, and calling methods
on the service's interface if the constructor for Intent was somehow
mangling TestService.class?

TestService.class resolves directly to
com.android.TestService.TestService anyhow.

 Hans

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

2008-12-30 Thread hans

Hi,

I need help, how to emulate sim card in emulate tools?

could anybody tell me the steps about to config 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: How can I launch the default Contact Application provided in SDK with my app

2008-11-09 Thread Hans

Thanks for your help.
I am not sure... therefore is it possible to just launch contacts app
and use its functionality from a personal application?
Is this issue solved? and if yes would anyone help please.

Thanks


On Nov 5, 12:58 pm, Abraham [EMAIL PROTECTED] wrote:
 To select a particular contact from thecontactslist you can do the
 following

 i= new Intent(Intent.ACTION_PICK,People.CONTENT_URI);
 startActivityForResult(i,PICK_CONTACT_FROM_LIST);

 The details abt the selection can be received in the onActivityResult()
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] HTTP POST-Reply sample working on SDK 0.9

2008-10-12 Thread Hans

Hi,
anyone has an HTTP POST-Reply sample working on SDK 0.9 available
please?
Any help is greatly appreciated.

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Web service using XML-RPC working on Android SDK 0.9

2008-10-04 Thread Hans

Anyone out there ready to share some sample project which features a
web service using XML-RPC working on SDK 0.9. I managed to get hold of
some other samples but unfortunately these do not work successfully in
SDK 0.9. Any help as with regards to web services on android would be
greatly appreciated. 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---