[android-developers] binding to a service from a separate class

2010-09-14 Thread bagelboy
Hello Android Devs,

I've created a timer service (because I want the timer to accessible,
persistent, and run when the activity is not up), tested using a basic
front-end activity. The service and call backs all work fine, now what
I want to do is marry the service up to my timer view class. My timer
view class extends relativelayout. I have an activity which inflates
and adds the timer class to the view. What I'm trying to do is have
the class bind to the timer service and get updates via callbacks.

The problem I'm having is that bindService() is undefined, I think
this is because it's not part of the activity. If I pass the
constructor the activity context it does compile and run, however it
crashes every time. Plus, it's a bad idea to use context in this way.

The interface is 2-way, I send commands from the view to the service
and it sends timer and state updates back. I could use intents for
this, however that's clunky and wastes resources.

I could also have the activity itself bind to the service, but I'd
prefer to cut out the middleman.

How do I approach this problem?

-bb

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


[android-developers] Use shared preferences on non-app directory file

2010-12-13 Thread bagelboy
Shared Preferences is a handy tool, the only problem is that as far as
I can tell it only works on files in the app directory. Is there a way
to use shared preferences on a different directory? I've tried simply
putting a path in the file string but that crashes.

-BB

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


[android-developers] Re: Use shared preferences on non-app directory file

2010-12-14 Thread bagelboy
A user can clear app data, I want a file that is persistent

On Dec 13, 9:50 pm, TreKing  wrote:
> On Mon, Dec 13, 2010 at 3:29 PM, bagelboy  wrote:
> > Is there a way to use shared preferences on a different directory?
>
> What for? SharedPrefs are for storing name value pairs. What difference does
> it make where it's stored?
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Use shared preferences on non-app directory file

2010-12-14 Thread bagelboy
I understand your point, however as a developer I have a problem that
needs fixing and this is one of the possible solutions.

When google provide me a way to create demo and licensing algorithms
that cannot be defeated by the user simply clearing the app data then
I'll stop trying to find a way to create a persistent file.

On Dec 14, 5:25 pm, Chris Stratton  wrote:
> On Dec 14, 3:29 am, bagelboy  wrote:
>
> > A user can clear app data, I want a file that is persistent
>
> If you find a way to do that, the android architects will probably
> consider it a bug in need of fixing.  As an application developer you
> aren't supposed to be able to do anything permanent to the user's
> device.

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


[android-developers] Re: Use shared preferences on non-app directory file

2010-12-14 Thread bagelboy
No arguments here. I know it's not going to defeat all freetards but
it will defeat the less savvy freetards.

On Dec 14, 3:25 pm, TreKing  wrote:
> On Tue, Dec 14, 2010 at 2:29 AM, bagelboy  wrote:
> > A user can clear app data, I want a file that is persistent
>
> A user can clear their SD card, or perform a factor reset to wipe their
> phones. By that logic, there's no such thing as "persistent" data storage on
> a device.
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Use shared preferences on non-app directory file

2010-12-15 Thread bagelboy

>
> Then just use the SD card if you're only concerned about "the less savvy
> freetards".
>
> That's a great perception you have of your users, by the way.
>

I don't have a bad perception of my users, I was just being
sarcastic.

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


[android-developers] Re: Use shared preferences on non-app directory file

2010-12-15 Thread bagelboy
Even with stock LVL the user can still clear the user data as it uses
Shared Preferences. Using the SD card is a good idea whether you are
using LVL or not.

LVL is a sledgehammer to crack a nut in this case.

On Dec 15, 4:18 am, Chris Stratton  wrote:
> On Dec 14, 5:33 pm, Jake Basile  wrote:
>
> > If it's for licensing, couldn't you use something like the 
> > LVL<http://developer.android.com/guide/publishing/licensing.html>?
> > Anything you write to a system you don't control (the device) is going to be
> > non-permanent.
>
> Right idea, but bagelboy would need his own server, as I don't believe
> the android market licensing service is available for free
> applications.  Allowing it to be used for time limited trials might be
> a good idea though - it would make things very easy for the developer,
> since they'd just ship the "paid" apk and use some market setting to
> set the pre-purchase trial period.

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


[android-developers] Re: Problem with Publishing app in android Market

2010-12-16 Thread bagelboy
What are you expecting to hear? Once you pay you should be able to log
into the market as a developer using your gmail account.

On Dec 16, 9:29 am, Lamia Hannoun  wrote:
> Hello!
>
> I want to publish my first android app in Android market, I payed the 25 USD
> to get liscence to get an account to add my app and still I didn't hear from
> them and I didn't get any response from android market it's been 14days !!!
> What should I do?
>
> Thanks in advance

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


[android-developers] Re: Anybody seen a slowdown in sales?

2010-12-18 Thread bagelboy
I've seen a 50% drop in sales in the same timeframe. Not that my sales
were huge before but I had a 5 day period with no sales at all and
since then it's been a trickle. I've got promo graphics, feature
graphics, the works.

-BB

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

