[android-developers] Creating drop-down, expandable views

2012-01-11 Thread DulcetTone
I see on occasion complex preference panels that have factored the
panel into expandable sections to reduce visual clutter and speed
loading time.

I see things in the SDK such as ViewStubs but see no visual
illustration of what they look like and whether they create the sort
of design I'd like to emulate.

Can someone point me to a tutorial or sample project that shows this
sort of interface and can permit me to know (before I start) that I am
pursuing the proper means to achieve the effect I've seen elsewhere?

tone

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


[android-developers] Re: Android Library sources not found

2012-01-08 Thread DulcetTone
My hero, too!

This presumably will fix the issue for me, as well, but I can see it
has already done the impossible -- finally made Eclipse automagically
build the projects my own one depends on.  I swear I'd tried the same
trick many times before and it never worked.  Perhaps I cleaned up
some other stuff.

Thanks.

tone


On Jan 5, 1:19 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 1:

 Add the library project as a dependency to the app project:

 Package Explorer / Right-click the app project / Properties / Java Build
 Path / Projects, under Required projects on the build path.

 2:

 Switch to the Order and Export tab and move the library project up, so
 it's above Library Projects (just that, no need to tick the checkbox on
 the left there).

 -- Kostya


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

2012-01-05 Thread DulcetTone
Is there something I need to do so that my own Android Library's
source code is findable by Android projects working with it within the
same workspace?  The debugger goes to a .class version of it, and no
use of the link to source function offered thereby placates it.

No pointing out of this source should be necessary, correct?  The
Android Library's project is in the same workspace and it is open!

tone

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


[android-developers] Dalvik format error 1

2011-12-27 Thread DulcetTone
How can I tell what packages/classes are conflicting to cause this?

Is it a problem to have a package's classes contributed from more than
one project as long as the classes do not have the same
package.classname signature?

This is driving me bonkers, this vague error message.

tone

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


[android-developers] AOSP fails to repo sync KeyError: 'content-length'

2011-10-29 Thread DulcetTone
failure is immediate and inescapable it seems:


ad-3:
Traceback (most recent call last):
  File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/threading.py, line 460, in __bootstrap
self.run()
  File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/threading.py, line 440, in run
self.__target(*self.__args, **self.__kwargs)
  File /Users/tone/mydroid/.repo/repo/subcmds/sync.py, line 182, in
_FetchHelper
success = project.Sync_NetworkHalf(quiet=opt.quiet)
  File /Users/tone/mydroid/.repo/repo/project.py, line 926, in
Sync_NetworkHalf
if alt_dir is None and self._ApplyCloneBundle(initial=is_new,
quiet=quiet):
  File /Users/tone/mydroid/.repo/repo/project.py, line 1444, in
_ApplyCloneBundle
exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst,
quiet)
  File /Users/tone/mydroid/.repo/repo/project.py, line 1514, in
_FetchBundle
size = r.headers['content-length']
  File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/rfc822.py, line 384, in __getitem__
return self.dict[name.lower()]
KeyError: 'content-length'

Exception in thread Thread-4:
Traceback (most recent call last):
  File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/threading.py, line 460, in __bootstrap
self.run()
  File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/threading.py, line 440, in run
self.__target(*self.__args, **self.__kwargs)
  File /Users/tone/mydroid/.repo/repo/subcmds/sync.py, line 182, in
_FetchHelper
success = project.Sync_NetworkHalf(quiet=opt.quiet)
  File /Users/tone/mydroid/.repo/repo/project.py, line 926, in
Sync_NetworkHalf
if alt_dir is None and self._ApplyCloneBundle(initial=is_new,
quiet=quiet):
  File /Users/tone/mydroid/.repo/repo/project.py, line 1444, in
_ApplyCloneBundle
exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst,
quiet)
  File /Users/tone/mydroid/.repo/repo/project.py, line 1514, in
_FetchBundle
size = r.headers['content-length']
  File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/rfc822.py, line 384, in __getitem__
return self.dict[name.lower()]
KeyError: 'content-length'


Ideas?

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


[android-developers] Library srec_jni

2011-10-29 Thread DulcetTone
Where does this reside, in a format compatible with
System.loadLibrary() on the host computer (say, when it is being used
within the simulator)?

I see a libsrec_jni.so , but regular non-Dalvik Java code on my own
machine does not recognize it as something good for loadLibrary() or
load().

There MUST be a version of it somewhere, as it can be used from within
the simulator.  I am trying to figure out if that one is suitable for
use from normal Java apps, and -- if not -- how to build one that is.

tone

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


[android-developers] New Market Console not so amazing

2011-07-27 Thread DulcetTone
I am not sure I like the new Market Console.

From a usability standpoint, the Recent Changes field should be on
the APK panel, not the other one.  Changes are associated with APKs,
yes?

It is too easy to have an APK up and not activated.  What value is
there in having one posted and not activated?

Actually, I can think of only one use, and it is not supported:

There is no way to deactivate the highest version number.  This would
be the painless way to revert from a botched release.

tone

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

2011-06-26 Thread DulcetTone
I can recall using a (non-Google) website that listed Android apps
like so many do, but this one had an event stream for each app showing
changes such as version updates, price changes, permission changes,
etc.

I've forgotten which site that was.

Can someone point me to one (or more) such sites?

tone

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


[android-developers] Re: Android LifeCycle and Singleton Instances

2011-06-05 Thread DulcetTone
Mark, thanks so much for that.  I had overlooked those pages in my
focus on the Javadoc.
It would be great if the germ of those nuggets were placed into the
Javadoc.

I think I have the tools to resolve these lifecycle issues.

tone

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


[android-developers] Re: Android LifeCycle and Singleton Instances

2011-06-04 Thread DulcetTone
I feel that the lifecycle (of apps and activities) is not well
documented.  I wish the Javadocs were somehow wikified so the vague
portions could be collaboratively identified and remedied.  I only
feel I am able to identify places where questions arise, so having the
ability through OSP (I suppose) to edit these is not such a boon.

My app has longstanding bugs that some phones see and others do not,
and they tie into lifecycle issues.
Here are some of the questions I find I still have.

The Activity documentation does not clearly indicate the difference
between an activity being paused versus being stopped.   Is a paused
activity one which has 1 or more pixels obscured by another, and a
stopped activity one that has zero visible pixels?

I have never found just where the the interrelationships between
finish() and state diagram paths toward pause/stop and the use of the
back  button or home button are detailed.

Shouldn't finish() have been called destroy() so it is consistent
with the state diagram?  If so, the documentation should spell out how
finish()ing an activity will start it through the path to onDestroy().

There seems to be no direct means by which my app (or do I mean my
task?) can know when one of its activities is active versus not.  This
has confused me for one and a half years (it matters when you make an
app that has a voice user interface and want the recognition to be
stopped when the user presses home, but not when he presses back on
an activity that returns another of your app's activities to the
fore).  It gets worse in that starting a new activity does not deliver
you an Activity instance immediately, making instance counting
difficult.

I have resisted using the manifest flags for singletop et al
entirely, as several readings of their description have not conveyed a
clear understanding.

tone

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


[android-developers] RecognizerIntent, free-form, returning ok for all input

2011-03-21 Thread DulcetTone
A user, running

Google Services Framework ver. 2.2.1
Voice Search ver.  2.0.2

finds that my app's use of the RecognizerIntent for voice-to-text
returns ok no matter what he says.  The same code, on my test phones
(running VS 1.5.0 and 1.6.0) produce plausible text versions of what I
said.

What could cause this?

tone

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

2011-03-21 Thread DulcetTone
My app responds to speech commands.

I want the behavior to be that

1.  if back is hit on my initial activity, it exits.
2.  My app has a few sub-activities it may launch on user speech- or
GUI input
3.  if home is hit on ANY of my activities, I want all of them to
finish.

That's basically it.
Why I want this is uninteresting... few users of the app would find
the desired behavior anything other than the one they'd want.

It's possible that I could get some of this to happen by use of the
activity flags/modes (single-top, etc), but their documentation also
reads like Sanskrit after 10 reads through.

tone

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

2011-03-12 Thread DulcetTone
I find the flowchart of Activity lifecycle pretty ambiguous.  In a
perfect world, it would receive a little more work to resolve the
gray, but I'll throw out some example issues.

1.  The phrasing on the legs into and out of onPause() are vague.
Does another activity comes in front of the activity pertain to the
case where my activity is simply going away because finish() was
called?  Does the activity is no longer visible mean that my
activity is entirely concealed, and would this then differ from the
case where another activity appeared partially in front of my own?

2.  what happens if you call finish() from within onCreate()?
onStart()?  just about anywhere except the green activity is running
blob?

3.  How is onPause() - onResume() different than onStop() -
onRestart()?  What circumstances differentiate the flow?

4.  minor nits:  the clarity of the chart is actually diminished by
having an exit from the The process is killed state, and some
mention as to whether the Activity object may be re-used should follow
the onDestroy() state

The thing I am specifically trying to do is this:

I want to perform certain actions when the BACK or HOME keys are
pressed, and ignore cases where a third-party activity simply pops up
on part of the screen and then goes away.  Not all phones are
traversing the lifecycle graph the same way, it seems, and since I do
not have one of every phone (Droids seem notoriously different),
writing test cases is not a viable means of educating myself.  I'd
like some clarity on the designed behavior that can be vouched for.

tone

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


[android-developers] Telling 2.2 vs 2.2.1