2010-12-22 Thread bagelboy
I'm using windows 7 64 bit and although it wasn't 100% straighforward
there are no dealbreakers. I'm using 64 bit java and it works fine
although my java_home is c:\glassfishv3\jdk. Eclipse doesn't install
anywhere, you simply run the executable from wherever it's unzipped,
so put it in program files(x86) and put in a shortcut.



On Dec 20, 3:45 pm, Jay  wrote:
> Hi all,
> I want to start learning with my Android developement. I have a
> windows 7 Home Premium PC. My problem is I am not able to setup the
> development environment for android. Here is what I have done till
> now.
> 1. I have installed Java (both 32 bit and 64 bit versions)
> 2. I have installed Android SDK (installer_r08-windows.exe)
> 3. I have not yet downloaded any tools or platforms or ADT.
> 4. I have downloaded 32 bit eclipse. (eclipse-SDK-3.5.1-win32.zip)
> 5. I am stuck at this eclipse setup. A strange thing I observed is
> that, it does not install. When I click on eclipse.exe, it starts
> running from there only. I am still wondering if my eclipse IDE is
> installed properly?
> 6. So, I assumed that my eclipse is working fine. Then when I try
> installing new programs in eclipse, eg google plugin, it gives error.
>
> I want to know, where am I going wrong? What mistakes am I doing?
> Can anyone guide me with the complete step by step procedure to setup
> my android development environment on windows 7?
>
> Thanks in advance.
>
> - Jay

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


[android-developers] Re: CountDownTimer doen't work during device in deep sleep?

2010-12-23 Thread bagelboy
This is by design and it's to save battery life. If the phone cannot
sleep then the battery will discharge very quickly and your app will
be a battery drain. I was coding a timer myself and Mark recommended
that I use notification manager for long-term timing instead and it
was good advice.

I suggest you re-think your approach. Here's a brief summary of the
approach I took:
When an android device sleeps onPause is called in your activity.
Override onPause and create notifications for the events you are
timing, and save the timer info into shared preferences. When your
device wakes onResume is called, in Override onResume and set up the
countDownTimer calculating time left using the values from shared
preferences.

This approach means you have more work to do, you must learn
notifications,  you must create intents that deal with the
notifications, etc. However it will make as better end product.

Hope this helps,
-BB

On Dec 22, 10:54 pm, optimusgeek  wrote:
> I use CountDownTimer for counting 24hours with 1minute interval.
> but It seems that the onTick() not called when device in deep sleep.
> When I check the millisUntilFinished value after activating device,
> The value was not match first but after few seconds, It show correct
> value.
> I think, when device in deep sleep, handle message from CountDownTimer
> delayed, and if device activated, the last message of CountDownTimer
> sent.
> and after that the millisUntilFinished value is updated.
>
> Any solution for it? I have to use the CountDownTimer, because I need
> to get the millisUntilFinished value in every 1 minute.

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


[android-developers] Handango licensing models

2010-12-30 Thread bagelboy
Hello Devs,

I'm considering whether to put my apps on Handango, if only for the
marketing benefits. On the android market I have a demo and a paid
version of my app but on Handango there is a possibility of having a
shareware setup where a user downloads the full version after the
trial runs out. Are there any drawbacks to this approach? Does anyone
have source code for the Handango dynamic licensing they wouldn't mind
sharing?

thanks, and have a good new years
-BB

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


[android-developers] charging taxes

2010-10-29 Thread bagelboy
Hello fellow devs,

I've got an an app out and I'm starting to get some (very minute)
revenue, and it just occurred to me I need to think about taxes. I
live in the UK and I am selling my apps through the google android
market exclusively. Do I need to set up the marketplace to charge
sales tax? If so, which countries and what amounts?

Thanks!
-BB

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


[android-developers] device fingerprinting

2010-10-30 Thread bagelboy
Hello Devs,

I'm working on an LVL implementation and I want to use as many
different device identifiers as I can. I have considered using IMEI
numbers but I've discarded that because a) it's intrusive and b) not
all devices will have them.

What might I use to fingerprint a phone for license verification?

As an aside, how have your experiences with LVL been so far? Any
pitfalls? I'm not asking for anyone to share their implementation
details as that would give the hackers ideas.

-BB

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

2010-10-30 Thread bagelboy
I'm an IT contractor so I already have a limited company. I'll ask my
accountant about this.

Thanks for the info.

-BB

On Oct 29, 6:23 pm, Pent  wrote:
> > I've got an an app out and I'm starting to get some (very minute)
> > revenue, and it just occurred to me I need to think about taxes. I
> > live in the UK and I am selling my apps through the google android
> > market exclusively. Do I need to set up the marketplace to charge
> > sales tax? If so, which countries and what amounts?
>
>  This is not tax advice 
>
> I'm also in the UK, I asked an accountant to look at it and my
> understanding is now that as long as you are selling to individuals
> rather than supplying businesses, the tax rate is the standard
> UK one, payable to HMRC, and the same whichever country you are
> selling to. I think the VAT limit is 70k at the moment, so unless
> you hit the big time you don't need to worry.
>
> You need to register as some kind of business (probably sole
> trader) to pay HMRC tax on your income from the sales though
> within 3 months of starting.
>
> Pent
>
>  This is not tax advice 

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


[android-developers] Re: device fingerprinting

2010-11-01 Thread bagelboy
Google encourages you to offload your own checks to an external server
and I am considering how to do that. I'd like to have more than one
way to track installations.

I totally agree that the documentation sucks donkeys. They say you
should modify the code substantially to foil crackers but they don't
provide anywhere near enough docs to do it!

Google, if you are listening we need a secure, turnkey security system
like iPhone. LVL isn't it.

On Oct 31, 7:59 pm, jtoolsdev  wrote:
> Isn't LVL locked to the user's Google email?  I thought that was the
> idea though they you can use device IDs as an option.  Linked to the
> account it allows the user to install the app again if they get a
> different device.  The ID option would be for a single device policy
> though they could stand to flesh out the documentation on LVL a bit
> more.
>
> On Oct 30, 3:01 pm, DanH  wrote:
>
> > Well, there's the IMEI, the IMSI, and the ANDROID_ID.  Alas, the
> > ANDROID_ID isn't unique (and is in fact identical on many Droid2
> > units).
>
> > On Oct 30, 12:41 pm, bagelboy  wrote:
>
> > > Hello Devs,
>
> > > I'm working on an LVL implementation and I want to use as many
> > > different device identifiers as I can. I have considered using IMEI
> > > numbers but I've discarded that because a) it's intrusive and b) not
> > > all devices will have them.
>
> > > What might I use to fingerprint a phone for license verification?
>
> > > As an aside, how have your experiences with LVL been so far? Any
> > > pitfalls? I'm not asking for anyone to share their implementation
> > > details as that would give the hackers ideas.
>
> > > -BB
>
>

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

2010-11-02 Thread bagelboy
How do you know when 26 hours has passed? Do you timestamp the first
check or is there a way to establish when the app was installed?

On Nov 1, 4:48 pm, Pent  wrote:
> > (this
> > is because I am not entirely sure what would happen if the user copied
> > to SD card and then got a refund).
>
> Ah yes. I don't do any check at all till 26 hours has passed to avoid
> the refund problem.
>
> 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] What other markets are worth using

2010-11-04 Thread bagelboy
I'm considering which markets to sell my apps in and I would like to
get the opinions of other developers.

Other than the android market which markets do you sell your apps in
and which ones have you had success? Have you seen any changes to the
rate of sale in these other markets since the android market expanded
to other countries?

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

2010-11-05 Thread bagelboy
I ran into the same thing last night although I didn't have time to
really delve deep into the problem so I am not sure whether it is my
code or a market problem.

Are you using the stock code?

-BB

On Nov 4, 11:40 pm, Zsolt Vasvari  wrote:
> Nobody on this form who implemented LVL and could answer this simple
> question?
>
> On Nov 4, 7:03 am, Zsolt Vasvari  wrote:
>
> > When I set the test response ro LICENSED in the Market for my app, I
> > am not getting anything back in the "extras" field.  I am referring to
> > the VT, GT, GR fields.
>
> > Since I changed a lot in the LVL code, it's possible that I've broken
> > it somehow, but I don't see any extras section right after
> > unobfuscation, so I don't think that anything is wrong on my end.
>
> > I can see the reasoning behing the extras not being there if you
> > specifally set a LICENSED response, but then how can I test that the
> > extras stuff still works?  If I set "Respond Normally", I got a
> > NOT_LICENSED as I am not a buyer of my own app.
>
> > Thanks,
> > ZsoltVasvari
>
>

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

2010-11-05 Thread bagelboy
It's bizzare, they have designed a system for testing that cannot be
used to accurately test an application's response!

The only solution is to publish an app that doesn't work and then fix
it! What are they thinking? ARE they thinking?