2011-02-09 Thread DulcetTone
How can I tell, robustly, whether my app is running under Android 2.2
vs 2.2.1 (or later within 2.2)?

tone

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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.startForeground() -- what is the int id parameter?

2011-01-31 Thread DulcetTone
I tried using this with id=0, and no icon was placed in the status
bar.
I switched to using a string resource ID and it worked.

The documentation for the notification system seems to welcome us to
use any value unique to our app.

tone

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


[android-developers] What is a KeyGuard?

2011-01-24 Thread DulcetTone
Is an Android KeyGuard the swipey thing to unlock the home screen,
or is it a screen that requires security code or pattern to be
entered, or is it both of these things?

If only the second, why is it that a KeyGuardLock.disableKeyguard() is
documented as Note: This call has no effect while any
DevicePolicyManager is enabled that requires a password. ... what
good would an object intended to clear a lock that is unable to ever
clear a lock?

My own use of it seems to allow me (on all but a few custom ROM
phones) to clear a security screen away, but the documentation seems
to imply that I could not do this.

tone

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


[android-developers] Re: How to tell if a package is burned in versus updateable?

2011-01-19 Thread DulcetTone


On Jan 5, 10:19 pm, Dianne Hackborn hack...@android.com wrote:
 On Wed, Jan 5, 2011 at 7:07 PM, DulcetTone dulcett...@gmail.com wrote:
  Is there no means by which you can tell whether a package installed on
  the phone is burned in with the firmware (and hence immutable) versus
  one that can be updated?

 ApplicationInfo.FLAG_SYSTEM.

 This doesn't really mean it is immutable; you can install an update to it if
 it is signed with the same cert (though the update is placed on the data
 partition like other third party apps, since /system is read only).