On Nov 5, 11:03 am, String  wrote:
> It's been disclosed on this forum before that test responses aren't
> cached. I haven't looked into how that's implemented, but leaving
> those extras blank would probably do it. So I suspect this is by
> design.
>
> An obvious implication is that the test responses aren't an accurate
> simulation of how your LVL implementation will work for real users;
> unfortunate, but true. The usual advice is to set up another Google
> account for testing, purchase your app from it (or not, depending on
> what you're trying to test), and work with that. Seems kludgey, but
> AFAIK that's the only way.
>
> String
>
> On Nov 3, 11:03 pm, Zsolt Vasvari  wrote:
>
> > When I set the test response ro LICENSED in the Market for my app, I
> > am not getting anything back in the "extras" field.  I am referring to
> > the VT, GT, GR fields.
>
> > Since I changed a lot in the LVL code, it's possible that I've broken
> > it somehow, but I don't see any extras section right after
> > unobfuscation, so I don't think that anything is wrong on my end.
>
> > I can see the reasoning behing the extras not being there if you
> > specifally set a LICENSED response, but then how can I test that the
> > extras stuff still works?  If I set "Respond Normally", I got a
> > NOT_LICENSED as I am not a buyer of my own app.
>
> > Thanks,
> > Zsolt Vasvari
>
>

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

2010-11-05 Thread bagelboy
I think the thing to do is simply not use the google extras. Why do
you need them? All you really need to know is whether an application
is licensed or not licensed. Google may say that the verification time
of the licensing is 2 days say (I have no idea what the normal
response would be), but why use their values? The same goes with
retries, just use your own values then it doesn't matter whether
google sends extras or not.


On Nov 5, 5:33 pm, bagelboy  wrote:
> It's bizzare, they have designed a system for testing that cannot be
> used to accurately test an application's response!
>
> The only solution is to publish an app that doesn't work and then fix
> it! What are they thinking? ARE they thinking?
>
> On Nov 5, 11:03 am, String  wrote:
>
> > It's been disclosed on this forum before that test responses aren't
> > cached. I haven't looked into how that's implemented, but leaving
> > those extras blank would probably do it. So I suspect this is by
> > design.
>
> > An obvious implication is that the test responses aren't an accurate
> > simulation of how your LVL implementation will work for real users;
> > unfortunate, but true. The usual advice is to set up another Google
> > account for testing, purchase your app from it (or not, depending on
> > what you're trying to test), and work with that. Seems kludgey, but
> > AFAIK that's the only way.
>
> > String
>
> > On Nov 3, 11:03 pm, Zsolt Vasvari  wrote:
>
> > > When I set the test response ro LICENSED in the Market for my app, I
> > > am not getting anything back in the "extras" field.  I am referring to
> > > the VT, GT, GR fields.
>
> > > Since I changed a lot in the LVL code, it's possible that I've broken
> > > it somehow, but I don't see any extras section right after
> > > unobfuscation, so I don't think that anything is wrong on my end.
>
> > > I can see the reasoning behing the extras not being there if you
> > > specifally set a LICENSED response, but then how can I test that the
> > > extras stuff still works?  If I set "Respond Normally", I got a
> > > NOT_LICENSED as I am not a buyer of my own app.
>
> > > Thanks,
> > > Zsolt Vasvari
>
>

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

2010-11-13 Thread bagelboy
I recently did my own LVL implementation and I can tell you that
tracing these issues down is a real pain. First you need to put loads
of logging into the LVL code to find out what the actual response is,
otherwise you have no visibility, then you have to put logging into
all the code between the response and the allow/dontallow callbacks.

Basically what I found was the stock code was unworkable in many ways.
I quickly came to the conclusion that I needed to modify it into
something that worked for me. There's a few reasons behind why you
should abandon the stock code:
- if you use the stock implementation then crackers will find it very
easy to circumvent
- as you have found it is very hard to debug. You have to spend so
much time figuring out how it works you may as well roll your own
instead.
- who's to say whether the google responses are what you want? How
many retries do you want before it sends a dontAllow back? Maybe you
want to treat the error responses as a retry. Do you want google to
specify that or yourself? Do you want them to specify the time between
checks? It's better to take control of this process so you know
exactly what is going on and you can manage the user experience.

In the system I came up with in the end all I use is the response and
none of the extras. What I do with the response is all custom, that
way I can use the market test responses in development without
issues.

-BB

On Nov 13, 4:40 am, John Gaby  wrote:
> I am using pretty much the default Android Market Licensing in my
> application, but find that it is not working correctly on most of the
> devices that I have tested.  I have uploaded my app to the Market but
> not published it.  If install it on the emulator which does not have
> any Google accounts, then I receive a 'dontAllow' from the check,
> which is correct.
>
> If I install it on a Motorola Droid phone (which I have in my
> possession) that has my Market Google account associated with it, then
> it will return 'allow' or 'don't allow' depending on how I set the
> test market. I have also installed it on an HTC Incredible phone, and
> it seems to work there as well.
>
> However, I have tested 4 other phones (HTC Hero, HTC Brovo Desire, HTC
> Droid Eris and HTC Nexus One), and on each of these phones, I get an
> 'allow' call from the license check, even though there is no
> authorizing account on the phone.  Can someone tell me what is going
> on here?
>
> Thanks.

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


[android-developers] Re: Android Market Licensing Problem

2010-11-14 Thread bagelboy
Perhaps the responses aren't correct because your app is not
published.

this thread may provide some insight:
http://groups.google.com/group/android-developers/browse_thread/thread/bb18fc91dd02989f/39211249d57c6d42#39211249d57c6d42


On Nov 14, 3:31 am, John Gaby  wrote:
> I have added some logging code and found that the raw response from
> the License Service (i.e. the call back to verifyLicense in
> LicenseChecker.java) has a responseCode of '0', which means
> 'licensed'.  This is simply not correct.  This phone does NOT have a
> valid account which would generate such a response.  Can someone
> please explain why this is happening.  Does this License Service
> simply not work correctly on a large number of phones?  Does using the
> service have any value at all?
>
> Thanks.
>
> On Nov 13, 3:31 am, bagelboy  wrote:
>
> > I recently did my own LVL implementation and I can tell you that
> > tracing these issues down is a real pain. First you need to put loads
> > of logging into the LVL code to find out what the actual response is,
> > otherwise you have no visibility, then you have to put logging into
> > all the code between the response and the allow/dontallow callbacks.
>
> > Basically what I found was the stock code was unworkable in many ways.
> > I quickly came to the conclusion that I needed to modify it into
> > something that worked for me. There's a few reasons behind why you
> > should abandon the stock code:
> > - if you use the stock implementation then crackers will find it very
> > easy to circumvent
> > - as you have found it is very hard to debug. You have to spend so
> > much time figuring out how it works you may as well roll your own
> > instead.
> > - who's to say whether the google responses are what you want? How
> > many retries do you want before it sends a dontAllow back? Maybe you
> > want to treat the error responses as a retry. Do you want google to
> > specify that or yourself? Do you want them to specify the time between
> > checks? It's better to take control of this process so you know
> > exactly what is going on and you can manage the user experience.
>
> > In the system I came up with in the end all I use is the response and
> > none of the extras. What I do with the response is all custom, that
> > way I can use the market test responses in development without
> > issues.
>
> > -BB
>
> > On Nov 13, 4:40 am, John Gaby  wrote:
>
> > > I am using pretty much the default Android Market Licensing in my
> > > application, but find that it is not working correctly on most of the
> > > devices that I have tested.  I have uploaded my app to the Market but
> > > not published it.  If install it on the emulator which does not have
> > > any Google accounts, then I receive a 'dontAllow' from the check,
> > > which is correct.
>
> > > If I install it on a Motorola Droid phone (which I have in my
> > > possession) that has my Market Google account associated with it, then
> > > it will return 'allow' or 'don't allow' depending on how I set the
> > > test market. I have also installed it on an HTC Incredible phone, and
> > > it seems to work there as well.
>
> > > However, I have tested 4 other phones (HTC Hero, HTC Brovo Desire, HTC
> > > Droid Eris and HTC Nexus One), and on each of these phones, I get an
> > > 'allow' call from the license check, even though there is no
> > > authorizing account on the phone.  Can someone tell me what is going
> > > on here?
>
> > > Thanks.
>
>

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


[android-developers] Re: Android Market Licensing Problem

2010-11-14 Thread bagelboy
You can't, basically. All you can do is publish and hope their system
works. My answer to this problem was to not use the response extras
and to create a system that can deal with an incorrect response here
and there.

On Nov 14, 4:00 pm, John Gaby  wrote:
> Actually, that thought has occurred to me (I have already read that
> thread), but really, how am I supposed to be able to test my app
> before I publish it if that is the case?
>
> On Nov 14, 3:29 am, bagelboy  wrote:
>
> > Perhaps the responses aren't correct because your app is not
> > published.
>
> > this thread may provide some 
> > insight:http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > On Nov 14, 3:31 am,JohnGaby wrote:
>
> > > I have added some logging code and found that the raw response from
> > > theLicenseService (i.e. the call back to verifyLicense in
> > > LicenseChecker.java) has a responseCode of '0', which means
> > > 'licensed'.  This is simply not correct.  This phone does NOT have a
> > > valid account which would generate such a response.  Can someone
> > > please explain why this is happening.  Does thisLicenseService
> > > simply not work correctly on a large number of phones?  Does using the
> > > service have any value at all?
>
> > > Thanks.
>
> > > On Nov 13, 3:31 am, bagelboy  wrote:
>
> > > > I recently did my own LVL implementation and I can tell you that
> > > > tracing these issues down is a real pain. First you need to put loads
> > > > of logging into the LVL code to find out what the actual response is,
> > > > otherwise you have no visibility, then you have to put logging into
> > > > all the code between the response and the allow/dontallow callbacks.
>
> > > > Basically what I found was the stock code was unworkable in many ways.
> > > > I quickly came to the conclusion that I needed to modify it into
> > > > something that worked for me. There's a few reasons behind why you
> > > > should abandon the stock code:
> > > > - if you use the stock implementation then crackers will find it very
> > > > easy to circumvent
> > > > - as you have found it is very hard to debug. You have to spend so
> > > > much time figuring out how it works you may as well roll your own
> > > > instead.
> > > > - who's to say whether the google responses are what you want? How
> > > > many retries do you want before it sends a dontAllow back? Maybe you
> > > > want to treat the error responses as a retry. Do you want google to
> > > > specify that or yourself? Do you want them to specify the time between
> > > > checks? It's better to take control of this process so you know
> > > > exactly what is going on and you can manage the user experience.
>
> > > > In the system I came up with in the end all I use is the response and
> > > > none of the extras. What I do with the response is all custom, that
> > > > way I can use the market test responses in development without
> > > > issues.
>
> > > > -BB
>
> > > > On Nov 13, 4:40 am,JohnGaby wrote:
>
> > > > > I am using pretty much the default Android Market Licensing in my
> > > > > application, but find that it is not working correctly on most of the
> > > > > devices that I have tested.  I have uploaded my app to the Market but
> > > > > not published it.  If install it on the emulator which does not have
> > > > > any Google accounts, then I receive a 'dontAllow' from the check,
> > > > > which is correct.
>
> > > > > If I install it on a Motorola Droid phone (which I have in my
> > > > > possession) that has my Market Google account associated with it, then
> > > > > it will return 'allow' or 'don't allow' depending on how I set the
> > > > > test market. I have also installed it on an HTC Incredible phone, and
> > > > > it seems to work there as well.
>
> > > > > However, I have tested 4 other phones (HTC Hero, HTC Brovo Desire, HTC
> > > > > Droid Eris and HTC Nexus One), and on each of these phones, I get an
> > > > > 'allow' call from thelicensecheck, even though there is no
> > > > > authorizing account on the phone.  Can someone tell me what is going
> > > > > on here?
>
> > > > > Thanks.
>
>

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


[android-developers] Re: Apps not showing in Market

2010-11-23 Thread bagelboy
There's an app for that!

On Nov 23, 9:08 am, mot12  wrote:
> If you expect anybody to help you here, then at least post your
> manifest. How do you think anybody would know the answer to your
> question? Magic?
>
> Martin
> mobitobi.com
> Gentle Alarm, Sleep Now

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


[android-developers] prevent user from clearing app data

2010-12-05 Thread bagelboy
It looks like there's a bug on Froyo where the user can clear app data
even if allow clear user data is false in the manifest. I would like
to put out a demo that stops working after a certain amount of usage
and the simplest way is to put a counter in shared preferences (or
another file) somewhere, however if a user can clear the data then all
that he/she would need to do is clear the app data every time the app
locks.

If there a way to put this data into a file that the user cannot
delete? Or should I just get my demo out there and hope that this bug
get plugged?

-BB

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


[android-developers] Overlay to make parts of image clickable

2010-12-05 Thread bagelboy
I have an image and I want to make parts of it clickable. From my
research I can see 2 ways to do this:
1) I could chop the image into pieces and put them into a relative
layout
2) I could create a matrix of points that describe the clickable areas
and use onTouch events to track clicks