Ok... is this update then read and used instead of the original /
system copy?  I assume so.


  On a similar line, why does Google ever put apps on the Market with
  the same signature by which they are burned into some phones?  It
  stunts updating terribly.  Indeed, why burn any apps on the phone as
  opposed to make them super-easy to find in a dynamic manner?

 Huh?  You can update built-in apps, as per above.  This is how maps updates
 have been delivered for a long time, as well as Market updates (which you
 aren't generally aware of), more recently Gmail updates, etc.


This is not the case with my phones.  I suppose this must be a
consequence of the fact that their firmware was written to from a burn
station in Google's own offices here in Cambridge.   I cannot, for
instance, update Google Maps -- it downloads the update and fails to
install every time.

I assumed the issue extended to other users' phones.

tone

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 tell if a package is burned in versus updateable?

2011-01-05 Thread DulcetTone
Is there no means by which you can tell whether a package installed on
the phone is burned in with the firmware (and hence immutable) versus
one that can be updated?

On a similar line, why does Google ever put apps on the Market with
the same signature by which they are burned into some phones?  It
stunts updating terribly.  Indeed, why burn any apps on the phone as
opposed to make them super-easy to find in a dynamic manner?

tone


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

2010-12-31 Thread DulcetTone
I am not keen on testing 1.5 and such sort of tests usually are a
waste of time on Android.

Certainly there must be a means of finding and deleting this data?
I've been told it goes onto the SD card, but I see it nowhere for
manual deletion.

tone

On Dec 21, 2:39 pm, JP joachim.pfeif...@gmail.com wrote:
 I was able to sufficiently test this with the emulator running a 1.5
 AVD, whereTTSwas not available yet.

 On Dec 21, 8:48 am, DulcetTone dulcett...@gmail.com wrote:


  How do you uninstall voice data from a phone that has it installed?

  I need to test code that handles cases of it being absent.

  tone

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


[android-developers] Bluetooth SCO... start/stop versus setOn(bool)

2010-12-30 Thread DulcetTone
I do not understand the model of

AudioManager.startBluetoothSco()
AudioManager.stopBluetoothSco()

and

AudioManager.setBluetoothScoOn(boolean)

The description in the documentation is not clear.

is start/stopness an underlying state for on/offness?

Is SCO started/stopped for the whole device, or a particular app?
How about on/off?

How do either of these relate to whether a headset is (or is not) in
Voice Dialing mode, e.g.:  BluetoothHeadset.startVoiceRecognition()
and BluetoothHeadset.stopVoiceRecognition() ?

Thanks in advance.

tone

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


[android-developers] uninstall TTS data from Android = 1.6 ?

2010-12-21 Thread DulcetTone
How do you uninstall voice data from a phone that has it installed?

I need to test code that handles cases of it being absent.

tone

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 block a BufferedReader when no input is available?

2010-12-19 Thread DulcetTone
I have code in a worker thread that needs to efficiently read a
constantly-growing input stream from a process.

The issue is that the present design uses a sleep() for a short period
if there is no input presently available, and I'd like the attempt to
read the input stream simply *block* so it magically awakes when more
input is available.  I fear this will mean a small hit on phone
responsiveness.

How does one alter code from this form to do such a thing?

BufferedReader bufferedReader =
new BufferedReader(new
InputStreamReader(process.getInputStream()));

do {
String line;
while ((line = bufferedReader.readLine()) != null) {
// new input would be processed here
}
Thread.sleep(500); // TODO: make this go away
} while (true);

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


[android-developers] Re: How to block a BufferedReader when no input is available?

2010-12-19 Thread DulcetTone
I don't think any of these solutions help, as I did not write the
writer thread and cannot alter its code.

Unless I am missing something, use of notify/wait would only move the
sleep() to another thread, achieving nothing.

Is there no intrinsic, system-based means of having a read block until
the stream is closed (rather than having just temporarily run dry) or
has more data to offer?  This is a key part of many I/O systems, yes?

tone


On Dec 19, 9:22 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Use Java thread synchronization:

 http://www.javamex.com/tutorials/synchronization_wait_notify.shtml

 Have the reader thread wait when there is no data and the writer
 thread notify the reader when more data is available (and when it
 should exit its processing loop).

 -- Kostya

 19.12.2010 16:38, DulcetTone пишет:









  I have code in a worker thread that needs to efficiently read a
  constantly-growing input stream from a process.

  The issue is that the present design uses a sleep() for a short period
  if there is no input presently available, and I'd like the attempt to
  read the input stream simply *block* so it magically awakes when more
  input is available.  I fear this will mean a small hit on phone
  responsiveness.

  How does one alter code from this form to do such a thing?

  BufferedReader bufferedReader =
                   new BufferedReader(new
  InputStreamReader(process.getInputStream()));

               do {
                   String line;
                   while ((line = bufferedReader.readLine()) != null) {
  // new input would be processed here
                   }
                   Thread.sleep(500); // TODO: make this go away
               } while (true);

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.com

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


[android-developers] Eclipse builds suddenly broke

2010-12-12 Thread DulcetTone
My project was building fine yesterday, but after I downloaded the 2.3
SDK and updated some Eclipse components, it broke HARD.

.AIDLs do not even try to compile
Resources are never compiled (e.g., from values/strings.xml)

Are there any known issues with the latest Eclipse/Android bits?

tone

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

2010-12-12 Thread DulcetTone
This turned out to be caused by the new requirement that multiple
formatting marks in a string/string be numbered.

More here:

http://developer.android.com/guide/topics/resources/string-resource.html


Tony

On Dec 12, 11:45 am, DulcetTone dulcett...@gmail.com wrote:
 My project was building fine yesterday, but after I downloaded the 2.3
 SDK and updated some Eclipse components, it broke HARD.

 .AIDLs do not even try to compile
 Resources are never compiled (e.g., from values/strings.xml)

 Are there any known issues with the latest Eclipse/Android bits?

 tone

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


[android-developers] Make an app NOT be full screen

2010-12-11 Thread DulcetTone

I want my app to not obliterate all other apps on the screen and
perhaps to dim them or blur them while keeping just a small panel open
at the bottom.

I've tried this to no avail...

setContentView(R.layout.main);

 
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
getWindow().addFlags(
WindowManager.LayoutParams.FLAG_DIM_BEHIND |
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);

Is there a way to do this?

tone

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

2010-12-11 Thread DulcetTone
I agree... I find the change in trial period a step backward.

Tony

On Dec 11, 7:09 am, Pent tas...@dinglisch.net wrote:
  No offense, but the fact that you don't have a trial app is a really a
  bit tricking people into buying the app.  A large percentage of people
  are too timid, don't know, procrastinate, etc, to get a refund.  I
  think if you have an expensive app, it's almost mandatory to have some
  sort of free version.  Just my two cents.

 No offense taken, the thought hadn't even occured to me.

 Nevertheless, it's another change from the Market that requires major
 action with hardly any notice.
 and which I don't believe they'd get away with without a de facto
 monopoly.

 Pent

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

2010-12-11 Thread DulcetTone
Thanks, TreKing and Kostya ... will explore this path.

tone

On Dec 11, 3:08 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 You can declare your activity in the manifest with:

 android:theme=@android:style/Theme.Dialog

 to make it semi-transparent,

 and use wrap_content for both width and height in the activity's layout xml.

 -- Kostya


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

2010-12-11 Thread DulcetTone
Substantial but not complete success.

It is vital that my window fill the width of the screen (so it can
display an Admob ad) and this theme imposes a padding or margin.

Looking at the themes.xml file in the SDK, I am not sure I understand
why this is or how I can alter my results.

Any idea what should I look for?

Tony

On Dec 11, 3:26 pm, DulcetTone dulcett...@gmail.com wrote:
 Thanks, TreKing and Kostya ... will explore this path.

 tone

 On Dec 11, 3:08 pm, Kostya Vasilyev kmans...@gmail.com wrote:







  You can declare your activity in the manifest with:

  android:theme=@android:style/Theme.Dialog

  to make it semi-transparent,

  and use wrap_content for both width and height in the activity's layout xml.

  -- Kostya

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

2010-11-12 Thread DulcetTone
The following code incorrectly (in my view) places the text left-
justified, and the button is in the center, horizontally.  Why is
this?



LinearLayout
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginLeft=12dip
android:layout_gravity=center_horizontal
android:padding=6dip
android:orientation=vertical

android:background=@android:drawable/alert_light_frame 

TextView
android:layout_marginTop=8dip
android:textColor=#00

android:layout_gravity=center_horizontal
android:text=This actually comes out 
left justified..   why?
android:layout_width=fill_parent
android:layout_height=wrap_content/

Button android:id=@+id/google_voice_button
android:layout_gravity=center_horizontal
android:layout_marginBottom=8dip
android:textColor=#00

android:layout_width=wrap_content

android:layout_height=wrap_content/
/LinearLayout

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


[android-developers] best reasonable practice for locally storing a password?

2010-11-03 Thread DulcetTone
I am considering adding a means by which my app can perform functions
over Google Voice, and the functionality would make little sense if I
required the user to type in a password.

I'd like a reasonable plan for storing the password locally and
sending it (through google-voice-java) when demanded by Google Voice.

Clearly, I'd like to properly represent the risks of the chosen scheme
honestly to the user.  I'd like the storage to be based atop writing
it into a SharedPreferences created with flags=0

What form of obfuscation is suitable, and with what available salting
ingredients and such should I customize it?

tone

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

2010-11-03 Thread DulcetTone


On Nov 3, 12:05 pm, Doug Gordon gordo...@gmail.com wrote:
 The big surprise to me, however, was the error reporting capabilities. I
 had no idea that AM would provide details on errors right down to the
 stack trace! Yes, I did have some dreaded NullPointer situations hanging
 around, but was able to immediately get fixes into the next update to
 take care of them.  I am mightily impressed with this feature!


Sadly, these all appeared after I implemented a customized stack-trace
reporting system.

On your first point... I do wish that a developer could publicly reply
to Market ratings.  The penalty for uncivil behavior would be obvious,
and the dev could clear up a misperception or demonstrate his ability
to incorporate negative feedback constructively.

tone

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


[android-developers] Re: how to release Paid upgrade for Free app?

2010-10-28 Thread DulcetTone
You cannot do either of these things.  Your present package name is
forever free and forever in use.
You can unpublish, but nothing else.

The sad truth is you had better come up with a new package name for
your paid version or try to tie the paid functionality within the
present app get unlocked by the discovery and verification of a paid
cookie app that entitles them to these features.

tone


On Oct 28, 7:51 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
 Hi,

 Is there a way to change free app into paid app in Market? I.e. you
 release com.foo.xxx as free but later
 you'd like to charge for app and drop free version completely.. I do
 not see anything like this in Market console
 at the moment. I know I can release com.foo.xxx.pro for example but my
 intention would be to keep
 package name as is so current users would see there's upgrade
 available. Alternatively, if there's no
 way to do that can I completely remove app from market so com.foo.xxx
 would be resuable for other
 app?

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


[android-developers] How to wrap and delegate ACTION_RECOGNIZE_SPEECH?

2010-10-27 Thread DulcetTone
I am trying to receive RecognizerIntents asking for free form speech
recognition and then pass them on to Google Voice Search.


My code is basically this:


Intent intent = new Intent(getIntent());

intent.setClassName(com.google.android.voicesearch,
com.google.android.voicesearch.RecognitionActivity);

I then try one of two approaches:

1.  Rely on the existing flag for FLAG_ACTIVITY_FORWARD_RESULT to
cause the reply to this intent to go to the activity that sent the
original to me.  This fails on the following log message:

10-27 14:06:31.448: ERROR/RecognitionActivity(2360):
ACTION_RECOGNIZE_SPEECH intent called incorrectly. Maybe you called
startActivity, but you should have called startActivityForResult (or
otherwise included a pending intent).




2.  I clear the FLAG_ACTIVITY_FORWARD_RESULT bit and
startActivityForResult(intent, someDangedInt) does me no good either.

What is the secret I am missing?

I don't mind handling the onActivityResult() and setting my result
code and such, but I just cannot figure out how to place myself in the
middle of this transaction.

tone



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


[android-developers] LVL -- where to specify params for Server policies?

2010-09-28 Thread DulcetTone
I do not see within the LVL documentation and example app who/what/
where you specify the frequency with which license checks must be
performed.

I would expect that we could just new up a ServerManagedPolicy and set
these parameters on it.

Are we intended to modify the actual file ServerManagedPolicy.java
(rather than subclass it) to overwrite the private final statics
therein?

I see that some of this comes via extras on the Intent... but that
seems to imply to me that the Market console will have a place from
where I specify these parameters, as it is the source of these extras
(I'd guess?)

Confused...

tone

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


[android-developers] Sending email by Intent... not simply composing a message

2010-08-11 Thread DulcetTone
I can't see that there is a means of sending an email programmatically
by Intent, as an analog to sending an SMS.  ACTION_SENDTO simply
allows you to pre-fill-out a composition of a new email (subject,
body, addressees, etc), but not cause it to be sent.

Is this correct?

tone

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

2010-08-11 Thread DulcetTone
You're right... I misstated that.  I can send SMS messages using the
SDK, but cannot send email.
I find that incongruous, despite the fact that the email app in the
open source contains some nicely crafted code to do just that.

Is every app that is to send mail to reinvent a very intricate, heavy
wheel?  I guess I have a feature request to line up.

tone

On Aug 11, 2:42 pm, Mark Murphy mmur...@commonsware.com wrote:

 Well, SMS-by-Intent does not cause it to be sent, either. If you are
 looking for an analogue to SmsManager for sending emails, there is
 none -- sorry!


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


[android-developers] Cannot find gen folder... it's right there!

2010-07-19 Thread DulcetTone
I have Eclipse build issues.
I am running ADT 0.9.7 from 1157 May 7th 2010 and a freshly-updated
copy of Eclipse 3.5 IDE for Java

I have an Android project which depends on an underlying Core
Android project, and it claims not to find its gen folder, though it
is exactly where it has ever been (though the project dependency is a
new wrinkle).  The project properties shows that it knows where it
lives.

Any ideas?

Tony


Here is how the .log file reports the issue:


!ENTRY org.eclipse.jdt.ui 4 10001 2010-07-19 11:25:23.592
!MESSAGE Internal Error
!STACK 1
Java Model Exception: Java Model Status [gen [in CD1] does not exist]
at
org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:
502)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:
246)
at
org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:
515)
at
org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:
252)
at
org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:
238)
at
org.eclipse.jdt.internal.core.PackageFragmentRoot.getKind(PackageFragmentRoot.java:
477)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java:
645)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.handleAffectedChildren(PackageExplorerContentProvider.java:
791)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java:
734)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.handleAffectedChildren(PackageExplorerContentProvider.java:
791)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java:
734)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.elementChanged(PackageExplorerContentProvider.java:
124)
at org.eclipse.jdt.internal.core.DeltaProcessor
$3.run(DeltaProcessor.java:1557)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java:
1547)
at
org.eclipse.jdt.internal.core.DeltaProcessor.firePostChangeDelta(DeltaProcessor.java:
1381)
at
org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java:
1357)
at
org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:
1958)
at
org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:
470)
at org.eclipse.core.internal.events.NotificationManager
$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:
285)
at
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:
149)
at
org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:
313)
at
org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:
1022)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 1 org.eclipse.jdt.core 4 969 2010-07-19 11:25:23.592
!MESSAGE gen [in CD1] does not exist



!ENTRY org.eclipse.core.resources 8 2 2010-07-19 11:25:27.803
!MESSAGE Problems occurred when invoking code from plug-in:
org.eclipse.core.resources.
!STACK 1
org.eclipse.core.runtime.CoreException: 'aapt' error. Pre Compiler
Build aborted.
at
com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.execAapt(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.handleResources(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown
Source)
at org.eclipse.core.internal.events.BuildManager
$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
170)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
201)
at org.eclipse.core.internal.events.BuildManager
$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
256)
at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
309)
at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
341)
at 

[android-developers] Eclipse projects and Android apps -- factoring and modularity

2010-07-18 Thread DulcetTone
I am using Eclipse and have an app that has free and paid versions.
For a long time, I built the 2 apps from a workspace set up as 3
Android projects:

Core (all the logic, all the resources, offering a never-deployed
com.me.myapp.Main activity)
Free (creates an empty subclass of com.me.myapp.Main called
com.me.myapp.free.Main)
Paid (creates an empty subclass of com.me.myapp.Main called
com.me.myapp.paid.Main)

The logic in Core, then, offered the paid and free behaviors based on
simple overridden callbacks on the free and paid Main activities that
were in the deployed packages.  The res folders for Free and Paid
were simple symlinks to the res folder in Core.

You can see the difficulties here.  There will be resources and code
in all the distributables that is never used.  Worse, the conditional
behavior is too complex in the Core code.  I want to move to a model
wherein the common resources of underlying projects are available as
needed, and custom resources and code introduced only where needed.  I
even have some Android 1.x/2.x code that cannot co-exist in a single
package (I've simplified the pain in the retelling here).

I have my workspace set up now as:

Core (all the common logic, all the resources, offering a never-
deployed com.me.myapp.Main activity)
And1 (the Android1.x-only code, creates a never-deployed subclass of
com.me.myapp.Main called com.me.myapp.and1.Main)
And2 (the Android2.x-only code, creates a never-deployed subclass of
com.me.myapp.Main called com.me.myapp.and2.Main)
Free1 (creates an empty subclass of com.me.myapp.and1.Main called
com.me.myapp.free1.Main)
Paid1 (creates an empty subclass of com.me.myapp.and1.Main called
com.me.myapp.paid1.Main)
Free2 (creates an empty subclass of com.me.myapp.and2.Main called
com.me.myapp.free2.Main)
Paid2 (creates an empty subclass of com.me.myapp.and2.Main called
com.me.myapp.paid2.Main)

I am content to keep the res folders all synlinks to Core/res for
now.
But HOW do I set it up so that the 4 distributable projects build and
include all the Dalvik-compatible class files generated by underlying
projects?

For instance:  And1 will subclass and call methods on things in Core
-- should the And1 project require the Core project?  Should the
And1 project add the Core project's bin folder as an external class
folder?.  Should it export the Core project?  Should it export the
Core bin folder (if it is added as an external class folder?)

The same sorts of questions arise for Free1 and its treatment of Core
and And1.

Any help is appreciated.

Tony


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

2010-05-06 Thread DulcetTone
Why does this not work?  Pressing the GUI button representing the
hardware camera button seems to indicate that the feature is disabled,
and the advertised keyboard shortcut for simulating its press (control
+F3) does nothing at all.

tone

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

2010-04-22 Thread DulcetTone
Is there a way to call startActivity(Intent) without the newly started
activity displacing the current one as the active, foreground
activity?

If not purely so, are there near approximation to this effect that can
be done, such as mimicking a back keypress event right after calling
startActivity()?  If so, which means is preferred?

Thanks in advance.

tone


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


[android-developers] Re: One view displays multiple canvas, back button doesn't work.

2010-04-07 Thread DulcetTone
You must call super.onKeyDown(int kc, KeyEvent event) when appropriate
to derive the back behavior.

tone

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

2010-04-07 Thread DulcetTone


On Mar 23, 1:41 pm, Yahel kaye...@gmail.com wrote:


 add a comments system to the reference pages

 That's what they did in the PHP documentation and it is pure gold.
 Examples, implementations, work around, bug reportsVery often way
 more instructive than the actual content of the official
 documentation.


I actually find the PHP implementation suggestive of a far better
synthesis -- the piece that is missing from it is a regular review of
these comments by someone with editorial privileges that applies the
pertinent lessons into the a new revision of article being commented
on.

Documentation should be improved by user comments, not merely become a
discussion board of its many faults.  That will help keep fruitful
reading as brief as possible.

tone

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Contacts from 1.5 and 1.6 ... filtering out trash

2010-04-04 Thread DulcetTone
Dmitri, thanks for this.  You might be right-- the user indicated an
HTC app (not Android, per se) did this sync for him.  I think I may
offer an option for including ALL contacts with a simple textual
filter on their display name in an effort to weed out the filth.  This
alternative mode would support people like this guy, I hope.

tone


On Apr 3, 5:21 pm, Dmitri Plotnikov dplotni...@google.com wrote:
 Hi Tone,

 This was before my time, but I think you are doing it right.  As far as I
 remember, Android 1.5/6 did not support any kind of integration with
 Outlook.  Whatever mechanism was used to import the Outlook contacts must
 have messed them up.  On Android 1.5/6, when you were adding a contact, you
 were supposed to add it to the MyContacts group explicitly.  So reading the
 MyContacts group should give you all _correctly_ imported contacts and
 filter out those automatically added by Gmail.

 Cheers,
 - Dmitri

 On Sat, Apr 3, 2010 at 1:03 PM, DulcetTone dulcett...@gmail.com wrote:
  I am using this in Android 1.x:

         final String[] proj = new String[] {
            Contacts.People._ID,
             Contacts.People.STARRED,
            Contacts.People.NAME
            };

         final String selection = null;
         Uri uri = Uri.parse(content://contacts/groups/system_id/
                      + Groups.GROUP_MY_CONTACTS + /members);

         Cursor people = context.getContentResolver().query(
                  uri,
                  proj,
                 selection,
                 null,
                 Contacts.People.DEFAULT_SORT_ORDER);

  and people who have contacts imported from Outlook are missing those
  contacts.

  Why is this so under-documented, with access provided through textual
  URIs and database calls?

  Can someone show me a definitive code blurb that gets all the contacts
  in the Android contact panel and NOT those crufty pretend contacts?

  Thanks in advance.

  tone

  On Feb 25, 1:49 am, Dmitri Plotnikov dplotni...@google.com wrote:
   I believe the system group my contacts was used for that purpose.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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

  To unsubscribe, reply using remove me as the subject.



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

2010-04-04 Thread DulcetTone
Ok... it's ugly.  Indeed, this was one of the things I found difficult
to do in the same manner in Android 1.x and Android 2.x

I actually found it difficult to have one app exercise both these
interfaces, one of the several reasons I wish I had a separate app for
1.x vs 2.x  -- if you've not yet made a final choice there, split them
up and you will be happier.



In Android 1.x, this will do it, cribbed and reduced from Android
source.
I had to bring over a considerable portion of android.bluetooth to get
this working.

You would call the static enable() function to do it:


import android.bluetooth.BluetoothDevice;
import android.content.Context;

public class LocalBluetoothManager {

private static LocalBluetoothManager sSingleton;
/** Used when obtaining a reference to the singleton instance. */
private static Object INSTANCE_LOCK = new Object();

private boolean mInitialized;
private BluetoothDevice mManager;



public static boolean enable(Context context, boolean b) {


synchronized (INSTANCE_LOCK) {
if (sSingleton == null) {
sSingleton = new LocalBluetoothManager();
}

if (!sSingleton.init(context)) {
return false;
}
return b ? sSingleton.mManager.enable() :
sSingleton.mManager.disable();
}

}


private boolean init(Context context) {
if (mInitialized) return true;
mInitialized = true;

mManager = (BluetoothDevice)
context.getSystemService(bluetooth); //
Context.BLUETOOTH_SERVICE);
if (mManager == null) {
return false;
}

return true;
}

}


In Android 2.x, it is simpler:

import android.bluetooth.BluetoothAdapter;
BluetoothAdapter adapt = BluetoothAdapter.getDefaultAdapter();
adapt.enable(); // or adapt.disable();

You MAY need to have these permissions in your manifest:


uses-permission android:name=android.permission.BLUETOOTH /
uses-permission
android:name=android.permission.BLUETOOTH_ADMIN /

Make sure you test on both Android 1.x and 2.x before going to Market.

tone

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

2010-04-03 Thread DulcetTone
I am using this in Android 1.x:


final String[] proj = new String[] {
   Contacts.People._ID,
   Contacts.People.STARRED,
   Contacts.People.NAME
   };

final String selection = null;
Uri uri = Uri.parse(content://contacts/groups/system_id/
 + Groups.GROUP_MY_CONTACTS + /members);

Cursor people = context.getContentResolver().query(
uri,
proj,
selection,
null,
Contacts.People.DEFAULT_SORT_ORDER);


and people who have contacts imported from Outlook are missing those
contacts.

Why is this so under-documented, with access provided through textual
URIs and database calls?

Can someone show me a definitive code blurb that gets all the contacts
in the Android contact panel and NOT those crufty pretend contacts?

Thanks in advance.

tone


On Feb 25, 1:49 am, Dmitri Plotnikov dplotni...@google.com wrote:
 I believe the system group my contacts was used for that purpose.


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Problem launching my own (camera) application on press of Camera-button (part 2)

2010-03-21 Thread DulcetTone
I am trying the same thing, and failing as you are to use
abortBroadcast() to avoid having Camera launch.

One thing you should note:  999 is apparently the highest priority a
non-system app should use on its intent filters.  However, 999 did not
help me get there before Camera (apparently).

I will note that Button Shortcut apparently does this successfully.  I
wonder if Button Shortcut is alphabetically less than Camera.  My
app it alphabetically greater.

Are you sure that this is an unordered broadcast?

tone

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

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


[android-developers] Re: Problem launching my own (camera) application on press of Camera-button (part 2)

2010-03-21 Thread DulcetTone
I looked at the source code for Android, and the only place I see this
Intent sent, it is indeed sent as ordered.

It's perplexing why the camera button is handled so clumsily in the
code, with apps vying for priority, and you better pray any asking
for a higher one than you offer the user a preference to NOT use the
camera button.  And even then, the app coders and user have to
implement and use (respectively) these preferences.  By contrast, the
apps wanting to launch from the Call button just sign up for it, and
the user enjoys a natural drive-by management of who will get the
sticky binding.

Way Hard for all vs Way Easy for all, respectively.

I do not know why this is not working for us.  It seems to work for
Button Shortcut.

tone