Option 1 has the drawback where you have to make areas square or
rectangular, plus alignment and scaling are a pain.

Option 2 can be scaled easier however I'm not sure how to go about
coding it.

Am I missing any possibilities? Are there any tools or source code
that would make it easier?

-BB

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

2010-12-06 Thread bagelboy
It just so happens that each area of the image has a specific color,
so that is an excellent idea, thanks very much for your suggestion.

On Dec 6, 7:19 am, ip332  wrote:
> Here is a generic solution for handling any number of arbitrary shaped
> hotspots:
> 1) create additional bitmap (same size as what you plan to show on the
> screen) and draw "hot areas" with a specific color. If you have less
> than 255 hotspots then use 8bpp bitmap with background of color with
> index 0. Draw the first hot spot with desired shape and color it with
> index 1, then the second area - with index 2 and so on. Or you can do
> it with 24bpp bitmap but assign each area a specific RGB combination.
> 2) load this bitmap (let's call it "control") when your application
> starts up.
> 3) on screen click: convert screen coordinates into x,y from the
> origin of your image (which can be larger than the screen)
> 4) get pixel color from the control bitmap - if it is > 0 then it is a
> hotspot index of code.
> Good luck
> Igor
>
> On Dec 5, 5:43 am, bagelboy  wrote:
>
> > I have an image and I want to make parts of it clickable. From my
> > research I can see 2 ways to do this:
> > 1) I could chop the image into pieces and put them into a relative
> > layout
> > 2) I could create a matrix of points that describe the clickable areas
> > and use onTouch events to track clicks
>
> > Option 1 has the drawback where you have to make areas square or
> > rectangular, plus alignment and scaling are a pain.
>
> > Option 2 can be scaled easier however I'm not sure how to go about
> > coding it.
>
> > Am I missing any possibilities? Are there any tools or source code
> > that would make it easier?
>
> > -BB

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