On Mar 21, 10:32 pm, Streets Of Boston flyingdutc...@gmail.com
wrote:
 I think it's un-ordered, since abortBroadcast() is called, when i
 debug my app, but it doesn't abort anything.

 Since my code is reached (i.e. no abortion by the default camera app
 earlier) and my app's call to abortBroadcast doesn't help (default
 camera still starting up), i'm assuming it's an un-ordered broadcast.

 I gave up on this and just do not implement the 'Camera' key.

 On Mar 21, 5:07 pm, DulcetTone dulcett...@gmail.com wrote:

  I am trying the same thing, and failing as you are to use
  abortBroadcast() to avoid having Camera launch.

  One thing you should note:  999 is apparently the highest priority a
  non-system app should use on its intent filters.  However, 999 did not
  help me get there before Camera (apparently).

  I will note that Button Shortcut apparently does this successfully.  I
  wonder if Button Shortcut is alphabetically less than Camera.  My
  app it alphabetically greater.

  Are you sure that this is an unordered broadcast?

  tone



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

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


[android-developers] Re: Unit Testing : Who uses it ?

2010-03-11 Thread DulcetTone
I routinely find a disproportionate number of my bugs and crashes
reside in the code set up for the purpose of testing and evaluation of
the program rather in the function of the program itself.

I'm sure this is a measure of my unfamiliarity with best practices,
but I find it more beneficial to try to write crash-detection-and-
reporting code rather than explore testing.  That said, I am not
inspired to look at junit.org

tone

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


[android-developers] ACTION_USER_PRESENT ... what of reverse condition?

2010-03-02 Thread DulcetTone
The broadcast action Intent.USER_PRESENT tells me when the keyguard is
released, but what of the opposite transition?

How can I find when the keyguard is activated?

tone

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


[android-developers] Contacts from 1.5 and 1.6 ... filtering out trash

2010-02-24 Thread DulcetTone
I am trying to write a clean bit of code that can list the people in a
1.5/1.6 Contacts data store, and I do not see how I filter out the
cruft that Google throws in (ad hoc contacts literally addressed by
other apps and stored, for some reason, in the contact list without a
clear means of discerning them from the real people the user cared to
enter -- the ones that would appear in the contacts app)

I see that in 2.0 or so, IN_VISIBLE_GROUP is added as a field which
seems to differentiate these versions, but what existed to accomplish
this before that time?

Here is my code which works in 2.x and fails to keep the chaff out in
1.x, as the selection parameter is unsupported:

final String[] proj = new String[] {
   Contacts.People._ID,
   Contacts.People.NAME
   };

final String selection =
Build.VERSION.SDK_INT  5 ?  null :
ContactsContract.Contacts.IN_VISIBLE_GROUP + =1;

Cursor people = context.getContentResolver().query(
Contacts.People.CONTENT_URI,
proj,
selection,
null,
Contacts.People.DEFAULT_SORT_ORDER);

if (people != null) {
final int personIdColumn = people

.getColumnIndexOrThrow(Contacts.People._ID);
final int nameColumn = people

.getColumnIndexOrThrow(Contacts.People.NAME);


while (people.moveToNext()) {

if (Thread.interrupted()) {
people.close();
outputList.clear();
throw new InterruptedException();
}

long personId = people.getLong(personIdColumn);
String name = people.getString(nameColumn);

if (name != null) {
outputList.add(new Contact(personId, 
name));
}

}

// clean up cursor
people.close();
}

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


[android-developers] my EditText is an attention whore

2010-02-17 Thread DulcetTone
I have a ScrollView which features a variety of widgets --
ProgressBars, Spinners and Checkboxes and a single EditText way down
at the bottom.

If I am at the top of the ScrollView with the EditText scrolled way
off the bottom, touching and changing a ProgressBar at the top causes
the ScrollView to jerk all the way to the bottom to proudly show me
the EditText with a blinking cursor at the end of it. Toggling a
checkbox does not do this.

Why would this be?

I have no funky code around the EditText and do not try to alter it
programmatically after the context view is set.

The EditText is defined in XML as

EditText
android:id=@+id/my_edittext
android:layout_marginBottom=6dip
android:maxLength=6
android:minEms=4
android:inputType=phone
android:singleLine=true
android:textColor=#00
android:layout_width=wrap_content
android:layout_height=wrap_content/

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

2010-02-17 Thread DulcetTone
More information:  this appears only to happen if I first scroll down
to reveal the EditText.
I notice that as I scroll the view by touch-drag, the EditText is
grabbing the focus as it breezes past (a behavior I could do without,
I suppose ... I'd be happy to insist on directly clicking on it.

I am guessing this is some adverse issue of focus, a feature I have so
far not had to directly consider.

tone

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

2010-02-14 Thread DulcetTone
Ok, I definitely do not see how to make this work.
I don't grasp how the wrapping method here in any way spares the 1.5
runtime environment from having references to text-to-speech things.

A 1.5 user tried my test build and gets a force close.  I redoubled my
efforts to manually select a 1.5 emulation target, and if my
dependency is 1.6 and minSdk=3, it will not show my 1.5 target.  If I
compile against 1.6 and then try to trick Eclipse by changing it to
1.5 before invoking the debug upon my 1.5 target.  Then, it realizes
the trick and balks.

I am rapidly realizing that I should have separate products for 1.5
and earlier and one for 1.6 and later.  That would be an ugly upgrade
transition, as I have taken money from all users for a common build.

tone

On Feb 4, 9:09 am, Eric Carman ewcarma...@gmail.com wrote:
 Hello Tone,

 You definitely have to target the 1.6 (or greater) platform for this
 to compile.

 I remember having trouble getting the debugger to attach to the 1.5
 emulator. I don't remember if I was able to do that or if I relied on
 Toast/log messages to zero in on my 1.5 specific issues. I'm not near
 the proper computer now to test it out. I vaguely recall having to
 make sure the 1.5 emulator was the only one running and I had to start
 it explicitly before running the application - not sure why that
 mattered, but...

 All of this may depend on what version of the SDK you have installed
 (1.6, 2.0, ...). Currently I have installed v2.0.

 HTH

 Best Regards,
 Eric

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

2010-02-14 Thread DulcetTone
Of course, 2 minutes after posting this, I see the twisted path of how
to specify the 1.5 target.
I get, however, an exception (VerifyError) on a call to my TTS
wrapper.  I think this might be because I modified the nature of this
slightly, and in a way that alters the delicate balance of the
example.

Let me tweak it back and fuss a bit more.  Your claims of success
inspire me to see what I might have done wrong.

tone


On Feb 14, 11:06 am, DulcetTone dulcett...@gmail.com wrote:
 Ok, I definitely do not see how to make this work.
 I don't grasp how the wrapping method here in any way spares the 1.5
 runtime environment from having references to text-to-speech things.

 A 1.5 user tried my test build and gets a force close.  I redoubled my
 efforts to manually select a 1.5 emulation target, and if my
 dependency is 1.6 and minSdk=3, it will not show my 1.5 target.  If I
 compile against 1.6 and then try to trick Eclipse by changing it to
 1.5 before invoking the debug upon my 1.5 target.  Then, it realizes
 the trick and balks.

 I am rapidly realizing that I should have separate products for 1.5
 and earlier and one for 1.6 and later.  That would be an ugly upgrade
 transition, as I have taken money from all users for a common build.

 tone

 On Feb 4, 9:09 am, Eric Carman ewcarma...@gmail.com wrote:

  Hello Tone,

  You definitely have to target the 1.6 (or greater) platform for this
  to compile.

  I remember having trouble getting the debugger to attach to the 1.5
  emulator. I don't remember if I was able to do that or if I relied on
  Toast/log messages to zero in on my 1.5 specific issues. I'm not near
  the proper computer now to test it out. I vaguely recall having to
  make sure the 1.5 emulator was the only one running and I had to start
  it explicitly before running the application - not sure why that
  mattered, but...

  All of this may depend on what version of the SDK you have installed
  (1.6, 2.0, ...). Currently I have installed v2.0.

  HTH

  Best Regards,
  Eric



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

2010-02-14 Thread DulcetTone
I think I got it working.  Thanks for the direction.

My mistake had been moving the boolean that reflected the availability
of the TTS function INTO my wrapper class (where code design sort of
suggests it would like to be)  and this would cause me VerifyError
exceptions.  So there was indeed a method to the madness of keeping it
outside.


tone

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

2010-01-29 Thread DulcetTone
I don't see how one is supposed to compile this without targetting
1.6, and if one targets 1.6, how does one get it to run on a 1.5
device?

I have minSdk=3 but my Eclipse projects don't want to compile WrapTTS
without replacing my Android 1.5 dependency with Android 1.6   Once I
do that, I can start a 1.5 emulator and the debugger will not target
it.

Ideas?

tone

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: trying to launch Android 2's Gallery .. security exception

2010-01-27 Thread DulcetTone
Understood.  I'm trying to invoke this class because it was
programmatically found to exist previously.


On Jan 23, 5:57 pm, dan raaka danra...@gmail.com wrote:
 on the tangential topic ..
 it is harmful to assume that the classname you are using will exist on ALL
 andorid devices.

 -Dan


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

2010-01-27 Thread DulcetTone
Many thanks.

tone

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


[android-developers] uses-library

2010-01-25 Thread DulcetTone
I have an app that includes this code blurb:

System.loadLibrary(foo_jni);

Where the functionality in foo_jni is in the OSP under external/foo

However, there is no uses-library tag in my app's AndroidManifest.xml

I suspect that some crashes reported from the field is from phones
that lack this android system library.  My aspiration here is that I
add a uses-library tag to my file and that this might keep people who
flat-out lack this library from downloading or at least installing my
app, which has zero chances of working on their phone,

However...

The (extremely limited) documentation for uses-library implies the
libraries have package-y names such as com.foo.mylib ... which seems
to disagree with the name used in the Java code I am looking at.

How do I guess at the string to use here, or is my effort to worry
about this not going to help 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


[android-developers] How to factor code for Free/Paid app versions?

2010-01-19 Thread DulcetTone
I have a project which I want to split into a paid and a free version.

I do not care to double my management of the res/ folder and would
even like the AndroidManifest.xml to be the same file except for the
package line.   Worrying little about hacking (at this stage -- my app
is not copyprotected anyhow so other avenues of vulnerability are
already open), it might be sufficient for me to have all the logic in
the free app, and to enable/disable functions based on the app's own
package info.

What strategies have others used in this regard?

I have soft-linked the source from a new Android Eclipse project
folder tree to the existing one (the new is to become the paid version
and the old one will become the free one with some logic paths being
conditionally stubbed at runtime), reserving the new source file
hierarchy in the new one to the sole purpose of containing an
MyMainActivity.java file (as it will need to be in a different package-
folder than the one for the free app's).   But the res folder appears
as though it might be more difficult.

Ideas?

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

[android-developers] driving a Service through a versioned interface

2010-01-10 Thread DulcetTone
How is an app supposed to be able to use an underlying service whose
name does not change, but whose AIDL file has changed from one Android
version to another?

The only way I can guess at it allows me to start the remote service
just fine, but it gives me a security exception when I try to use the
interface, as the name of the AIDL file and its interface has
changed.  Here is the method I tried.

Suppose the interface file is com/android/IFoo.aidl and in Android 2.x
it has been changed in an incompatible way.

I tried copying it to com/android/IFoo2.aidl and renaming the
interface within the file.

In startService(), I connect it to the same service name:

public boolean bindToService(
ServiceConnection callback) {

final String CLASS_NAME = Foo;
final String PACKAGE = com.android;

ComponentName cn =  sActivity.startService(
(new Intent()).setClassName(PACKAGE, PACKAGE + 
. +
CLASS_NAME));

if (cn == null) {
Log.d(TAG, failed to startService());
}

ServiceBinder sb = new ServiceBinder(callback);
sConnectionMap.put(sActivity, sb);
return sActivity.bindService((new Intent()).setClassName
(PACKAGE,
PACKAGE + . + CLASS_NAME), sb, 0);
}

in onServiceConnected(), I assign it to sService =
com.android.IFoo2.Stub.asInterface(service);

private static class ServiceBinder implements ServiceConnection {
ServiceConnection mCallback;
ServiceBinder(ServiceConnection callback) {
mCallback = callback;
}

public void onServiceConnected(ComponentName className,
android.os.IBinder service) {
sService = com.android.IFoo2.Stub.asInterface(service);

if (mCallback != null) {
mCallback.onServiceConnected(className, service);
}
}

public void onServiceDisconnected(ComponentName className) {
if (mCallback != null) {
mCallback.onServiceDisconnected(className);
}
sService = null;
}
}


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

[android-developers] Re: driving a Service through a versioned interface

2010-01-10 Thread DulcetTone
I agree Mark.  But here, I have no means to alter the service and
cannot do as you suggest.

The only alternatives that occur to me are:

1.  I write a separate service  (deployed in a separate package...
installed separately?  yuck) that wraps one of the two underlying
services to offer my app two separate interfaces
2.  offer a second version of my product for the higher mark SDK
levels with the dissimilar service interface

Are there other options that occur to you?

tone

On Jan 10, 8:05 am, Mark Murphy mmur...@commonsware.com wrote:
 DulcetTone wrote:
  How is an app supposed to be able to use an underlying service whose
  name does not change, but whose AIDL file has changed from one Android
  version to another?

 IMHO, ideally the service uses a different intent filter per version of
 AIDL it supports, and you bind to the service with the appropriate Intent.

 For example:

 service android:name=.BshService
         intent-filter
                 action 
 android:name=com.commonsware.android.advservice.IScript /
         /intent-filter
         intent-filter
                 action 
 android:name=com.commonsware.android.advservice.IScript2 /
         /intent-filter
 /service

 where in onBind(), BshService would inspect the incoming Intent, look at
 the action, and return an appropriate binder.

 Of course, each binder will need separate AIDL, defining a separate
 interface, as you noted.

 This way, the service supports both old and new clients, and old clients
 can be ignorant of the existence of the new interface.

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

2010-01-10 Thread DulcetTone
Here is more detail:

my app uses a small subset of Android's MediaPlaybackService (which
underlies its Music app)

The problem is that the AIDL for some of the few functions I use have
changed from Android 1.x to 2.x

Therefore no single com.android.music.IMediaPlaybackService.aidl file
will be compatible with the service on both 1.x and 2.x platforms.
And, the security system for mapping interfaces objects if I rename
the 2.x compatible AIDL to (say)
com.android.music.IMediaPlaybackService2.aidl.  I presume it would
also object if I moved this interface to another package (I should try
that before moving on the path I think I am being forced toward).

Since I cannot alter either version of the service, I feel I am stuck
with a situation where a single interface file in my project must be
two different versions, which it cannot.

The workaround I have been thinking of is that I will keep my app so
it can interface to Android 1.x's MediaPlayerService via the existing
(working) interface, and have 2.x users download an additional package
embodying a service of my own creation which serves as a front-end to
Android 2.x's MediaPlayerService.  As this service will have a
different name and I can write its interface entirely, my app will
have its liberty to use it as a proxy for the underlying Android code.

The other approach is simply to have a 2.x version of my app that
replaces the 1.x AIDL with the 2.x AIDL.  To me, that seems uglier.

tone

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

[android-developers] MediaPlayer ... a nest of undocumented pitfalls

2010-01-06 Thread DulcetTone
I use MediaPlayers in the most basic way possible, and yet it either
works or not and there is no means to troubleshoot.

I am trying to play a .wav file in my app's own filespace.
It just won't do it.  I try variation upon variation.
I suspect that the MediaPlayer boasts only a limited set of WAV file
formats that it can play, but where do I turn to find that, and will
it vary by phone model?

File file = new File(fname);
long siz = file.length();
boolean readable = file.canRead();

// this shows that the file is readable and sized around 60K
// it is a mono 16 bit PCM WAV at 11,025 sample rate
Log.d(TAG, file is readable= + readable + , size= + siz);
Uri uri = Uri.fromFile(file);

// this create() returns NULL
// the following hard-to-find error is printed:
/*
01-06 18:05:02.257: ERROR/PlayerDriver(51): Command
PLAYER_SET_DATA_SOURCE completed with an error or info
PVMFErrNotSupported
01-06 18:05:02.257: ERROR/MediaPlayer(1917): error (1, -4)
*/

MediaPlayer mp = MediaPlayer.create(getBaseContext(), uri);
mp.start();

This is the code that generated the file:

ByteArrayOutputStream baos; // this is what stores raw audio data to
be written out
   try {
OutputStream out = new FileOutputStream(fname);
try {
byte[] pcm = baos.toByteArray();
WaveHeader hdr = new WaveHeader(WaveHeader.FORMAT_PCM,
(short)1, mSampleRate, (short)16, pcm.length);
hdr.write(out);
out.write(pcm);
}  finally {
out.close();
}

} finally {
baos.close();
}
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Cannot play audio on some phones

2010-01-03 Thread DulcetTone
I have no idea.  This can't happen on my phone.
Should I be calling create(myActivity, id) or create
(myActivity.getBaseContext(), id)?

I don't know why I ask -- neither form seems to solve the problem on
at some (not all) of these Hero phones.  I am coming to really despise
Hero/Eris.

tone

On Dec 30 2009, 4:21 pm, Mark Murphy mmur...@commonsware.com wrote:

 What does your log show, particularly at warning level, when you call
 get null from create()?

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

2010-01-02 Thread DulcetTone

I'd think checking Build.MANUFACTURER case-insensitively for Sony
should tell your app if such a phone is in use.

tone

On Jan 1, 11:58 am, karthikr karthik.scintill...@gmail.com wrote:
 Hi Guys,

 I am planning to submit my application in sony app market.

 Is there anything that I can do to make sure that my application is
 not backed up and pirated from the phone?

 Or is there an alternate way to make sure that my app runs only on
 sony 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] Inserting new Calendar event using installed app

2009-12-30 Thread DulcetTone
I want to provide the user with a shortcut to creating a new calendar
event, leaving him at whatever Activity would ordinarily be used to do
this (com.android.calendar.EditEvent in Android devices other than the
Hero).

I have code (see below) that works, in a fragile manner, by directly
handing the control to EditEvent, but this does not work on the Hero
devices nor would it be a great means of doing so for users who had a
fancy 3rd party calendar app that they preferred to Android's
Calendar.

How should I consider doing this?
Should I try to just

1.  create an event by directly manipulating the database and then
2.  startActivity(ACTION_EDIT, uri_of_handcrafted_event)?

or should I simply write my own minimal event-view activity to use in
lieu of step 2?

I'm disappointed to see that Calendar provider is considered less
fundamental to the platform that the Contact provider.  Is it likely
to gain ground soon?  I'd really like to see Intents deliver on the
don't re-invent the wheel promise I thought inspired them.