2010-12-06 Thread bagelboy
In other words there's no way to protect my app from the user simply
deleting app data, and the only solution is for me to build my own
licensing server?

Thanks google, you guys think of everything.

On Dec 6, 1:41 am, Dianne Hackborn  wrote:
> On Sun, Dec 5, 2010 at 5:41 AM, Mark Murphy  wrote:
> > To quote Ms. Hackborn from Sep 29, "Looks like it broke". Curiously, I
> > find no issue for it on b.android.com.
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> That was specifically discussing system apps.  Third party apps have never
> been able to turn this off, and that is the intended behavior.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


[android-developers] XML encryption

2010-10-05 Thread bagelboy
Hello Developers,

One of my apps uses custom xml files for much of the data used by the
app, I'd like to encrypt the data as part of a copy protection plan
and I would like some views about how best to go about it. I realize
that this isn't going to solve all my copy protection problems but it
will certainly make the pirates' job harder.

There are two methods I can see: I can encrypt the whole file and
decrypt it during the activity setup or I can encrypt the data in the
xml entries. I would think that encrypting the whole file and not just
parts of it is the way to go but I would like some opinions on that.

- Is there a lightweight encryption library you would recommend I use?

- What is the fastest and lightest way to access the encrypted data?

thanks,
BB

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


[android-developers] XML encryption

2010-10-05 Thread bagelboy
Hello Developers,

One of my apps uses custom xml files for much of the data used by the
app, I'd like to encrypt the data as part of a copy protection plan
and I would like some views about how best to go about it. I realize
that this isn't going to solve all my copy protection problems but it
will certainly make the pirates' job harder.