Intent insertCalendarEvent(String title, long begin, long end,
String description) {
Intent intent = new Intent(Intent.ACTION_INSERT) ;
intent.setClassName
(com.android.calendar,com.android.calendar.EditEvent);
intent.putExtra(beginTime, begin);
intent.putExtra(endTime, end);
if (title != null)
intent.putExtra(title, title);
if (description!= null)
intent.putExtra(description, description);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

return intent;
}

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] Cannot play audio on some phones

2009-12-30 Thread DulcetTone
I am vexed by the variety of ways various phones can choose or choose
not to play an MP3 file I have in my app as a raw asset.

My preferred way to do this:
MediaPlayer mp = MediaPlayer.create(this, resId);

returns NULL on HTC Hero, and seemingly some Erises.

So when THAT happens, I do

mp = new MediaPlayer();

// copies the resource to a file with suffix .mp3
String fname = copyResourceToFile(resId, .mp3);
mp.setDataSource(fname);
mp.prepare();

But, in one case at least on an Eris, I still saw a machine report an
IOException on mp.prepare(), with status 0x01

Is there some way I can get this to just work?


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


[android-developers] RIGHT way to kickstart composing a new Calendar event?

2009-12-24 Thread DulcetTone
My app wants to whisk the user to the create new event composition
window of his Calendar app, initializing begin time, end time, title
and description text for the event, but then leaving him able to see
these values and optionally alter them before saving (or discarding)
the event using the oridinary means available to him from within the
Calendar's create new event activity.

HOWEVER...

My code which works dandy on my own dev phone (indeed, on any phone
running stock Android Calendar to the bone) fails on the HTC Hero.
The issue is that the Hero has been improved by use of a non-
standard Calendar app and my means of doing this is therefore failing.

I wonder if someone can outline a more generic means I can use to say
tell whatever the user's preferred Calendar app is to create a new
event, seeding the effort with these key/value pairs.

Here is my present code:

Intent intent = new Intent(Intent.ACTION_INSERT) ;

// the HTC anti-Hero does not have a class named
com.android.calendar.EditEvent :(
intent.setClassName
(com.android.calendar,com.android.calendar.EditEvent);

intent.putExtra(beginTime, calObject.getTimeInMillis());
// make it 15 minutes duration
intent.putExtra(endTime, calObject.getTimeInMillis() + (1000 * 60 *
15));

intent.putExtra(title, dentist appointment);
intent.putExtra(description, this would be the additional text
describing the event);


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


[android-developers] Why is LABEL an invalid column for a ContactMethod?

2009-12-17 Thread DulcetTone
I am having a bear of a time figuring out what colums exist for email
contact methods.  Specifically, I want to find out the home, work
or other of an email address.

I have tried looking for it under integer TYPE (illegal column), and
under Strings LABEL (illegal column) and NAME (this works, but it
is the owner/person's name, not the name of the email address).

Is there a place where these schemas (as they are actually used) is
documented well?  the Javadocs seem to mislead me.

// try to find email addresses for person with ID == personId

  Cursor cursor = activity.getContentResolver().query(
Contacts.ContactMethods.CONTENT_EMAIL_URI,
new String[] { Contacts.ContactMethods.TYPE,
Contacts.ContactMethods.DATA },
Contacts.ContactMethods.PERSON_ID + =  +
personId,
null,
null);

if (cursor.getCount() = 1) {

int labelCol = cursor.getColumnIndexOrThrow
(Contacts.ContactMethods.TYPE);
int addressCol = cursor.getColumnIndexOrThrow
(Contacts.ContactMethods.DATA);

cursor.moveToFirst();
do {
String email = cursor.getString(addressCol);
//String label = cursor.getString(labelCol);
int label = cursor.getInt(labelCol);

if (Config.DEBUG) Log.d(TAG, address for email
is  + email);

if (email != null  email.length()  0) {
intent = new Intent(Intent.ACTION_SENDTO,
Uri.parse(mailto://; + email));


intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
addIntent(intents, intent, literal, 
false, score);
}
} while (cursor.moveToNext());
}
cursor.close();

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Why is LABEL an invalid column for a ContactMethod?

2009-12-17 Thread DulcetTone
I should state that this is on 1.6

The errors look like so (when trying TYPE or LABEL -- the word type
actually reflects the column that fails):
12-17 16:19:43.877: ERROR/DatabaseUtils(131):
java.lang.IllegalArgumentException: Invalid column type
12-17 16:19:43.877: ERROR/DatabaseUtils(131): at
android.database.sqlite.SQLiteQueryBuilder.computeProjection
(SQLiteQueryBuilder.java:505)

tone

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


[android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-12-17 Thread DulcetTone
Mark, did you finish this and post it somewhere?
How do I look for it?

I am enjoying my warescription, by the way.  I will look for a
feedback link on your site, as I have some.

tone

On Nov 26, 7:42 am, Mark Murphy mmur...@commonsware.com wrote:

 This is a fragment of a sample that I'll be uploading to github tomorrow
 sometime (I hope). NewContactsAdapterBridge uses ContactsContract;
 OldContactsAdapterBridge uses Contacts. So long as you don't try
 *loading* a class that uses 2.0 APIs, you won't get a VerifyError. The
 2.0-referencing class can still be in the APK, though.


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


[android-developers] Re: How to get all contact's name phone number, email for 2.0

2009-12-17 Thread DulcetTone
oops... did a little looking.
I guess you're going to be commonsguy.

tone

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


[android-developers] Re: Can an Activity pause() rather than finish()?

2009-12-01 Thread DulcetTone
Dianne, your answers are often just the spur I need.

I already had the data in such a place (a static list), and was under
the misapprehension that when a root activity of an app went away, the
app's entire process was cleaned up.  This will work fine for me, but
I will now want to spend some time slimming down the data to the
minimum so I am not a drag on the system.

I think I need to read more documentation to understand the life cycle
here.

tone

On Nov 30, 2:59 pm, Dianne Hackborn hack...@android.com wrote:
 Put these data structures in globals that you can retrieve, if they exist,
 each time the activity starts.  You just need to make sure they are not
 referencing the Activity or its underlying Context objects.



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


[android-developers] Can an Activity pause() rather than finish()?

2009-11-30 Thread DulcetTone
I see no means by which my activity can pop itself off the activity
stack to return the user to the one he was using before it was
invoked.  Is there one?

My purpose is that my app has some data structures built from data
provider queries that take 5-15 seconds to assemble and I don't want a
lot of latency if it is used in a few one-shot purposes in rapid
succession.  I'm more than willing to let the system ask my app to
die, but I'd like to keep warmed and ready otherwise.

Thanks in advance.

tone

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


[android-developers] Querying Media Artists, coming up 1 short

2009-11-19 Thread DulcetTone
I have a the following code which aims to get the names of the music
artists on the external media that came with my T-Mobile MyTouch3G.
The Music app shows 6 songs which apparently come with the phone -- 2
each from 3 artists (Jennifer Hudson, Sara Bareilles, and Britney
Spears), but my code seems to miss Britney.  Is this a case of Android
LEAVING BRITNEY ALONE!!!, or am I doing something wrong?

tone

-
String[] proj = new String[] {
MediaStore.Audio.Artists._ID,
MediaStore.Audio.Artists.ARTIST
};

Cursor cursor = activity.getContentResolver().query(
MediaStore.Audio.Artists.EXTERNAL_CONTENT_URI,
proj,
, null,
MediaStore.Audio.Artists.DEFAULT_SORT_ORDER);

final int nameColumn = cursor.getColumnIndexOrThrow
(MediaStore.Audio.Artists.ARTIST);
final int artistIdColumn = cursor.getColumnIndexOrThrow
(MediaStore.Audio.Artists._ID);

String name = null;
long artistId = ID_UNDEFINED;

// loop over table
cursor.moveToFirst();
while (cursor.moveToNext()) {
name = cursor.getString(nameColumn);
artistId = cursor.getLong(artistIdColumn);

Log.d(TAG, artist= + name
+  id= + artistId
);

}

// clean up cursor
cursor.close();

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


[android-developers] my custom Parcelable jams on cross-process read

2008-12-09 Thread DulcetTone

using SDK r1

I have a Parcelable I am passing successfully in an AIDL call from a
Service to the Activity that launched the Service, but which jams on
the first parcel.readString() through the same AIDL call to a
different Activity.

Here is my interface's AIDL:


package com.me;

import com.me.MyParcelable;

oneway interface IMyCallbackInterface {
void localInput(in MyParcelable p);
}
---

Here are the boilerplate elements of MyParcelable:


private MyParcelable(Parcel in) {

G.debug(read has size  + in.dataSize() + , avail is  +
in.dataAvail());

mString = in.readString();

G.debug(read string ' + s + ');

G.debug(read has leftover  + in.dataAvail());
   }


public void writeToParcel(Parcel out, int flags) {

G.debug(write string ' + mString + ' into parcel that 
already has
 + out.dataSize());

out.writeString(mString);

G.debug(wrote  + out.dataSize());
   }


In the first case, where a Service calls localInput() to the Activity
that launched it, I get the following debug output and sane operation:

12-09 01:11:58.246: INFO/System.out(1054): write string '' into parcel
that already has 100
12-09 01:11:58.256: INFO/System.out(1054): wrote 108
12-09 01:11:58.266: INFO/System.out(1048): read has size 108, avail is
8
12-09 01:11:58.286: INFO/System.out(1048): read sender ''
12-09 01:11:58.286: INFO/System.out(1048): read has leftover 0

In the second case, where the same Service calls the function on an
Activity other than the one that launched it, I get the following
debug output, and the readString() apparently never fires off despite
the fact that there appears to be the same conditions -- 108 bytes of
data, and 8 available before the readString() is called.

12-09 01:16:15.416: INFO/System.out(1054): write string '' into parcel
that already has 100
12-09 01:16:15.416: INFO/System.out(1054): wrote 108
12-09 01:16:15.566: INFO/System.out(1091): read has size 108, avail is
8
 program seems to wedge here... no further output from my code
results

Obviously, my question is:  why is this not working?

I am going to try changing the interface from a oneway to a general
one.  I'm stumped, otherwise.

Thanks in advance for any insights.

tone

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Re: my custom Parcelable jams on cross-process read

2008-12-09 Thread DulcetTone

Further information:  I am able to call functions across this same
boundary that merely pass a String and cause it to print on the remote
side.

Still puzzling on it.  :/

tone



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] AIDL callback interface from Service to Activity oddity

2008-12-08 Thread DulcetTone

I have 2 activities (call them 1 and 2), Activity 1 includes a
Service.

If the Service tries to make an AIDL call to Activity 1, the call
works fine.

If, however, the Service tries the same AIDL call to Activity 2 (the
remote activity), it never arrives for processing at the remote
activity.  No RemoteException is triggered during the call from the
Service, either.

Is there anything magic I must do to make an AIDL interface work from
a Service to a remote Activity?

It bears mention that the remote Activity is easily making calls by a
separate AIDL interface to the Service.

tone

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] How to hand in a callback in AIDL?

2008-12-01 Thread DulcetTone

I have found it convenient to make AIDL interfaces in pairs -- one for
how the client calls the server, and one by which a server can call
back into the client.  However, I find that the design of the Proxy/
Stub model (which I confess I don't fully grasp) causes me issues in
the method I use to have a client identify itself.

I have calls in the server interface where the client hands in a
reference to its CLIENT interface (which is convenient, as they are
all Parcelable).  If the server ever decides it wants to call back to
the client, it simply calls methods on this interface.  HOWEVER...
each time an interface is handed in to the server, it arrives in
server space as a new stub -- there is no means by which they can be
compared against each other and so each client appears new and
distinct every time it calls a function on the server.

Is there any way I can see which of these interfaces are for the same
client, or do I have to code up my own Parcelable class that has a
unique hash of some kind?  For instance, do instances of the same
interface already HAVE a hash function on them that would return the
same value?

e,g.:  if I do this...

ServiceConnection serviceConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName name, IBinder 
service)
{
myService = 
IMyService.Stub.asInterface((IBinder)service);
try {
myService.registerClient(myClientInterface);

myService.doubleCheckThatClientHandle(myClientInterface);
} catch (RemoteException e) {
}
}

public void onServiceDisconnected(ComponentName name) {
myService = null;
}
};

and the server's implementation of registerClient() and
doubleCheckThatClientHandle() examine the client interface, there is
no way for it to easily see that the same client is being referred to.

I suppose the lightest weight fix might be for the service to return a
unique GUID when a client registers, and map them on its side.  The
client, in turn, could provide that GUID each time it wants to
identify itself on subsequent function calls.

I hope this makes sense.

tone

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Buildtime IllegalArgumentException: already added

2008-11-19 Thread DulcetTone

Using Eclipse, I get this extensive stack trace when trying to build a
project that uses an AIDL-defined interface which is defined in an
external JAR file.  What might I have done wrong?  Thanks in advance.

[2008-11-19 15:10:30 - My Project]
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/resounding/
android/IMyAppClient$Stub$Proxy;
[2008-11-19 15:10:30 - My Project]  at
com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:
123)
[2008-11-19 15:10:30 - My Project]  at
com.android.dx.dex.file.DexFile.add(DexFile.java:143)

... snipped out 20 or so levels

[2008-11-19 15:10:30 - My Project]  at
org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace
(WorkspaceAction.java:483)
[2008-11-19 15:10:30 - My Project]  at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run
(InternalWorkspaceJob.java:38)
[2008-11-19 15:10:30 - My Project]  at
org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
[2008-11-19 15:10:30 - My Project] 1 error; aborting
[2008-11-19 15:10:30 - My Project] Conversion to Dalvik format failed
with error 1


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



[android-developers] Re: Custom Parcelables in external JARs... how to get this working?

2008-11-08 Thread DulcetTone

If I understand you correctly, I think you're advising me to do what I
may have already tried:  copy MyCustomParcelable.aidl (which contains
only a package statement and a parcelable MyCustomParcelable
statement) into my second app's source tree.

I just tried it again, and that does not work.  It does not even work
if I copy over MyCustomParcelable.java

I'm at a bit of a loss, I think.  The aidl file copied over should be
at its proper (package-relevant) place in the directory hierarchy,
right?
I wonder if there is a bug caused by the fact that the custom
parcelable is not in the same package as the interfaces that are
trying to use it.

tone


On Nov 8, 2:03 am, hackbod [EMAIL PROTECTED] wrote:
 Well, you need to have the source .aidl file in the sources of the app
 that is using it, just like you have it in the library.  These don't
 work like Java files where you can link to the generated jar or
 whatever without the source; the source is needed for everyone that is
 compiling against it.

 On Nov 7, 9:02 pm, DulcetTone [EMAIL PROTECTED] wrote:

  Hi, hackbod.
  Can you be more explicit in this?

  tone

  On Nov 7, 11:53 pm, hackbod [EMAIL PROTECTED] wrote:

   You'll need to make the source .aidl files available for them to
   import.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Custom Parcelables in external JARs... how to get this working?

2008-11-07 Thread DulcetTone

I have a custom Parcelable which I have gotten working internally in
the project in which it is compiled.

That project is then exported as a JAR in Eclipse, and this JAR is in
turn referenced by another project which wants to pass the custom
Parcelable as a parameter in AIDL calls.

However, when interfaces try to use this, the import statement for the
custom parcelable in the interfaces' .aidl files show a little red no
go sign which a mouseover details as meaning couldn't find import
for class com.foo.MyCustomParcelable

Is the aidl not smart enough to look to find these items in the JAR
file the failing project uses externally?

How might I work around this?

tone


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Re: Custom Parcelables in external JARs... how to get this working?

2008-11-07 Thread DulcetTone

Hi, hackbod.
Can you be more explicit in this?

tone

On Nov 7, 11:53 pm, hackbod [EMAIL PROTECTED] wrote:
 You'll need to make the source .aidl files available for them to
 import.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] How to have 2 activities open in one Eclipse workspace?