There are two methods I can see: I can encrypt the whole file and
decrypt it during the activity setup or I can encrypt the data in the
xml entries. I would think that encrypting the whole file and not just
parts of it is the way to go but I would like some opinions on that.

- Is there a lightweight encryption library you would recommend I use?

- What is the fastest and lightest way to access the encrypted data?

thanks,
BB

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

2010-10-06 Thread bagelboy
I'm not sure if that is practical. If I created a public/private
keypair as part of the app it would be accessible to the user and
could be used to decrypt the data. The only way that would work is if
there was a way to protect the public/private keypair, and I'm not
sure how to go about doing that.

On Oct 6, 2:18 pm, gcstang  wrote:
> If you encrypt on the phone side with a known pass (assuming your
> using symmetric keys) then all the hacker has to do is find your
> password ( and salt if you use one) you used to create it and decrypt
> it.
>
> I would if possible use asymmetric keys. (public/private)
>
> I've not used them on Android so you would have to figure out if it's
> possible, I'm guessing it is since LVL uses that.
>
> On Oct 5, 12:34 pm, Dimitris  wrote:
>
> > Yes, look for CipherOutputStream and CipherInputStream for writing and
> > reading the file safely. I would use a symmetric encryption algorithm
> > such as AES unless the XML is coming from a web service.
>
> > On Oct 5, 9:18 am, Kostya Vasilyev  wrote:
>
> > >   05.10.2010 19:59, DanH пишет:
>
> > > > If you encrypt the entire XML file you won't be able to use Android's
> > > > "compiled' XML access tools, and you'll expose the unencrypted file on
> > > > the phone.  If you encrypt individual entries then you have a
> > > > complicated build process and, due to the shorter elements being
> > > > encrypted, a more complicated decryption process and (technically)
> > > > less secure encryption.
>
> > > It's possible to use CipherInputStream to do on-the-fly decryption while
> > > reading data from a file or from the network.
>
> > > Per-application data files located in phone storage are private, and
> > > could be used to cache decrypted data. Unless, of course, the user roots
> > > their phone, but that's not commonplace.
>
> > > --
> > > 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] Re: XML encryption

2010-10-06 Thread bagelboy
I'll have a look, thanks for the suggestion. The trick will be to hide
the key in such a way as to make it difficult to find, I'm hoping a
combination of proguard and additional obfuscation of my own will do
the trick.

On Oct 5, 6:34 pm, Dimitris  wrote:
> Yes, look for CipherOutputStream and CipherInputStream for writing and
> reading the file safely. I would use a symmetric encryption algorithm
> such as AES unless the XML is coming from a web service.
>
> On Oct 5, 9:18 am, Kostya Vasilyev  wrote:
>
> >   05.10.2010 19:59, DanH пишет:
>
> > > If you encrypt the entire XML file you won't be able to use Android's
> > > "compiled' XML access tools, and you'll expose the unencrypted file on
> > > the phone.  If you encrypt individual entries then you have a
> > > complicated build process and, due to the shorter elements being
> > > encrypted, a more complicated decryption process and (technically)
> > > less secure encryption.
>
> > It's possible to use CipherInputStream to do on-the-fly decryption while
> > reading data from a file or from the network.
>
> > Per-application data files located in phone storage are private, and
> > could be used to cache decrypted data. Unless, of course, the user roots
> > their phone, but that's not commonplace.
>
> > --
> > 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] Re: XML encryption

2010-10-06 Thread bagelboy
I would be reading the data in once and no modifications would be
made.

On Oct 5, 6:34 pm, DanH  wrote:
> Yeah, a lot depends on whether you'll be reading the entire XML file
> at once and extracting everything you need, or going back and
> rereferencing it from time to time.
>
> On Oct 5, 11:18 am, Kostya Vasilyev  wrote:
>
> >   05.10.2010 19:59, DanH пишет:
>
> > > If you encrypt the entire XML file you won't be able to use Android's
> > > "compiled' XML access tools, and you'll expose the unencrypted file on
> > > the phone.  If you encrypt individual entries then you have a
> > > complicated build process and, due to the shorter elements being
> > > encrypted, a more complicated decryption process and (technically)
> > > less secure encryption.
>
> > It's possible to use CipherInputStream to do on-the-fly decryption while
> > reading data from a file or from the network.
>
> > Per-application data files located in phone storage are private, and
> > could be used to cache decrypted data. Unless, of course, the user roots
> > their phone, but that's not commonplace.
>
> > --
> > 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] using long touch to set a seekbar

2010-10-12 Thread bagelboy
I have an app that uses seekbars with buttons on either side for fine
adjustments. Right now I use simple onclick events for the buttons,
every click changes the seekbar 1 unit.

What I would like to do is use a long press to quickly scroll, so if a
user holds down a button for say 800 millis it will start adding ten
units per second.

What I'm thinking my approach should be is to use onKeyDown and
onKeyUp events, but is there a better way? OnLongClickListener won't
work as far as I can tell because it doesn't detect key-up.

Is my approach correct?

Thanks!
-BB

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


[android-developers] Re: using long touch to set a seekbar

2010-10-12 Thread bagelboy
Actually, upon further review I think I misunderstood key events, I
don't think that approach is right at all.

It looks like I will need to use touch events.

On Oct 12, 11:25 am, bagelboy  wrote:
> I have an app that uses seekbars with buttons on either side for fine
> adjustments. Right now I use simple onclick events for the buttons,
> every click changes the seekbar 1 unit.
>
> What I would like to do is use a long press to quickly scroll, so if a
> user holds down a button for say 800 millis it will start adding ten
> units per second.
>
> What I'm thinking my approach should be is to use onKeyDown and
> onKeyUp events, but is there a better way? OnLongClickListener won't
> work as far as I can tell because it doesn't detect key-up.
>
> Is my approach correct?
>
> Thanks!
> -BB

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


[android-developers] Re: using long touch to set a seekbar

2010-10-12 Thread bagelboy
OK, I solved this myself by attaching an onTouchListener to each
button and listening for ACTION_DOWN and ACTION_UP events. the only
problem is that if a user moves their finger off the button while
holding it the ACTION_UP event is lost. This doesn't seem to be a
major problem as all they have to do is tap the button again to stop,
but if it gives any trouble I'll simply have to add a generic
ACTION_UP listener.

Hope this is useful to someone,
-BB

On Oct 12, 11:25 am, bagelboy  wrote:
> I have an app that uses seekbars with buttons on either side for fine
> adjustments. Right now I use simple onclick events for the buttons,
> every click changes the seekbar 1 unit.
>
> What I would like to do is use a long press to quickly scroll, so if a
> user holds down a button for say 800 millis it will start adding ten
> units per second.
>
> What I'm thinking my approach should be is to use onKeyDown and
> onKeyUp events, but is there a better way? OnLongClickListener won't
> work as far as I can tell because it doesn't detect key-up.
>
> Is my approach correct?
>
> Thanks!
> -BB

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


[android-developers] Re: using long touch to set a seekbar

2010-10-12 Thread bagelboy
@Kumar, many thanks for that useful suggestion, I'll have a look.
-BB

On Oct 12, 5:23 pm, Kumar Bibek  wrote:
> ACTION_CANCEL might help you to exit your custom event.
>
>
>
> On Tue, Oct 12, 2010 at 9:51 PM, bagelboy  wrote:
> > OK, I solved this myself by attaching an onTouchListener to each
> > button and listening for ACTION_DOWN and ACTION_UP events. the only
> > problem is that if a user moves their finger off the button while
> > holding it the ACTION_UP event is lost. This doesn't seem to be a
> > major problem as all they have to do is tap the button again to stop,
> > but if it gives any trouble I'll simply have to add a generic
> > ACTION_UP listener.
>
> > Hope this is useful to someone,
> > -BB
>
> > On Oct 12, 11:25 am, bagelboy  wrote:
> > > I have an app that uses seekbars with buttons on either side for fine
> > > adjustments. Right now I use simple onclick events for the buttons,
> > > every click changes the seekbar 1 unit.
>
> > > What I would like to do is use a long press to quickly scroll, so if a
> > > user holds down a button for say 800 millis it will start adding ten
> > > units per second.
>
> > > What I'm thinking my approach should be is to use onKeyDown and
> > > onKeyUp events, but is there a better way? OnLongClickListener won't
> > > work as far as I can tell because it doesn't detect key-up.
>
> > > Is my approach correct?
>
> > > Thanks!
> > > -BB
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

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


[android-developers] Re: using long touch to set a seekbar

2010-10-13 Thread bagelboy
@Kumar,

I implemented that and it works like a charm, thanks for the
suggestion!
-BB

On Oct 12, 5:23 pm, Kumar Bibek  wrote:
> ACTION_CANCEL might help you to exit your custom event.
>
>
>
> On Tue, Oct 12, 2010 at 9:51 PM, bagelboy  wrote:
> > OK, I solved this myself by attaching an onTouchListener to each
> > button and listening for ACTION_DOWN and ACTION_UP events. the only
> > problem is that if a user moves their finger off the button while
> > holding it the ACTION_UP event is lost. This doesn't seem to be a
> > major problem as all they have to do is tap the button again to stop,
> > but if it gives any trouble I'll simply have to add a generic
> > ACTION_UP listener.
>
> > Hope this is useful to someone,
> > -BB
>
> > On Oct 12, 11:25 am, bagelboy  wrote:
> > > I have an app that uses seekbars with buttons on either side for fine
> > > adjustments. Right now I use simple onclick events for the buttons,
> > > every click changes the seekbar 1 unit.
>
> > > What I would like to do is use a long press to quickly scroll, so if a
> > > user holds down a button for say 800 millis it will start adding ten
> > > units per second.
>
> > > What I'm thinking my approach should be is to use onKeyDown and
> > > onKeyUp events, but is there a better way? OnLongClickListener won't
> > > work as far as I can tell because it doesn't detect key-up.
>
> > > Is my approach correct?
>
> > > Thanks!
> > > -BB
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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