2008-11-06 Thread DulcetTone

I have 3 projects:

Jarfile/   contains a bunch of Java classes that are put into a jar
Activity1/ contains an activity (and an AndroidManifest.xml)
Activity2/ contains a second activity  (and an AndroidManifest.xml)

When I try to build and debug Activity2, I get this error:

[2008-11-06 12:39:11 - Activity2] Error generating final archive:
duplicate entry: AndroidManifest.xml

Presumably, this is due to Activity1's xml file, but that is in
Activity1's directory tree, not Activity2's.

How am I to make this work?

tone


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] how to get AIDL to gen .java in Eclipse?

2008-11-03 Thread DulcetTone

trying to resolve an issue and I hurt myself:

I removed an AIDL file and synced the project.
I restored the AIDL file and synced the project.  The .java did not
get regenerated.  I did a build all.  Nothing.

How do I get Eclipse to do the right thing?

tone


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Inflate Exception... how to diagnose?

2008-10-19 Thread DulcetTone

I have an XML file that causes an inflate exception with no
discernible detail to help me diagnose what went wrong

What is the best way to get Android to offer details on what was
objectionable?

tone

FYI, here was the XML:

?xml version=1.0 encoding=utf-8?

RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=wrap_content
android:padding=10px

Spinner android:id=@+id/skin_name
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=false/

TextField android:id=@+id/ospeed_label
android:text=Output Speed
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/skin_name/

SeekBar android:id=@+id/ospeed
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_toRightOf=@id/ospeed_label/


CheckBox android:id=@+id/var_output
android:text=Do incoming VAR
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/ospeed/


TextField android:id=@+id/ispeed_label
android:text=Input Speed
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/var_output/

SeekBar android:id=@+id/ispeed
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_toRightOf=@id/ispeed_label/


Button android:id=@+id/ok
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/ispeed
android:layout_alignParentRight=true
android:layout_marginLeft=10px
android:text=OK /

Button android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_toLeftOf=@id/ok
android:layout_alignTop=@id/ok
android:text=Cancel /
/RelativeLayout


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] How to have multiple Android projects in one Eclipse Project?

2008-10-01 Thread DulcetTone

I have a tree of folders containing the source for a working Android
activity I hope to split into a Service and two Activities.

How do I accomplish this?  Can I simply add an AndroidManifest.xml to
each of 3 separate Java packages?

Thanks in advance.

tone


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Re: Adding audio files to res/raw fails to add them to R.java

2008-09-08 Thread DulcetTone

I see my error.  I moved my Activity after creating the project, and
there is a tug-of-war about where R.java belongs.
There is another one lurking around that IS being updated properly.  I
will work to bring the two together!

tone


On Sep 8, 8:03 pm, Mark Murphy [EMAIL PROTECTED] wrote:

 I can't speak specifically for Eclipse, but, generally, resources in
 res/raw/ will be accessed as R.raw., where  is the basename of the
 file (e.g., for res/raw/snicklefritz.mp3, you reference it as
 R.raw.snicklefritz).



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