[android-developers] Re: Test if screenlock is enabled

2012-10-26 Thread Kevin TeslaCoil Software
Aside from Device Admin, there is no API or official way for an app to 
retrieve for this information. Also, of the top of my head, your query for 
the pattern won't work on Jellybean (or maybe only works if they configured 
the pattern before upgrading to Jellybean?).

-Kevin

On Friday, October 26, 2012 5:40:30 AM UTC-5, AMetnik wrote:

 I need to check if this app has security (screenlocks), enabled. I have 
 found out how to check for pattern_locks like this  

 boolean b = android.provider.Settings.Secure.getInt(
 
 getContentResolver(),Settings.Secure.LOCK_PATTERN_ENABLED, 0)==1;

 But the other two evades me. I have found a bit about password using the 
 DevicePolicyManager which requires a broadcast receiver and enormous amount 
 of permissions/policies...   
 But this is imho. far overreaching of what is needed since I don't need 
 what kind of password or a like is enabled, but simply if a screenlocking 
 method is being used by the phone(user).


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

Re: [android-developers] Is it legal to implement APK's silent installation for commercial use?

2012-10-26 Thread Kevin TeslaCoil Software
I would guess that they simulate a user clicking INSTALL from the web based 
Play Store. I believe this would be technically doable if they either had 
the user login or had the users Google password. Then the Play Store takes 
care of pushing the app to the device and installing it in the background. 
There would still be the notification icon showing it has been installed 
and hopefully users are weary of typing their Google password into apps. 
It's likely that such a setup would violate one or more Play Store 
policies, but I do not know. I think App Brain did something along these 
lines at some point?

-Kevin

On Friday, October 26, 2012 4:54:28 AM UTC-5, alex kyo wrote:

 Thanks, Mark

 One thing I can definitely confirm is that they are not 
 device manufacturer.

 Suppose there is a google account(*ga*) which contains several apps.

 My guess is that they might register a stock device with the *ga* by 
 AccountManager 
 and then call the sync api (I don't know exactly what api will be here)

 Finally, after the device performed sync process, log out programmatically 
 the apps will be remained and it looks like silent install.


 On Friday, October 26, 2012 4:00:24 PM UTC+9, Mark Murphy (a Commons Guy) 
 wrote:

 On Fri, Oct 26, 2012 at 2:45 AM, Kristopher Micinski 
 krismi...@gmail.com wrote: 
  Or their company is actually TMobile... 

 Oh, true. A device manufacturer can do this stuff without a problem. I 
 was assuming that this was an SDK app, since this is a list for 
 developing SDK apps, but that may not have been a valid assumption. 

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

 _The Busy Coder's Guide to Android Development_ Version 4.2 Available! 



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

[android-developers] Re: Problem with hashing speed

2012-05-30 Thread Kevin TeslaCoil Software
For doing these kinds of benchmark you might want to check out Vogar 
http://code.google.com/p/vogar and Caliper http://code.google.com/p/caliper/

They can be used for running microbenchmarks on Android (and elsewhere). 
There's some benchmark's at http://code.google.com/p/dalvik/ that can be 
used as samples. There's actually already a MessageDigestBenchmark which 
might be of interest.

-Kevin


On Wednesday, May 30, 2012 9:22:43 PM UTC-5, jing yang wrote:

 Thanks for spending some time in doing the tests! 
 but can you try including byte[] f = md.digest(); inside your loop ? 
 in my test phone, add the digest() method will increase the timing by 
 40%. 

 But since your timings are much faster.. i think it could be due to 
 the dual core CPU of S2? 
 wow but i never expected the diffences in timings to be so huge. 
 do you happen to know any faster method of doing a hash? 

 THANKS A LOT!! 

 On May 31, 1:32 am, Harri Smått har...@gmail.com wrote: 
  On May 30, 2012, at 6:16 PM, jing yang wrote: 
  
   I was testing the hash methods on a 16 bytes input, randomly generated 
   with the SecureRandom class. 
  
  I'm still getting far more faster speeds on SGS2, around 4871ms for 
 524288 iterations. Roughly half of the time is spent generating random 
 bytes, half calculating hash. My test code as below; 
  
  MessageDigest md = null; 
  SecureRandom sr = null; 
  try { 
  MessageDigest md = MessageDigest.getInstance(SHA-256); 
  SecureRandom sr = SecureRandom.getInstance(SHA1PRNG); 
  
  byte seed[] = sr.generateSeed(128); 
  sr.setSeed(seed); 
  
  final long LOOP = 524288; 
  byte buf[] = new byte[16]; 
  
  long time = SystemClock.uptimeMillis(); 
  for (int i = 0; i  LOOP; ++i) { 
  sr.nextBytes(buf); 
  md.update(buf); 
  } 
  byte[] f = md.digest(); 
  Log.d(timing, time= + (SystemClock.uptimeMillis() - time));} 
 catch (Exception ex) { 
  
  ex.printStackTrace(); 
  
  } 
  
  -- 
  H

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

[android-developers] Re: Will we ever be allowed to make custom widget pickers?

2012-04-03 Thread Kevin TeslaCoil Software


 Currently there is no way to avoid using the built in widget selection 
 UI (the list of widgets you get in gingerbread when you add a widget). 
 This kind of sucks because it means you can't have anything like the 
 ICS launcher's widget page. 


Also the system widget picker in ICS doesn't even use the Holo theme. 
Definitely a pain for third party launchers.

At least there's root...
-Kevin 

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

[android-developers] Custom Permission and installation order

2012-02-21 Thread Kevin TeslaCoil Software
I'm trying to implement a custom permission to be used between two of
my apps.
In AppA I declare:

uses-permission android:name=com.teslacoilsw.TEST_PERMISSION /

And in AppB I declare:
permission android:name=com.teslacoilsw.TEST_PERMISSION
android:label=TeslaCoil Test
android:protectionLevel=normal /
...
service android:name=.TestService
android:exported=true
android:permission=com.teslacoilsw.TEST_PERMISSION
/

If I install AppB and then install AppA, it work as expected (AppA can
bind to AppB's service). However if I install AppA and then install
AppB, I get a SecurityException when trying to bind to the service as
the permission is not granted. (Tested on Android 4.0.3)

I've investigated adding the permission declaration to both
manifests and this does seem to work, I assume because the permission
now always exists at install time. However this feels wrong to me.

Is there a correct way for an app to declare a permission in an
environment like the Market where installation order is not
guaranteed?

Thanks,
-Kevin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Hardware accleration slow down every Canvas app. Why?

2012-01-16 Thread Kevin TeslaCoil Software
 The widget / app selector on my Galaxy Nexus does stutter somewhat,
 but if I scroll it all the way and then back again, it then animates
 much smoother.

 Based on this, I'd think it's the app / widget icon cache population,
 not the drawing.

There are stutters at times in the app/widget drawer. (I'm working on
a launcher replacement so I've been looking into it). It's difficult
to diagnose as there's a lot going on (cache, garbage collection,
loading resources from disk) and (proper) benchmarking and hardware
acceleration are hard topics.

It seems on official Android 4.0.2 on the GN there's a slight stutter
when starting to scroll a page for the first time, but removing the
call to setLayerType(LAYER_TYPE_HARDWARE, null); does prevent
the stutter. I didn't notice a difference on AOSP Android 4.0.3 on the
GN (and official 4.0.3 on the NS, but lower resolution which effects
things also).

Also interestingly, the animation does a setAlpha and the
documentation 
http://developer.android.com/reference/android/view/View.html#setAlpha(float)
states that this implies calling setLayerType with a hardware layer.
However I couldn't verify this with getLayerType. (I peaked into the
code and didn't find it either, but it's a bit confusing). A comment
on this from Romain or another Googler would be greatly appreciated.

-Kevin

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

2012-01-05 Thread Kevin TeslaCoil Software
I've actually been hacking at the ICS Launcher2 code so I figured I'd
give the widget a try. In my case (GSM Galaxy Nexus, 4.0.2) I keep
getting a NullPointerException in your
AwesomeClockActivity.setTextColour (trace below). Happens with stock
4.0.2 launcher as well as Nova Launcher (my app, based on ICS
Launcher2 from 4.0.3). At least this crash is your own app so it
should be easier to debug :).

If I keep trying to add over and over again it keeps FCs, but
sometimes I don't see I only see the FC from logcat (no dialog) and
see W/ActivityManager(  193): Process sirocco.widgetslite has crashed
too many times: killing!.


Trace:
E/AndroidRuntime(20564): java.lang.RuntimeException: Unable to start
activity ComponentInfo{sirocco.widgetslite/
sirocco.widgets.AwesomeClockActivity}: java.lang.NullPointerException
...
E/AndroidRuntime(20564): Caused by: java.lang.NullPointerException
E/AndroidRuntime(20564):at
sirocco.widgets.AwesomeClockActivity.setTextColour(AwesomeClockActivity.java:
572)
E/AndroidRuntime(20564):at
sirocco.widgets.AwesomeClockActivity.onCreate(AwesomeClockActivity.java:
301)



On Jan 5, 3:27 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Ok, just reinstalled from Market, added a clock widget, removed it, tried
 to add one again.

 The config activity worked fine, then after confirming, this showed up in
 the logcat:

 01-06 01:25:08.770 E/AndroidRuntime(26804): java.lang.RuntimeException:
 Failure delivering result ResultInfo{who=null, request=5, result=-1,
 data=Intent { (has extras) }} to activity
 {com.android.launcher/com.android.launcher2.Launcher}:
 java.lang.NullPointerException
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 android.app.ActivityThread.deliverResults(ActivityThread.java:2976)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 android.app.ActivityThread.handleSendResult(ActivityThread.java:3019)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 android.app.ActivityThread.access$1100(ActivityThread.java:122)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1176)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 android.os.Looper.loop(Looper.java:137)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 android.app.ActivityThread.main(ActivityThread.java:4340)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 java.lang.reflect.Method.invokeNative(Native Method)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 java.lang.reflect.Method.invoke(Method.java:511)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 
 784)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 dalvik.system.NativeStart.main(Native Method)
 01-06 01:25:08.770 E/AndroidRuntime(26804): Caused by:
 java.lang.NullPointerException
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 com.android.launcher2.Launcher.getSpanForWidget(Launcher.java:941)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 com.android.launcher2.Launcher.completeAddAppWidget(Launcher.java:964)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 com.android.launcher2.Launcher.completeAdd(Launcher.java:492)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 com.android.launcher2.Launcher.onActivityResult(Launcher.java:528)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 android.app.Activity.dispatchActivityResult(Activity.java:4649)
 01-06 01:25:08.770 E/AndroidRuntime(26804): at
 android.app.ActivityThread.deliverResults(ActivityThread.java:2972)
 01-06 01:25:08.770 E/AndroidRuntime(26804): ... 11 more
 01-06 01:25:08.786 W/ActivityManager(26561):   Force finishing activity
 com.android.launcher/com.android.launcher2.Launcher

 This is on a Galaxy Nexus, retail UK version, GSM, Android 4.0.1.

 If I can be of further help, please contact me off-list.

 Thanks,
 -- Kostya

 6 января 2012 г. 0:37 пользователь Ashley McConnell 
 ash...@siroccoracing.com написал:







  Hi Kostya,

  Thanks again.  I have exactly that code for both config activities, so I
  don't think that's the problem.  Thanks for the stack trace, I was seeing
  that warning in the logs, but it didn't have a stack trace associated with
  it for some reason, I'm not sure why.

  I've tracked down the source of the warnings and they should be quiet now
  :)

  The problem he was reporting was when he added a clock component, then
  removed it, it was removed from the list of widgets.  Can you check to see
  if that happens on your device?

  Thanks for your help,
  Ash

  2012/1/5 Kostya Vasilyev kmans...@gmail.com

  The code in Launcher looks up the widget info object by the widget id.
  Does your code properly handle that?

  Here is my code from a widget config activity:

  Intent resultValue = new Intent();
   

[android-developers] Re: question about lockscreens

2011-12-18 Thread Kevin TeslaCoil Software
 But does this mean that you guys are opposed to well known apps
 such as WidgetLocker, or Lockscreen Agenda?

Well I'm the developer of WidgetLocker, so I'm not opposed to it at
all :P. But this list is about developing apps that following the
documentation, guidelines and restrictions of the SDK. WidgetLocker
does not. I know it's hypocritical but I recommend other app devs,
especially ones just starting, follow the SDK.  It's safer and easier,
and (mostly) protects you from fragmentation (I test against ~20
devices. I still need more). As you noticed, this list isn't very
helpful if you chose to ignore the SDK rules. I imagine most devs that
do, including myself, don't discuss it much. If you choose to ignore
them, you're on your own.

 I wish to make an app that
 acts as a lockscreen. it would disable the home button, disable the
 back button, and then it would dismiss itself upon a successful entry
 of a password.

Implementing security in an app, rather than at the system level, is a
huge task and well beyond the scope of this list. There isn't even
anyone to discuss it with, as it has not been done. Find an app that
implements security (Note: WidgetLocker does not. There is good
reason.) and if you can't bypassing it in less than 5 minutes, you
aren't trying hard enough. Android is designed to disallow apps from
blocking other apps.

Even ignoring the Home and recent apps buttons, what about an incoming
call? Or a phone reboot? Or a SMS popup? Or any notification in the
notification bar for that matter? Or a malicious app? Or a task
killer? Or the system task killer? Or out of memory? Or a bug causing
a force close? It certainly is possible to display a screen that
prompts for a password and when the password is enter the screen
disappears. But implementing it in a manner that is more than just a
false sense of security is very different. I theorize that with root
and/or a device admin and a slightly-to-incredibly awkward user
experience it's possible, but even if that's true it's a lot of work
and a lot of testing and I guarantee you'd run into fragmentation
issues of trying to support Sense vs Blur vs TouchWiz vs Stock. A
custom rom, rather than an app, definitely could do this, but again
this list is not the place to discuss that (There's a firmware
building/modifying list for that kind of thing).

 1. how do i make an application launch when the screen is activated?

ACTION_SCREEN_OFF and ACTION_SCREEN_ON broadcasts. You'll need a
service running to receive them (not a manifest receiver). Also note
that no app can start within 5 seconds of the Home button being
pressed, so Home, screen off, screen on, and you're delayed.


 2. what method does one call to dismiss an application? (for example,
 when a password is entered successfully)

Your own activity you mean? finish() or moveTaskToBack().

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

2011-12-15 Thread Kevin TeslaCoil Software
Since you want to call the default home, you can just send a generic
home intent and let the system call the appropriate app. No need to
use the resolver manually.

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
startActivity(intent);

On Dec 15, 1:46 am, ZeeShaN AbbAs meeaaa...@gmail.com wrote:
 I need to call the default home screen that comes with my phone from
 my application even if its not set as default. I've tried searching
 and find this

      ArrayListIntent intentList = new ArrayListIntent();
     Intent intent=null;
     final PackageManager packageManager=getPackageManager();
     for(final ResolveInfo
 resolveInfo:packageManager.queryIntentActivities(new

 Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME),

 PackageManager.MATCH_DEFAULT_ONLY)) {
     intent=packageManager.getLaunchIntentForPackage(
                           resolveInfo.activityInfo.packageName);
     intentList.add(intent);
     }

 this code is working for the all the other launchers but not for the
 default launcher. I tried using break points in code and found that at
 0 index of list there should be default launcher intent but intent
 does'nt hold the value. Do I need some kind of permission 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: Detect that user entered the lock screen password

2011-12-15 Thread Kevin TeslaCoil Software
No, I've looked into it as well. Depending on your setup you might be
able to time screen off until user present and compare against the
system settings, but that's not a very good solution and I wouldn't
recommend it.

-Kevin

On Dec 15, 1:20 pm, CT ctm...@gmail.com wrote:
 I was wondering if there is a way to detect if the user actually
 entered their password on the lock screen when they last unlocked the
 device. I see that a USER_PRESENT intent is sent out when the user
 unlocks the device, but on the HTC devices, that doesnt actually mean
 that they had to enter their passwords.
 Some HTC phones have a setting called Lock screen after. The user
 will only have to enter their password if the phone has been asleep
 for more than Lock screen afterminutes. If the user unlocks the
 phone within the Lock screen after time period then they dont have
 to enter their password.
 So I'm wondering if there is a way to detect if the user actually
 entered their password when they unlocked the device.
 Many 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: Can the LVL check for Paid app be done from my free app ?

2011-12-06 Thread Kevin TeslaCoil Software
Recently there was a discussion on reddit.com/r/Android about a new
app being unlocked by in-app-purchase. Users were wishing for an
unlock key app or pro version. IIRC their reasons were:
1) Permissions could be less on a pro version (no ads)
2) Fear/uncertainty about if the license would carry over between apps
on in-app-billing. Since in-app-purchases are implemented differently
by different devs, it's inconsistent.

Might be able to get around (2) if it's clearly explained, but it's
understandable how users might associate in-app-purchase with
temporarily items from games or whatever, compared to app-purchases
which are clearly permanent.

On Dec 6, 8:41 am, Emanuel Moecklin 1gravity...@gmail.com wrote:
 I agree with Nikolay.
 The paid section is certainly less frequented than the free section
 and unlocker apps are confusing. You'll have people complaining that
 they paid for an app but didn't get any because they don't realize
 they'd have to download the free app too.
 Why not just have a paid, full version of your app additionally to the
 free app which can be upgraded through in-app billing?
 If you want more discoveries add a live wallpaper or a home screen
 widget to your app - the app will be listed in the according
 categories as well ;-).

 On Dec 6, 7:53 am, androidmediadeveloper kamathaj...@gmail.com
 wrote:







  we're also using inapp billing, and it does work. however, the app is
  listed only on the free section of the market. we want it listed
  under paid as well, more discovery. Are there easier ways to do this
  than using an unlocker ?

  On Dec 5, 8:29 pm, Emanuel Moecklin 1gravity...@gmail.com wrote:

   Why not use in-appbilling to unlock the features in yourfreeapp?
   That way user's don't have to install a secondappthat does nothing
   but unlock features in anotherapp.
   I'm doing this in my own apps and it works nicely.

   Emanuel Moecklin
   1gravity LLC

   On Dec 5, 9:54 am, androidmediadeveloper kamathaj...@gmail.com
   wrote:

I have aFreeappwith pro features locked. I also have a paidapp
that is basically a stub, an unlocker. My question is this, can I
run theLVLcheckto see if user has purchased the unlocker/stubapp
from inside of myfreeapp? It'd be great if this were possible, but
from my experiments until now, isnt the case.

Any advice ? thoughts ?

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: ICS Hardware Acceleration crash

2011-12-05 Thread Kevin TeslaCoil Software


On Dec 5, 12:01 pm, Romain Guy romain...@android.com wrote:
 This setting is unfortunately a double-edged sword, it was intended for
 developers so they could easily test their application with hardware
 acceleration turned on.

I interpreted the setting as an aggressive move to make developers
update their apps for ICS. Of course users are going to check a box
marked Acceleration, especially the first wave of ICS users, Galaxy
Nexus early-adopters or the CM9-alpha crowd.

 You can easily check whether your app is hardware accelerated on startup
 and warn the user it's not supported.

Also it appears that view.setLayerType(View.LAYER_TYPE_SOFTWARE,
null); still works as intended.



 On Mon, Dec 5, 2011 at 9:21 AM, Mark Murphy mmur...@commonsware.com wrote:
  On Mon, Dec 5, 2011 at 12:04 PM, webmonkey webmonke...@gmail.com wrote:
   I see now that there are some websites that advise people to turn it
   on because it makes everything run smoother.

  Got any links? At least we can work on trying to get these posts
  updated, particularly if there's no SDK means of telling Android no
  means no when it comes to the Force GPU setting (and I see nothing in
  the SDK that looks promising).

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

  Warescription: Three Android Books, Plus Updates, One Low Price!

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

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

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

2011-11-30 Thread Kevin TeslaCoil Software
 Unless you friend looks like a pirate, you don't have much to
 worry about :)

Well, he wears an eye-patch, but he said it's because he took a peg-
leg to it a few years back. Do I have reason to worry?

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

2011-11-24 Thread Kevin TeslaCoil Software
 I'm just
 trying to understand how secure is SharedPreferences and what alternatives
 are there, that's all.

On a rooted device SharedPreferences absolutely can be tampered with.
Same with any on-device storage. However this doesn't mean you can't
use them.

1) Obfuscation. This is how Google recommends handling LVL data in
shared prefs. This is not secure as someone could reverse engineer the
obfuscator, but it makes it a pain in the ass and generally not worth
it (easier to crack the APK itself). Check out the
PreferenceObfuscator used for LVL:
http://code.google.com/p/marketlicensing/source/browse/library/src/com/android/vending/licensing/PreferenceObfuscator.java
. It gives you stuff like this: string name=5h99XZgr
+0i5N2SN0lEDu592x14RTrTj6/VOCCnxGokeazVz9bfLW793kkXg01kaBsJa1//
string
You can seed the obfuscator with a device id of some kind to prevent
users from just copying shared prefs from one device to another.

2) Server signed data. When you authenticate your coupon, instead of
saving a true or false, save a string from your server that is
cryptographically signed. At the launch of the app you can verify this
signature even without internet access. Again this is similar to the
LVL approach. It might be too much work as crypto is very confusing.

---

Along the lines of what others are saying, don't invest too much in
anti-piracy stuff. Release and see what happens, if no one cracks it
then don't waste any more time. If it's cracked, look at how they did
it and block it in the next update. Keep adding features in updates
will keep current and future legit users happy, and have the pirates
always playing catch up to the latest version until they get sick of
it and just buy it.

-Kevin

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

2011-11-16 Thread Kevin TeslaCoil Software
Actually in a normal build the resources.arsc file isn't zip
compressed with the other files are and it can be quite large.
Manually running aapt can compress it (and does by default), but then
you get really weird force closes on some froyo devices. I've been
meaning to ask about why this is.

But my advice is not to split the APK and translations. It will create
a lot more work for you and confusion or bugs for users. And phone's
storage space is just getting large.

On Nov 16, 10:58 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Nov 16, 2011 at 9:49 AM, mot12 martin.hu...@gmail.com wrote:
  My app was about 1.5M, after adding 12 languages I am now looking at
  3M because of the multiple string.xml files in the resources.

 So, you added 1.5MB of space with 12 languages. That's around 100KB
 apiece. Since this stuff should be compressed in the APK, that's
 probably close to 1MB of strings per language.

 Hence, the solution would appear to be: make a less wordy app... :-)

 Seriously, how big are your string.xml files?

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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

2011-10-19 Thread Kevin TeslaCoil Software
Related from the SwiftKey devs:
http://www.swiftkey.net/building-apks-with-different-features-from-a-single-source

For my setup I use ant to do release builds, eclipse to do debug
builds. I build for three markets (Google, Amazon, and direct-purchase/
beta). Each has it's own requirements (copy protection, updates, links
to other apps). I use a custom build.xml, it uses replace to switch
a static final int constant for what market I'm compiling against,
this handles all java preprocessor needs as java doesn't compile
dead code. I also use gcc's preprocessor on AndroidManifest.xml to
turn off permissions I don't need (And Eclipse builds just have all
permissions, which is fine). It's a bit limited and not perfect, but
it does the job and didn't cost much time to setup.

Here's the key parts of it, however these are for ADT13, haven't tried
to do an ant build with ADT14 yet.

Disclaimer, I don't know ant so I might be doing things awkwardly.
This is by no means a packaged solution, but an idea/example for you
to build your own system with.

Basically:
AndroidManifest.xml:
  !--
#ifdef LICENSING_MARKET
--
uses-permission android:name=com.android.vending.CHECK_LICENSE /

!--
#endif
--

MarketHandler:
public static final int NO_LICENSING = 0;
public static final int GOOGLE = 1;
public static final int AMAZON = 2;
public static final int DIRECT = 3;

public static final int USE_MARKET = /* @MARKET_START@ */ DIRECT /
* @MARKET_END@ */;


And:
 target name=market 
antcall target=marketreplace
param name=marketparam value=GOOGLE /
/antcall
property name=preprocessor.args value=-DLICENSING_MARKET /

property name=out.myrelease.file.name
 value=${ant.project.name}-market.apk /
antcall target=myrelease /
/target

target name=marketreplace
exec vmlauncher=false executable=sh
arg value=-c /
arg value=perl -e 's!(\@MARKET_START\@ \*/).*?(/\*
\@MARKET_END\@)!$1 ${marketparam} $2!g' -pi src/com/teslacoilsw/
tesladirect/MarketHandler.java /
/exec


 target name=-package-resources

echoPreprocessing AndroidManifest.xml/echo
echogcc -E -x c -P -C ${preprocessor.args}
AndroidManifest.xml/echo
exec vmlauncher=false executable=sh
arg value=-c /
arg value=gcc -E -x c -P -C ${preprocessor.args}
AndroidManifest.xml | sed -e '/^\s*$/d'  gen/AndroidManifest.xml /
/exec
...

On Oct 19, 11:51 am, sblantipodi perini.dav...@dpsoftware.org wrote:
 for people who posted that links, have you tryed to preprocess using
 android?
 does it works? I'm under netbeans and it doesn't work.
 Are you sure that it workd in eclipse?

 On Oct 19, 6:45 pm, Justin Anderson magouyaw...@gmail.com wrote:







  Hey guess what? I found both of those with a simple google search...

  Thanks,
  Justin Anderson
  MagouyaWare Developerhttp://sites.google.com/site/magouyaware

  On Wed, Oct 19, 2011 at 10:44 AM, Justin Anderson 
  magouyaw...@gmail.comwrote:

  http://boldinventions.com/index.php?option=com_contentview=articlei...

   Thanks,
   Justin Anderson
   MagouyaWare Developer
  http://sites.google.com/site/magouyaware

   On Wed, Oct 19, 2011 at 10:43 AM, Nikolay Elenkov 
   nikolay.elen...@gmail.com wrote:

   On Thu, Oct 20, 2011 at 1:38 AM, sblantipodi
   perini.dav...@dpsoftware.org wrote:
How can we live in a world with thousands of devices and dozens of
market without preprocessor?

   Learn to use resources, and ditch your C mentality.

   Really, this has little to do with Android -- Java has no
   preprocessor, and that's that. If you really think you
   need one, use gcc (it is doable). Or some Ant/Maven plugin
   that does string replacement before compiling.

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

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


[android-developers] Re: Application force close after change it from /system/app to /data/

2011-08-29 Thread Kevin TeslaCoil Software
Removing an APK from /system/app won't clean up the left overs in /
data/data. I'd bet that the UID changes and then your properly
installed app can't read the database.
1) Don't install apps to /system/app
2) Don't leave crap in /data/data when removing APKs
3) This list is about SDK development, not anything to do with /system

-Kevin

On Aug 29, 6:35 pm, TreKing treking...@gmail.com wrote:
 On Thu, Aug 25, 2011 at 10:09 PM, sam hrlixi...@gmail.com wrote:
  Do yo know the reason why this happen after change the app
  install location?

 Well if you're trying to open a file relative to the app's install location
 and change that install location, then it's highly likely you won't find
 that file in the new install location.

 Without seeing the rest of your stacktrace, it's hard to say more.

 --- 
 --
 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: How to close entire app?

2011-08-12 Thread Kevin TeslaCoil Software
 So, if this were a Web app, you would attempt to reboot the user's PC
 to prevent them from pressing the BACK button in their Web browser?

That is exactly how I handle my web apps! So can you send me reboot
code for the onBackPressed()? It is urgent.




:)

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

2011-08-08 Thread Kevin TeslaCoil Software

 It is a bug, however, that the lock screen tries to engage at all, when I
 have (since the day I got my Android phone) had it turned off in
 Settings-Location  Security--Set up screen lock (first option set to
 NONE to Disable screen unlock security).

You have disabled the _security_ aspect, this means there is no PIN,
Password or Pattern screen. The standard lockscreen (Keyguard) is
still active. Android provides an API to disable the keyguard, but it
is intended for temporary use. Android 3.x includes System Settings 
Location  Security  Configure lock screen  Off (never lock the
screen) which would do what you want, except it's only on 3.x.
Hopefully we see the option available on phones with icecream
sandwich.

-Kevin

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

2011-08-05 Thread Kevin TeslaCoil Software
Make sure you have:
android:installLocation=internalOnly

In your AndroidManifest.xml, Widgets don't work when installed to the
sdcard.
Full example:
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.teslacoilsw.widgetlocker
  android:versionCode=25001
  android:versionName=2.1.1beta1
  android:installLocation=internalOnly
  

On Aug 5, 12:17 pm, ndiiie 90 rnd...@gmail.com wrote:
 Hi all,

 I have problem in developing app widget.
 When i try it in real device, after i reboot my phone, the widget is
 automatically deleted from my home and i must reinstall the app to have the
 widget in widget list.

 Is there any specific code must be done to prevent that thing?

 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: Payout much smaller than expected

2011-08-04 Thread Kevin TeslaCoil Software


On Aug 3, 11:32 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Thu, Aug 4, 2011 at 1:27 AM, Kevin TeslaCoil Software

 ke...@teslacoilsw.com wrote:
  Mine was split into 4% 96% and I only see the smaller one :(.
  Definitely will be contacting Google Checkout if I don't see the other
  deposit in a day or two. Bank is ING Direct.

 Happens once in a while. Maybe they ran out of
 punch cards for the day :)

I've received the second payout today, so it seems they restocked on
punch cards :)

-Kevin

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

2011-08-03 Thread Kevin TeslaCoil Software
Mine was split into 4% 96% and I only see the smaller one :(.
Definitely will be contacting Google Checkout if I don't see the other
deposit in a day or two. Bank is ING Direct.

-Kevin

On Aug 3, 10:56 am, Jon F Hancock jonfhanc...@gmail.com wrote:
 Yeah. I've been selling in the market for about a year.  I'm familiar with
 the split payments, but this is the first time one has come through and not
 the other.
 Yeah. I've been selling in the market for about a year.  I'm familiar with
 the split payments, but this is the first time one has come through and not
 the other.

 It could be my bank.  Checkout shows both payouts on Aug 2.

 Between my app getting pushed down in search lately and this (plus the
 overall payout was $200 less than I was expecting), I'm starting to get
 paranoid that Google wants me to get out of the Android development
 business.

 Jon

 On Wed, Aug 3, 2011 at 8:11 AM, String sterling.ud...@googlemail.comwrote:







  It's normal for the payout to come in two parts, one much larger than the
  other. For example, this month I have one that's about 7% of my Market
  profit, while the other is about 93%. Don't know why, but it's been like
  this ever since Google switched to monthly payouts.

  But if only one has arrived in your account, that's obviously *not* normal.
  If it doesn't show up in the next day or so, you need to pursue it with
  Checkout support.

  String

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

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

2011-08-01 Thread Kevin TeslaCoil Software
I think a library project will do what you want, and be pretty easy to
manage to. You'd create your basic app as a library, then create a new
app for each customer, and include that shared library. Any customer
specific changes, including drawables, just get placed in a non-
library project. The library drawables would be replaced with the
customer specific ones and you could even do code changes there too.

More on library projects: 
http://developer.android.com/guide/developing/projects/projects-eclipse.html

-Kevin

On Aug 1, 7:21 am, Kostya Vasilyev kmans...@gmail.com wrote:
 You can reference resources via a theme, with ?attr/blahblah syntax.
 It certainly works for drawables, and should be easy to test if it works
 for layouts as well.

 01.08.2011 16:18, Christine пишет:

  I have tried whitelabeling an app, so I can use the same codebase for
  a number of customers. What's different in the apps is the graphics,
  styles and layouts, not the code. The best way I could think of is
  have an ant script that copies the res folder and the manifest file
  into a separate project, and copy it back to the main project. By
  running this ant script I switch between skins. But there must be a
  more elegant way of having skins for an app. Styles won't do it,
  because that's too limited, you can only change android: attributes,
  not layouts and drawables.
  Wouldn't it be nice if a Theme didn't just have it's own styles, but
  also its own res folder?

 --
 Kostya Vasilyev

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

2011-07-25 Thread Kevin TeslaCoil Software
The adb user also has access to /dev/graphics/fb0 so theoretically you
could do this with a shell script over adb instead of rooting the
device.

On Jul 25, 5:47 pm, lbendlin l...@bendlin.us wrote:
 If you have a rooted phone and a large SD card  you could run a background 
 service that grabs the /dev/graphics/fb0  raw images and stores them for 
 later conversion. Or you convert it on the fly to png - but that might 
 stretch it already.

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

2011-07-21 Thread Kevin TeslaCoil Software
I highly recommend AppMonger to monitor app sales:
https://market.android.com/details?id=com.rectangularsoftware.appmongerfeature=search_result

It has some quirks, but it's nicely polished and gives pretty looking
charts.


On Jul 21, 11:03 pm, Jim Graham spooky1...@gmail.com wrote:
 On Thu, Jul 21, 2011 at 10:03:24PM -0500, TreKing wrote:
  On Thu, Jul 21, 2011 at 7:52 PM, Jim Graham spooky1...@gmail.com wrote:

   Just curious...are Google checkout page updates only done
   periodically, like the Market page updates?  Or are they done more often 
   or
   more or less real-time?

  Seems like more or less real-time.

 Ok, thanks.

 --
 73 DE N5IAL (/4)        | Remember your spelling rules, including:
 spooky1...@gmail.com    |   I before E except after C
  Running FreeBSD 7.0  |
 ICBM / Hurricane:       |   BEING a native-born American, I don't
    30.44406N 86.59909W  |   always notice our WEIRD spelling

 Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.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: Droid X 2 issue

2011-06-25 Thread Kevin TeslaCoil Software
Most likely it's just hdpi. qHD is the name of the resolution. The
Atrix handles this just as extra space, like the older motorolas did
with the 854x480 rather than 800x480, it could just display a bit more
of your layout but it wouldn't scale up images or anything. So if you
are assuming that the screen is 320dp wide, you are in trouble. But if
your layout handles stretching well it should be fine.

(I have an Atrix and dev against it, I don't have a Droid X2)

-Kevin

On Jun 25, 9:42 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 normal-xhdpi, AFAIK.  But as long as your provide HDPI resources, it
 will upscale, so it's not something you need to worry about.

 There are other 540x960 devices out there, for example, the Motorola
 Atrix.

 On Jun 26, 10:10 am, limtc thyech...@gmail.com wrote:







  Hi,

  I got reported from Droid X 2 users regarding the resource issues on
  new resolution... can anyone tell me what is the drawable type? hdpi?
  large-hdpi? large-mdpi?

  Any other devices using 540x960 resolutions?

  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: How to give a APK file to customer for testing

2011-06-22 Thread Kevin TeslaCoil Software
 This is what lawyers and contracts are for.

If a user emails me with a legit bug report, they seem to be pleased
with a reply including an APK to test. Somehow I don't think they'd
appreciate a contract nearly as much. And is the lawyer really going
to try to enforce things all over the world, or would the contract be
for USA only and cut out all those volunteer translators in other
countries?

 you can sign test versions of the app with your debug keystore
 which will have an expiration date typically = 1 year

This doesn't prevent it from being installed, just prevents you from
releasing an update for it.

Also worth nothing, that if a beta tester or even pirate is using an
app signed with your own key, they can go to the Market and buy it and
install the update and now they're legit without hassel. But if
they're using a APK signed with a different key (debug key, or signed
by the pirate cracker) then they get a Package signed incorrectly
error and have to uninstall before they can get the Market version.

  Now, I am looking for a professional way for deal with the problem.
 As this must be a very common scenario for every developer. There must
 be a good solution for this problem.

My needs, which may differ other developers:
1) Aside from Google/Amazon I accept paypal directly and have a fair
amount ( 2,000) of users that have gone that route. This is a utility
app where updates are very important to users. Giving them the APK
just once isn't sufficient, they need updates. Only the Market isn't a
good solution as some countries still don't have it and many people
don't have credit cards or trust Google Checkout.
2) Beta testers and translators, some of which are more trustworthy
than others. Before I implemented a proper system one of my non-copy-
protected betas was leaked by a translator. I learned my lesson.
3) Gift to previous Google Market users who have switch accounts, got
a secondary Chinese tablet type device without the Market, etc
4) Gift to App reviewers, friends, other developers, etc


For a long time I handled this with mailing lists to send the APK and
updates (with no copy protection) to everyone. (One list for stable
and one for beta). This is a headache and does not scale and you get
so many emails lost in spam or bounced or whatever. (But it takes very
little effort to setup, so you might consider it for that reason. Just
replace it before you have several hundred people on the list)

I ended up rolling my own setup, which I'm quite pleased with. When I
add a user (either beta user or stable user), my server emails them
with:
Their authorized email address
Their authorization code
A URL that will always download the latest APK for said app (stable or
beta, depending on user type)

They download the APK and it prompts them for their email and
authorization code, they hit submit and it verifies from my server,
then unlocks the app. The app can license check, using a system very
similar to LVL (so I can reuse my LVL code), over http. Server
controls how many devices the users are licensed for, and I can
increase these if I have a trusted beta tester with lots of devices or
decrease/revoke if I see someone leaked their credentials. The app can
also check for updates by itself and download the latest version and
leave a notification for the user to install it.

My setup isn't polished enough for people that are not me to use right
now. But is there interest in something like this? Would developers
pay for a hosted service like this? (I know I would've paid for one
when I was looking, but I couldn't find anything that met my needs.
AndroidPit will charge you to gift an app and has nothing for betas.
AndroidLicenser doesn't do updates or betas and is limited to one
license per device)

-Kevin


On Jun 22, 12:42 am, yogesh bansal yogeshbansa...@gmail.com wrote:
 Hi,

 I am newbie android app developer. I am confused, how to deliver the
 APK file to customer for testing. Let suppose, if i give the apk file
 directly to customer for testing. Then the purpose of the customer is
 solved. Now he has the apk file with him and He can use it freely and
 after that he can refuse to pay the money. It is possible , i have to
 deliver apk file to customer every day for testing . Once the
 application is finalized, he can refuse to pay. As I have a consent
 with the customer, that he has all the right of the application and
 code, so i cannot upload the application in the android market also. I
 know that , i can put some kind of check inside the code to restrict
 the usage. But i feel that won't be a good approach and also not
 professional solution.

   Now, I am looking for a professional way for deal with the problem.
 As this must be a very common scenario for every developer. There must
 be a good solution for this problem.

   Please guide me on this problem

 Thanks
 Yogesh Bansal

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

[android-developers] Re: How does launcher get the applications' icons and corresponding text

2011-06-17 Thread Kevin TeslaCoil Software
It does.

Source for Launcher2 is available:
https://android.git.kernel.org/?p=platform/packages/apps/Launcher2.git;a=summary

On Jun 17, 10:37 am, June Hello junehelloworld.he...@gmail.com
wrote:
 Does launcher load icons by using PackageManager as well, I think I need to
 learn the source code.

 Thanks a lot for your help







 On Fri, Jun 17, 2011 at 11:22 PM, TreKing treking...@gmail.com wrote:
  On Fri, Jun 17, 2011 at 9:31 AM, June_Hello 
  junehelloworld.he...@gmail.com wrote:

  I encountered with a question. Where and how  does the launcher get
  the icon and text of the application which has

  be installed in the phone, Is this information stored in database, or
  any other way else? and how can I get another

  app's icon which is showed on launcher from another my own.

  Any time you want information about other packages installed on the device,
  first stop should be PackageManager.

  --- 
  --
  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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Google removed 10 mallware apps - I'm affected. Please help

2011-06-15 Thread Kevin TeslaCoil Software
 tesla

Hey! That's my keyword (TeslaLED Flashlight)!

I do agree that keyword spam doesn't seem big enough of an offense for
your whole account to be deleted.
Any chance one of your other apps did something that could've been
considered malware? Maybe Tiny was just caught in the mix and the
target was a different app.

Good luck,
-Kevin

On Jun 15, 1:15 am, Romain Guy romain...@android.com wrote:
 After the list of devices you have the following:

 Torch, Light, Camera, Flash, Color, Dark, Bright, Brightness,
 Brightest, Lights, Signal, Find Keys, Screen, Effects, brightest
 flashlight, Emergency, Warning, Police, brightest led flash,
 DroidLight, Maximum, Backlight, Best, Great, Fun, Cool, Coolest,
 Widget, led flashlight, led flash, led light, brightest led
 flashlight, camera light, color flashlight, color flash, tesla, bright
 light, brightness, flash camera, flash, cam light, screen light, light
 effects, simple flashlight, search, screen brightness, brightest app,
 max brightness, maximum brightness, dark, darkness, police light,
 emergency light

 This looks to me like you overdid it a little bit ;-)









 On Tue, Jun 14, 2011 at 11:02 PM, n.a devuni...@gmail.com wrote:

  On Jun 15, 8:40 am, Zsolt Vasvari zvasv...@gmail.com wrote:
   What Google has to do is to create a separate Tags input field in the
   market admin panel, give it some limit and then let the developers
   compete. This is the fair way.

  In your case, 2/3 of your app description was keywords

  I'm sorry, but this is not true. You can still see it here:
 http://www.androidpit.com/en/android/market/apps/app/com.devuni.flash...

  Also, most of the keywords are just device models, which the
  flashlight works on.

  -- so you were
  by far one of the worst violators.  Perhaps one of your competitors
  reported you for stealing from them and Google acted on it.  I have no
  idea.
  Is there anything stopping you from creating a new account, paying the
  $25 again and republishing your app?  It's not ideal, but since you
  have a free app, it's not like you have to migrate the users.  If your
  app is good, and I believe it was, your rank would rise fairly quickly.

  This is a workaround. I hope that Google will change their internal
  policy and start warning the developers before deleting applications
  and accounts.

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

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

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

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


[android-developers] Re: Users unable to download from the market

2011-06-13 Thread Kevin TeslaCoil Software
Earlier today I had a ton of Customer review in progress stalls,
market comments and a user that email me asking if I was planning on
doing something about the download issues people were experiencing.
Oh I wish I could.

Anyway now things have picked up and my total sales for the day still
look normal (Using Appmonger for the summary, highly recommended BTW)


If anyone is interested, here is my standard Market issues canned
response. Usually send it a few times a day, unless Google is
updating the Market in which case I usually craft a custom canned
response just for that day that basically says it's out of my control
and to wait it out or let me know the order number and I can cancel. I
also have a canned response for I looked up your order and it shows
as Customer Review in Progress and then just includes what Google
says that means and explain that it's out of my control.

Canned response:

If you send me your order number I can check the status, you can find
your Google Checkout Order Number at http://checkout.google.com . But
here's a few common Market problems/hints:

1) Incorrect billing information. The Android Market does not directly
notify you of this problem and often looks like it's successfully
authorized when it has not. Supposedly Google sends you an email
notifying you when this occurs. You can check on this and remedy it by
checking http://checkout.google.com from a desktop computer and
updating your billing information.

2) Reset Market Connection:
Make sure that your phone is logged into Google Talk by following
these steps:

Go to your phone’s app launcher, and press the Talk app
If you’re already logged into Talk, press Menu, and then touch Sign
out
Launch Talk again to sign in

https://market.android.com/support/bin/answer.py?hl=enanswer=1067233

3) Customer Review In Progress . If this is your first purchase on the
Market, Google may be reviewing your account and stalling
authorization/downloads until this process is completely.
Unfortunately this is completely out of my control.
https://checkout.google.com/support/sell/bin/answer.py?answer=45175hl=en_US

-Kevin





On Jun 13, 10:54 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 I've had slow sales for the last 3 days and 0 ratings/comments.  My
 install stats are stuck also.  Looks like the Market is not working
 properly.  Or should I say, it's working as poorly as it usually does.

 On Jun 14, 8:19 am, JonFHancock jonfhanc...@gmail.com wrote:







  Over the last couple of  hours I have had an unusually high number of
  comments from users giving low stars and complaining that they can't
  download/install from the market.  Haven't had any sales in the last
  hour either.

  Anybody else having the same problem?

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


[android-developers] Re: In Android, how to get the keyevent of 'home Key' ?

2011-06-08 Thread Kevin TeslaCoil Software
 I don't remember anyone asking
 how to prevent the user from pressing the power key to unlock the phone :)

That's be because the power key doesn't unlock the phone :P, it wakes
it up, then you slide to unlock.

I do actually get user requests to disable the power key from waking
the device, but I just say sorry, not going to happen.

-Kevin




 -- Kostya

 2011/6/8 Robert Green rbgrn@gmail.com







  Think of home like alt-tab in windows.  You never need to capture it.
  You just need to handle onPause()/onStop() in a way that makes sense
  for the user temporarily leaving your app.  You'll get onFinish() when
  your app is to be actually destroyed.  If you have a need to actually
  kill off the whole thing when home is pressed, call finish() in
  onPause()/onStop() and you shall receive the touch of the droid
  reaper, making for a clean start next time the user tries to enter the
  activity.

  On Jun 8, 10:31 am, Indicator Veritatis mej1...@yahoo.com wrote:
   Your blog post IS the best explanation I have seen to date of what the
   Home key really means. I thought it was particularly interesting that
   it emphasized something I have been dimly aware of but keep
   forgetting: unlike the Back key, pressing Home does NOT cause finish()
   to be called. I assume from your description that it triggers only one
   lifecycle callback, onPause(). It doesn't even itself trigger
   onStop(), which may or may not follow.

   But shouldn't it trigger onStop() too? After all, the application is
   no longer visible. And what about the Activity Stack? Doesn't pressing
   Home put the least recently used Activity on that stack?

   In fact, when I put Log.d statements in my main Activity for both
   onPause() and onStop(), I see both get called when I press the Home
   key.

   On Jun 8, 5:13 am, Mark Murphy mmur...@commonsware.com wrote:

On Wed, Jun 8, 2011 at 7:20 AM, Mark Murphy mmur...@commonsware.com
  wrote:
 On Wed, Jun 8, 2011 at 2:31 AM, Droid rod...@gmail.com wrote:
 I need to know when the home button is pressed too (otherwise my app
 returns to visibility again and again for ever).

 Then fix your bug.

 (Please don't tell me I need to design my app
 'properly', I have been Android dev for over a year now)

 Tough. Design your app properly.

I just wrote up a blog post about why you should not care about the
HOME button and how better to solve this problem:

   http://commonsware.com/blog/2011/06/08/please-ignore-home-button.html

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

Android 3.0 Programming Books:http://commonsware.com/books

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

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

2011-06-06 Thread Kevin TeslaCoil Software
I recommend ignoring the timestamp (and retry count) if the last non-
retry response you've received was a licensed response. Yes it could
theoretically be taken advantage of, but it can really reduce the
number of false positives. I used to do this and the only false
positives are when people reset/switch roms/whatever and use a new
google account (so not really a false positive).

But in a recent update I accidentally did something to sometimes
require the timestamp (I have my own LVL-copy that doesn't require
Google Market that I use for direct purchases, and I made a change
there). Then it seems at the end of last month a handful of LG Optimus
phones changed the date incorrectly (???). Users on these devices were
locked out but if they set the date to the correct date then the
problem was resolved. (Naturally some users had the problem with other
apps too, not just mine). Weird. It was only a handful of users that
emailed me about it, but I was used to never getting actual false
positives, due to ignoring the time stamp before, that it was quite
surprising.

I've still had a few other reports from users on other devices so I do
plan on ignoring the timestamp again in my next update. The pirates
don't really attack LVL at that level anyway, they look for where the
allow/deny decisions are made and make their smali changes there.

-Kevin

On Jun 6, 6:19 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 Recently, I've been getting a lot messages from users about how I am
 asking for the network to be enabled to verify the license using LVL.
 I throw up this message whenever I cannot contact the licensing
 server.  I haven't had any complaints until the last couple of weeks,
 so I investiagated the issue.  I am using the Google provided license
 validity stamp.  It seems like the timestamp Google is now returning
 only shows the license to be valid for no more then ONE HOUR.

 One hour is useless, I might as well just use the Strict licensing and
 validate the license every time I start the app.  I would have
 expected the license to be good for days.

 Has anyone else seen this happening?

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

2011-06-06 Thread Kevin TeslaCoil Software
This group is probably not the best place to ask rooted related
questions as it focuses on SDK development which root is not. XDA or
StackOverflow might be a better bet, in general use of root in
development is poorly documented though.

But no, an Android app cannot* run as root (And as annoying as it can
be, this is really good for security, root is already overused in
apps). You can however use su to open a shell or custom binary and
keep that process running and communicate with that by writing to it's
input stream. It's kind of messy and error handling sucks and you have
to deal with the shell (Unless you write your own binary and
communicate with that).

-Kevin

* Okay nothing is impossible, but seriously it's not realistic

On Jun 5, 10:43 pm, Mike mikec...@gmail.com wrote:
 I am trying to create an application that takes advantage of Dynamic
 Voltage and Frequency Scaling (DVFS).  My phone is rooted and I can
 successfully scale my device with the following command:

 psProc = Runtime.getRuntime().exec(new String[]{su, -c, echo
 30  /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed});

 However, this command is executed frequently since it appears within
 the repaint method of a game.  I would like to execute echo 30  /
 sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 30, without
 using su, -c, since switching to the root user may be slow.  Can I
 grant an entire application super user privileges before hand so that
 I may omit su, -c, in my execution?

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

2011-06-04 Thread Kevin TeslaCoil Software
I'm pleased with the Amazon Appstore, but I do still get the majority
of my sales from the Android Market.
My app has been ranked pretty high on Amazon since the beginning. I
believe part of the reason is that it's oriented at power users and
that overlaps with the early adopters of the Amazon Appstore. Also
it's a well known app so if people are browsing the store there is a
decent chance they've heard of it before on forums or blog sites or
whatnot. Recently Amazon did a promotion with my app ($0.99 on sale
from $1.99) and that work nicely, afterwards they talked to me about
the promotion and posted a little bit about it here:
http://www.amazonappstoredev.com/2011/06/developer-spotlight-widgetlocker-by-teslacoil-software.html

Also I noticed a nice boost in sales on the 31st, I assume this is do
to the traffic to the Amazon store to get Plants versus Zombies for
free, then while it was downloading or whatever they browsed a bit and
found my app and got it. Nice.

-Kevin


On Jun 4, 9:50 am, sblantipodi perini.dav...@dpsoftware.org wrote:
 As title,
 my apps sells quite good on the android market, haven't sold anything
 on the amazon appstore and you?

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

2011-05-25 Thread Kevin TeslaCoil Software
A normal app cannot get the STATUS_BAR permission or disable the
status bar. It's for system apps only.

On May 25, 9:19 am, jhonny jhonny...@gmail.com wrote:
 Hi all,

 So I'm trying to do an app, but I must to block the status bar, like
 when you are calling and you can't push down the bar.

 Does somebody know how can I do this.

 I read about the permission:

 String  STATUS_BAR      Allows an application to open, close, or disable the
 status bar and its icons.

 And I'm trying about the BroadcastReceiver, but I don't now how to
 disable the status bar!!

 Thank you all

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


[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-23 Thread Kevin TeslaCoil Software
I quit my day job several months ago for my Android Apps career and
am doing very well and love it. But it's not like I set out to be an
Android App developer. I taught myself programming and programmed the
hell out of whatever I could, went to university for Electrical
Engineering/Robotics, got a job doing Perl/MySQL web stuff, almost
bought an iPhone but went for the Nexus One instead and started
playing with developing for it after work for fun, eventually it grew
into something more. I plan on sticking to my Android Apps career as
I love it, but if suddenly everyone switches to Chromephones or
something, I could easily switch my career to Computer Science or
Electrical Engineering or iPhone Apps career. Programming is
programming, and practicing such is a worthwhile (and fun) use of
time.

-Kevin

On May 23, 10:25 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 Not to sound braggy, but my app has been netting $3000+/mo in sales
 for the past 6 months, after Google's cut.

 It all depends what your app is -- if it's a toy app, expect toy
 income from it.  If it's an app that adds serious value to people's
 lives, expect an income go along with that.  It's complete BS what
 some iPhone advocates are saying about Android users being cheap.

 That said, even $3000/mo is not a replacement for a real job, to be
 honest.

 On May 24, 10:31 am, Justin Anderson magouyaw...@gmail.com wrote:







  I would have to agree that for the most part creating Android Apps would not
  be a career.  While it is true that a few developers may be able to make it
  a career the majority of us do it for fun...

  I have three apps on the Android Market (2 paid and 1 free)... All apps are
  rated 4 or 4 1/2 stars and yet my highest months of sales are about $100
  after Google's cut.  Its not bad for a hobby (especially since I write my
  apps because I use and like them) but anyone trying to make it as a full
  time career should have a viable alternative.

  Thanks,
  Justin Anderson
  MagouyaWare Developerhttp://sites.google.com/site/magouyaware

  On Mon, May 23, 2011 at 8:11 PM, Kristopher Micinski krismicin...@gmail.com

   wrote:

   On Mon, May 23, 2011 at 2:11 PM, imran115 imran.hyd...@yahoo.co.ukwrote:

   Hi everyone,

   I was wondering what peoples thoughts maybe on the application that
   Android are developing, that allows people with no programming
   experience to create apps. I am currently learning the basics in
   Android development and wanted to pursue it as a career. Is there any
   point, as just about anyone will soon be able to create an app?

   The link below shows what I am talking about.

  http://appinventor.googlelabs.com/about/

   Will programming for Android apps no longer be a specialist skill,
   hence not much of a career?

   I'm going to argue that Android apps is not a career.

   You won't find many people making real money on their apps.  Most people 
   do
   it for a mix of fun and profit, if that.

   Android application development is a really niche area, without a solid
   background in computer science or some related field, you'll quickly be 
   out
   of a job with no alternative.

   But to answer your question, of course not, see the last point in Edsger
   Dijkstra's How do we tell truth's that might hurt :-)

   Kris

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

  - Show quoted text -

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


[android-developers] Re: Does the Samsung Galaxy Tab 10.1v work with OSX?

2011-05-17 Thread Kevin TeslaCoil Software
I think the 10.1v is actually the fatter one and the 10.1 is the
thinner one that was handed out at Google I/O and not publicly
released yet?

Anyway the whole Doesn't work with Mac, the world is ending news
about the Google I/O tab was totally blown out of proportion. I use a
Mac for development and naturally plugged in the tab and started using
ADB. Everything worked fine. I didn't even know there was an issue
until I saw the news articles the next day. I guess that's for copying
files without using adb-push.

I'd imagine the 10.1v works with adb also.

-Kevin

On May 17, 6:36 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
 Wait for this device to be officially released to find out. I/O pre-release
 does not really count.

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 *Date In Tray* http://bit.ly/dateintraypro - current date at glance...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

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

2011-05-13 Thread Kevin TeslaCoil Software
I mostly agree with the blog post but some additional thoughts:

1) Google just opened up paid apps in more countries. There's
potential to turn current pirates into legit users. However if they're
already used to downloading your app from the pirate sites then even
after you release an update they might not even both getting it from
the Market. Unless they can't get it from the pirate sites right away.

2) In my experience, the way Android piracy works is that people get
APKs using the 15 minute period, then they run the APK through the
easily available LVL removing tool, then they post the APK. They're
doing this so frequently and so fast that they DON'T EVEN TEST THE APK
before posting. My app used to crash within 10 seconds of launch due
to something happening in the LVL removing tool. I had tested the tool
before publish and knew about this, but figured hey that means people
won't use the tool. Now I know better, such a setup means getting a
whole lot of emails from users complaining that it crashes as soon as
they open it. So instead I do a really simple check to see if the LVL
removing tool was used and if so I finish the activity and launch the
Market. By hand a person could find and remove this check easily, but
now when people blindly run the tool at least I won't get emails
complaining about crashes.

My point is that in order to make it inconvenient to pirate, you need
your LVL to sneak past the tool. Worrying about a human cracking your
app is less of an issue as by the time one does that the app has
likely been out for a while and you have an update almost ready. But
if the tool works then it can be on all the pirate sites nearly
instantly after you release an update.

-Kevin

On May 12, 2:34 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 http://jeff-vogel.blogspot.com/2011/05/final-answer-for-what-to-do-to...

 I totally agree with that blog post.  I believe the vast majority of
 users, at least for non-trivial apps, resort to piracy not because
 they are too cheap to pay for it, but because the app is not available
 in the country they live in and have no choice but to pirate.

 This is exactly the same reason why a lot of people download new-run
 TV shows using torrents.  It has nothing to with being too cheap to
 pay a buck for a show, but the simple fact is that they are not given
 an option.  Hulu is not available outside of the US and the 6-12 month
 delay is unacceptable to a lot of people.  But I digress...

 I believe when the Android Market is finally made available in those
 additional 99 (really?) countries, things will improve.

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

2011-05-06 Thread Kevin TeslaCoil Software
moveTaskToBack is what you're asking for, but check the rest of the
documentation about the lifecycle too to make sure it's what you
actually need.
http://developer.android.com/reference/android/app/Activity.html

On May 6, 11:07 am, Cel kristjan.la...@gmail.com wrote:
 i know how to cancel back keypress, so that the activity / main window
 stays visible:

     public void onBackPressed() {
         return;
     }

 my aim is to hide the activity, however, without finishing it, how do
 you do that in the onBackPressed event?

 i.e. I would like to get as far as onPause(), but not evoke the
 onBackPressed() default behaviour that essentially calls finish().
 another way to put it is that i would like to mimic
 onUserLeaveHint() ?

 any help appreciated!

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


[android-developers] Re: Battery Log using service

2011-05-03 Thread Kevin TeslaCoil Software
 The suggest to create an alarm to
 wake up every 5 minutes is a good one.  That will actually be more robust
 than having a service always running.

Would it be possible to expand on this at all? My (perhaps incorrect)
method of testing behavior with a service that is always running is by
killing the process from adb shell. I think I've always seen something
in the logcat about the service being scheduled to restart in 5
seconds. This is true either with a startForeground notification icon
or with out. I'm guessing that in some cases it might be more than 5
seconds and that's why the 5 minute alarm is a good idea?

Thanks,
-Kevin


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

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

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


[android-developers] Re: Developing on Inspire 4G

2011-04-30 Thread Kevin TeslaCoil Software
Actually on ATT you can't use http or dropbox to install APKs because
ATT block sideloading.

But enabling the phone's System Settings  Applications  Development
 USB debugging and using eclipse or adb is easier anyway.
(And like Mark said you may need the usb driver)

-Kevin

On Apr 30, 12:47 am, Russell DuRoss r2s...@gmail.com wrote:
 Another option is to use Dropbox.

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

2011-04-15 Thread Kevin TeslaCoil Software
 java.lang.RuntimeException: Unable to start activity
 ComponentInfo{com.example.android.livecubes/com.example.android.livecubes.c 
 ube1.XmlSample}:
 android.view.InflateException: Binary XML file line #11: Error
 inflating class net.youmi.android.AdView

Your activity is starting, but the activity is crashing because your
XML references net.youmi.android.AdView and that class isn't found.
Most likely your forgot to include the youmi AdView jar. Test first
without ads and then add them when you have it working.

-Kevin


On Apr 15, 10:27 pm, a a harvey.a...@gmail.com wrote:
 Dear all,

     There have a apk which have published on google market named
 Launcher Wall, it can launch activity from it's live wallpaper.

 So, i can launch my activity from my live wallpaper also, right? But
 following exception caused when tap the live wallpaper to launch.

 03-01 09:45:12.005: ERROR/AndroidRuntime(4800): FATAL EXCEPTION: main
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):
 java.lang.RuntimeException: Unable to start activity
 ComponentInfo{com.example.android.livecubes/com.example.android.livecubes.c 
 ube1.XmlSample}:
 android.view.InflateException: Binary XML file line #11: Error
 inflating class net.youmi.android.AdView
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1665)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1681)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.app.ActivityThread.access$1500(ActivityThread.java:118)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:933)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.os.Handler.dispatchMessage(Handler.java:99)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.os.Looper.loop(Looper.java:123)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.app.ActivityThread.main(ActivityThread.java:3701)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 java.lang.reflect.Method.invokeNative(Native Method)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 java.lang.reflect.Method.invoke(Method.java:507)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 
 875)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 dalvik.system.NativeStart.main(Native Method)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800): Caused by:
 android.view.InflateException: Binary XML file line #11: Error
 inflating class net.youmi.android.AdView
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.view.LayoutInflater.inflate(LayoutInflater.java:408)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.view.LayoutInflater.inflate(LayoutInflater.java:320)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.view.LayoutInflater.inflate(LayoutInflater.java:276)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.jav 
 a:207)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.app.Activity.setContentView(Activity.java:1657)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 com.example.android.livecubes.cube1.XmlSample.onCreate(XmlSample.java:14)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1613)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     ... 11 more
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800): Caused by:
 java.lang.ClassNotFoundException: net.youmi.android.AdView in loader
 dalvik.system.PathClassLoader[/data/app/com.example.android.livecubes-2.apk ]
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 java.lang.ClassLoader.loadClass(ClassLoader.java:551)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 java.lang.ClassLoader.loadClass(ClassLoader.java:511)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.view.LayoutInflater.createView(LayoutInflater.java:471)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
 android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     ... 20 more
 

[android-developers] Re: widget on lockscreen

2011-04-04 Thread Kevin TeslaCoil Software
It's not a Widget like an AppWidget. It's an activity that starts
when the screen is off, similar to the alarm clock popup.
Check out FLAG_DISMISS_KEYGUARD and FLAG_SHOW_WHEN_LOCKED.

HTC customized the actual keyguard to pull layout resources from an
APK (but only their own APK, except on the EVO 3D maybe).

-Kevin

On Apr 4, 9:58 am, Martin Obreshkov manig...@gmail.com wrote:
 Hmm i noticed that MixZing is also having a lock screen widget. If this is
 only possible for HTC sense how they do it.

 On Wed, Jun 30, 2010 at 11:51 AM, Martin Obreshkov manig...@gmail.comwrote:









  Thanks

  On Wed, Jun 30, 2010 at 11:35 AM, Al Sutton a...@funkyandroid.com wrote:

  It's a firmware thing, so yes, HTCs Sense can do it, but only because
  HTC wrote the firmware.

  Imho it's not a gerat idea anyway. One reason for having a lock screen
  is that it stops things happening when your device is put somewhere
  where it may get pressure on the screen which may cause undesirable
  behaviour (e.g. in a bag or pocket), so by putting your controls on
  the lock screen you run the risk of someone having the music paused or
  skipped due to a knock on the screen and then having to dig the device
  out in order to re-start/re-position playback.

  Al.

  On Jun 30, 9:24 am, Martin Obreshkov manig...@gmail.com wrote:
   Thanks for the reply but what about htc sense it has some controls over
   lockscreen. Is this implemented by htc sense onlyhttp://
  phandroid.com/wp-content/uploads/2009/06/rosie-lock-screen.jpg

   On Tue, Jun 29, 2010 at 8:12 PM, Dianne Hackborn hack...@android.com
  wrote:

Sorry this is not currently supported.  That comment in the
  documentation
is simply describing what could be done in the future.

On Tue, Jun 29, 2010 at 8:22 AM, manigault manig...@gmail.com
  wrote:

Hi all i am developing music player and i want to put some controls
when screen is locked. Is there a way to put widget when screen is
lock ? The documentation says that For example, the home screen has
one way of viewing widgets, but the lock screen could also contain
widgets, but i couldn't find a way to add widget to lockscreen so
  any
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.comandroid-developers%2Bunsubs
  cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

--
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.comandroid-developers%2Bunsubs
  cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

   --
   When I raise my flashing sword, and my hand takes hold on judgment, I
  will
   take vengeance upon mine enemies, and I will repay those who haze me.
  Oh,
   Lord, raise me to Thy right hand and count me among Thy saints.

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

  --
  When I raise my flashing sword, and my hand takes hold on judgment, I will
  take vengeance upon mine enemies, and I will repay those who haze me. Oh,
  Lord, raise me to Thy right hand and count me among Thy saints.

 --
 When I raise my flashing sword, and my hand takes hold on judgment, I will
 take vengeance upon mine enemies, and I will repay those who haze me. Oh,
 Lord, raise me to Thy right hand and count me among Thy saints.

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

2011-04-04 Thread Kevin TeslaCoil Software
You're not alone. I also suspect during the short time that reporting
was available the numbers were wrong.

I'm also in the top paid apps for Amazon and really want to know what
my numbers are. I contacted them and they said they're aware of the
issue and working on it. Hope we get to see some numbers soon.

-Kevin

On Apr 4, 6:49 pm, Gregg Reno gregg.r...@gmail.com wrote:
 I haven't been able to see my Amazon appstore order report in over a
 week. As a developer with an app in the top 25 paid apps list, this is
 really frustrating. I have no idea what my sales have been since
 launch.  Am I the only one having this problem?

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


[android-developers] Re: New Android Phone

2011-04-03 Thread Kevin TeslaCoil Software
 There's something wrong with your phone.

He already said that:
 I have a Samsung Galaxy S phone.



-Kevin


On Apr 3, 2:25 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 3 April 2011 21:04, Andrei Gherzan and...@gherzan.ro wrote:

  Hello to all,

  I have a Samsung Galaxy S phone. I've been using this phone for a 4 months.
  In these months i realized that i really need a faster phone. This one works
  like... :) Really! I mean some times, i have to wait like 20 seconds for my
  Agenda to come up and running. And this is annoying.

 There's something wrong with your phone.

  So i need some advice upon an android phone as i want to buy a new one.

 This is not the right group for such discussion.

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *







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

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


[android-developers] Preprocess AndroidManifest.xml ?

2011-03-30 Thread Kevin TeslaCoil Software
With all these Markets, apks are starting to get more complicated. I'm
taking the approach of a different APK for different Markets.
There's some permissions I need in some cases and not in others. Like:
com.android.vending.CHECK_LICENSE

It doesn't hurt anything to have it on the Amazon store (And they
haven't rejected for it), but it's unnecessary.
I also have a direct-purchase option and I want to use,
READ_PHONE_STATE. I don't want to include this permission when it's
unnecessary for the Google Market or Amazon Appstore.

The idea in my head is having an AndroidManifest.xml like:

!--
#ifdef USE_GOOGLE_MARKET
--
uses-permission android:name=com.android.vending.CHECK_LICENSE /

!--
#endif
--
!--
#ifdef USE_DIRECT_LICENSING
--
uses-permission
android:name=android.permission.READ_PHONE_STATE /
!--
#endif
--

Then run AndroidManifest.xml through cpp. This would mean I could
compile debug builds with Eclipse easily, and they'd just have all
permissions. But when using Ant I could limit it to just one Market's
permissions.
(I'm handling actual java code with a static final int MARKET_TYPE
deal that gets set by ant)

Anyone know of anything like this that already exists? Anyone know why
this is a horrible idea and I shouldn't pursue it?

-Kevin

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

2011-03-29 Thread Kevin TeslaCoil Software
 Opera has just launched its own Mobile App Store

And instead of contacting developers to get them to submit their apps
before launch, Opera just populated it with pirated software... Not a
good way to gain developer support or credibility.

-Kevin


On Mar 25, 2:07 pm, Fernando Cassia fcas...@gmail.com wrote:
 On Fri, Mar 25, 2011 at 4:26 AM, Krischik Martin

 martin.krisc...@noser.com wrote:
  Did you actually read the terms and conditions for developers and
  suppliers? Or are you just an Amazon-Fanboy believing that is must be
  good because it is from mighty Amazon?

 Luckily for us with an interest in Java, Opera has just lancuhed its
 own Mobile App Store, supporting Blackberry, Windows Mobile, Android,
 Symbian, and Java ME, the latter which Google continues to pretend
 doesn´t exist.

 http://mobilestore.opera.com/ar,en,usd/java/index.html

 http://mobilestore.opera.com/ar,en,usd/android/index.html

 Google´s approach is my way or the highway. The World doesn´t need a
 new Microsoft, thank you very much. So welcome the other choices...

 FC
 --
 It begins with a blessing
 And it ends with a curse;
 Making life easy,
 By making it worse;
 -- Kevin Ayers

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

2011-03-29 Thread Kevin TeslaCoil Software
Some more details, it was WidgetLocker 1.2.2, which is from July 2010
and several versions out of date. It was named WidgetLockr (Pirate
spelling?). It was an unmodified APK signed by me, the one I had
posted to the Android Market (no LVL at that time). I contacted Opera
with a DMCA takedown notice and received no response. I also contacted
supp...@appia.com , because it seemed Opera's store is powered by
Appia. I got a reply from partn...@handango.com saying they took it
down and to contact them again if there is further problems (They did
indeed take it down). So it seems Appia and Handango and Opera are all
the same store.

A quick check shows that other warez, like Beautiful Widgets, is still
available.

-Kevin

On Mar 29, 4:02 pm, Nathan critter...@crittermap.com wrote:
 On Mar 29, 1:19 pm, Kevin TeslaCoil Software ke...@teslacoilsw.com
 wrote:

   Opera has just launched its own Mobile App Store

  And instead of contacting developers to get them to submit their apps
  before launch, Opera just populated it with pirated software... Not a
  good way to gain developer support or credibility.

 If that's the case, lets get them shut down with a flood of DMCA
 complaints. Forget credibility, there should not be any tolerance for
 that.

 Nathan

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

2011-03-24 Thread Kevin TeslaCoil Software
I root all my phones. Root lets you access your app's data directory,
which is handy for viewing/editing a database or shared preferences
file.

But I don't run custom roms (Unless I'm actually tested something
related to that rom). Custom roms definitely can lead to ridiculous
problems.

I've gotten several phones from craigslist and ebay. Popular phones
can be much cheaper there and you don't need to deal with contracts or
activation fees or anything.

-Kevin


On Mar 24, 3:31 am, String sterling.ud...@googlemail.com wrote:
 I've had enough irreproducible bug reports from users of rooted phones that
 I would *never* consider rooting a primary development device. For my money,
 it's got to be completely stock Android, and as close to vanilla (i.e., no
 funky manufacturer skins) as possible.

 String

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


[android-developers] Re: Double press home button side effect...

2011-03-19 Thread Kevin TeslaCoil Software
Android gives priority to the default Home application, to prevent it
from being removed from memory. Launchers require lots of memory.
Without this protection there is a good chance the actual launcher
will be killed and need to reload, which is slow and the user sees the
widgets redraw on the screen. Also it might lose any cache it had
which could make the app drawer load slower.

In practice, I've found that this method worked okay on 2.1 for
whatever reason. But with Android 2.2+ it doesn't. I imagine you'll be
able to reproduce the problem if you use a 2.2 device, set AppSwipe!
as the default Home, reboot (rearranges things in memory a bit), then
start using lots of memory-heavy apps like the browser, angry birds,
etc, then when you press the Home button after some time away look for
widgets redrawing.

I believe 2.3 neuters System Persistent as well.

Good luck!
-Kevin

 I have an task switching app on the Android Market called AppSwipe!
 and one of the most commonly requested features is the ability to
 launch my app by long-pressing the home button.  Since this is not
 possible, I created a way to launch AppSwipe! by double-pressing the
 home key.

 This feature has been out for over a year and my users love it.
 However, I recently received an email from one user who was reporting
 some strange behavior when using this functionality... essentially,
 the home app is getting killed and taking a long time to restart.
 When this occurs there are some other UI issues as well (such as
 folders launching with transparent backgrounds and such).  It only
 happens on very specific devices and I can't reproduce the problem.

 Here is the general process that I am using to implement the double-
 press of the home button:

 1) I created an activity that declares itself as a home replacement
 app (see XML below)

 2) I have a user-modifiable setting that allows the user to specify
 which home app to launch from the home button.

 3) When the home button is pressed, my home replacement activity has
 the following logic:

         a) The first time the home button is pressed a timer is
 created and started in onResume()

         b) If the timer finishes, then the user-specified home app is
 launched

         c) If home is pressed again and the timer is still running,
 then I cancel the timer and launch my app

 Here is the XML that declares my home replacement app:

 activity
         android:theme=@android:style/Theme.Translucent.NoTitleBar
         android:name=.HomeLauncherActivity
         android:label=@string/app_home_launcher_label
         android:launchMode=singleInstance
         android:stateNotNeeded=true

         intent-filter
                 action android:name=android.intent.action.MAIN /
                 category android:name=android.intent.category.HOME/
                 category android:name=android.intent.category.DEFAULT /
         /intent-filter
 /activity

 Here is the onResume() method that runs the timer:

 @Override
 public void onResume()
 {
         super.onResume();

         if (m_prefMgr == null)
                 m_prefMgr = 
 PreferenceManager.getDefaultSharedPreferences(this);

         if (m_pkgMgr == null)
                 m_pkgMgr = getPackageManager();

         //First Home Button Press
         if (m_timer == null)
         {
                 int launchThreshold =
 m_prefMgr.getInt(getString(R.string.pref_button_launch_home_click_threshold 
 _key),
                                                           
 PrefSettings.DEFAULT_DOUBLE_PRESS_HOME_THRESHOLD);

                 m_timer = new AppSwipeHomeLaunchTimer(launchThreshold,
 launchThreshold);
                 m_timer.start();
         }
         else //Second Home Button Press
         {
                 m_timer.cancel();
                 m_timer = null;

                 boolean swapHomePress =
 m_prefMgr.getBoolean(getString(R.string.pref_button_launch_swap_buttons_key ),
                                                                 
 PrefSettings.DEFAULT_SWAP_HOME_BUTTON_BEHAVIOR);
                 if (swapHomePress)
                         launchHomeApp();
                 else
                         launchAppSwipe();
         }

 }

 Here is the code for my launchHomeApp() method:

 public void launchHomeApp()
 {
         try
         {
                 String pkgName =
 m_prefMgr.getString(getString(R.string.pref_button_launch_default_home_app_ 
 pkg_key),
 );
                 String className =
 m_prefMgr.getString(getString(R.string.pref_button_launch_default_home_app_ 
 class_key),
 );

                 Intent launchIntent = new Intent(Intent.ACTION_MAIN);
                 launchIntent.addCategory(Intent.CATEGORY_HOME);
                 launchIntent.setComponent(new ComponentName(pkgName, 
 className));
                 launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

                 startActivity(launchIntent);
                 finish();
         }
         catch(ActivityNotFoundException e)
 

[android-developers] Re: Charge backs

2011-03-18 Thread Kevin TeslaCoil Software
I've gotten a few chargebacks. The email Google sends when this
happens includes this nice piece of information:

Please note that for Android Marketplace chargebacks received after
June
1, 2010, Google will not assess a chargeback fee.
And references:
http://www.google.com/support/androidmarket/bin/answer.py?answer=137996

What's weird is that Google Checkout still has the option of Cancel
entire order. I don't know if such users can still get updates or be
LVL-allowed.

Full email Google sends:

Hello,

We received a chargeback notification for Google Order # 
for the amount of $1.99 because the order is being disputed by your
customer's credit card issuer.

The customer had claimed that they did not authorize this charge..

In accordance with our policies, Google will not attempt to resolve
the
chargeback on your behalf because this Android application order is
less
than contesting threshold.

We have adjusted your account for the amount of the chargeback, $1.99.
You
should see this line item in the 'Other Activity' column in your
Payouts
tab within two business days.

Please note that for Android Marketplace chargebacks received after
June
1, 2010, Google will not assess a chargeback fee. Chargebacks fees
applied
before this date will not be reimbursed.

For more information about our Android Market Chargeback Resolution
Policy
(including the contesting threshold amount), please visit
http://www.google.com/support/androidmarket/bin/answer.py?answer=137996

If you have any questions about this particular chargeback, please
feel
free to respond directly to this email with any questions or concerns.
If
you have a question regarding chargebacks in general, please contact
us at
https://checkout.google.com/support/sell/bin/request.py?contact_type=txn_issuehl=en_GB

Thank you for understanding.

Sincerely,

Robert
The Google Checkout Team


On Mar 18, 11:22 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 15 March 2011 19:26, JB onde...@gmail.com wrote:

  To my understaning, the android market will charge the deleloper 10$
  (or something like that) for any charge backs a customer submits.
  That seems frustrating.  Are there anything actions taken toward a
  customer who uses charge back?  In other words, is there anything that
  would make a customer think twice before charging back?

 Have you been charged back? As I wonder if you refer to Market regulations
 or Checkout general regulations? My doubts are based on the Market purchase
 process that is completely out of your control, so it's hardly possible to
 i.e. charge user without his knowlegde and acceptancel (he has to start the
 purchase and confirm it) nor you are able to cheat and i.e. charge more that
 user expects. It may be the case when you use checkout with i.e. e-store and
 request more than use saw in i.e. your basket summary, so that would be a
 subject to charge back.

 Regards,
 Marcin Orlowski

 Tray Agenda http://bit.ly/trayagenda - keep you daily schedule handy...

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

2011-03-18 Thread Kevin TeslaCoil Software
You tested with an actual Credit Card Chargeback and not just a Google
Checkout cancel/refund/whatever?

-Kevin

On Mar 18, 1:24 pm, TreKing treking...@gmail.com wrote:
 On Fri, Mar 18, 2011 at 11:57 AM, Kevin TeslaCoil Software 

 ke...@teslacoilsw.com wrote:
  What's weird is that Google Checkout still has the option of Cancel entire
  order. I don't know if such users can still get updates or be LVL-allowed.

 They don't. I ran a test with another dev in group.

 --- 
 --
 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: NullPointerException onCreate for a small number of users

2011-03-13 Thread Kevin TeslaCoil Software
Do you have howtoplay_button defined in your layout-port/main.xml and
not in your layout-land/main.xml ?
(Or in general if you have multiple main.xml files, for different
screen sizes or whatever, and forgot to update one of them, this can
happen)

-Kevin

On Mar 13, 11:40 pm, acr acr...@gmail.com wrote:
 sorry for got to add this..

 53:    howtoplayButton.setOnClickListener(this);

 this works on 99.9 percent of devices

 here's a larger snippet:
 @Override
         public void onCreate(Bundle savedInstanceState) {
                 super.onCreate(savedInstanceState);
                 setContentView(R.layout.main);

                 setVolumeControlStream(AudioManager.STREAM_MUSIC);
                 //Get Screen Width
                 Panel.screenWidth =
 getWindowManager().getDefaultDisplay().getWidth();
                 // Set up click listeners for all the buttons
                 //View continueButton = findViewById(R.id.continue_button);
                 //continueButton.setOnClickListener(this);
                 View newButton = findViewById(R.id.new_button);
                 newButton.setOnClickListener(this);
                 View aboutButton = findViewById(R.id.about_button);
                 aboutButton.setOnClickListener(this);
                 View howtoplayButton = findViewById(R.id.howtoplay_button);
                 howtoplayButton.setOnClickListener(this);
                 View exitButton = findViewById(R.id.exit_button);
                 exitButton.setOnClickListener(this);
                 View buyButton = findViewById(R.id.buy_full);
                 buyButton.setOnClickListener(this);
                 newButton.startAnimation(AnimationUtils.loadAnimation(this,
 R.anim.shake));
 ..

 On Mar 13, 11:30 pm, Dianne Hackborn hack...@android.com wrote:







  Given this:

  Caused by: java.lang.NullPointerException at
  com.myco.myappfree.myapp.onCreate(myapp.java:53)
  at 
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  at 
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)

  What is on line 53 of your app?

  On Sun, Mar 13, 2011 at 8:03 PM, acr acr...@gmail.com wrote:
   I have a relatively successful app in the android market that a very
   small amount of users experience force close on start up of the app.

   It is not happening on a specific device, im not sure if it's
   something these users have installed that is interfering with the app.
   I've tried to troubleshoot with a few users having the problem, but
   cannot get to the bottom of it.

   it happens on both rooted and non-rooted phones

   I keep getting a NullPointerException for a small number of users who
   use a variety of phones that normally work.
   anyone know what may be causing this, or how to get around this? I
   can't figure this one out and cannot replicate the problem, please
   help.

   below are the stack traces from the market (package name changed to
   not spam the board)

   java.lang.RuntimeException: Unable to start activity
   ComponentInfo{com.myco.myappfree/com.myco.myappfree.myapp}:
   java.lang.NullPointerException
   at
   android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
   2663)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
   2679)
   at android.app.ActivityThread.access$2300(ActivityThread.java:125)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
   2033)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:123)
   at android.app.ActivityThread.main(ActivityThread.java:4627)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:521)
   at com.android.internal.os.ZygoteInit
   $MethodAndArgsCaller.run(ZygoteInit.java:858)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
   at dalvik.system.NativeStart.main(Native Method)
   Caused by: java.lang.NullPointerException
   at com.myco.myappfree.myapp.onCreate(myapp.java:53)
   at
   android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
   1047)
   at
   android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
   2627)
   ... 11 more

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

  --
  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 

[android-developers] Re: Experiences with Application Licensing?

2011-03-09 Thread Kevin TeslaCoil Software
 The pirates will often miss that
 and catch a lot of well deserved flack from users who have downloaded
 the broken app.

Careful. You ARE going to get bug reports from pirates. And they will
waste your time by leaving out the very important point that they
downloaded some random apk from some random site. The bug could be a
real bug that effects actual users. The bug could be a bug you fixed
long ago, but the pirate is using a version from the stone age. The
bug could be due to using a private beta that some asshole leaked. Or,
the most frustrating to debug, is when the bug is because the pirate
did a bad job attempting to crack your app. You'll be so confused how
that bug could ever happen, until you eventually find the warez forum
and download the cracked apk yourself to see that the pirate commented
out too many lines of code when trying to bypass copy protection.

You will also have people who claim to have bought your app and
getting licensing denied and wondering how to fix the situation, who
will never contact you again if you ask for an order number.

Good luck,
-Kevin


On Mar 9, 3:02 pm, jtoolsdev brianjto...@gmail.com wrote:
 Support for it is rather vague too.  On my apps if I run monkey on the
 app without the licensing I can do 50,000 events and no crashes.  The
 app with LVL crashes on one of those APN keystroke things.  The LVL
 team needs to update the source to prevent that.

 I believe in using licensing if anything just to slow piracy down.
 You'll have to make it an ongoing project though changing the code
 with each release so they can't patch it.  Also make the app not work
 right if the licensing is skipped.  The pirates will often miss that
 and catch a lot of well deserved flack from users who have downloaded
 the broken app.

 On Mar 9, 10:58 am, Chris Stewart cstewart...@gmail.com wrote:







  Great thread, thanks for posting that.  I guess more than anything the false
  positives (or, negatives?) scare me the most.  Last thing I want to do is
  piss off a paid customer.  Maybe for now I'll just wait and see how LVL
  improves in the future and consider it in the future.

  --
  Chris Stewarthttp://chriswstewart.com

  On Wed, Mar 9, 2011 at 12:41 PM, TreKing treking...@gmail.com wrote:
   On Wed, Mar 9, 2011 at 11:33 AM, Chris Stewart 
   cstewart...@gmail.comwrote:

   If you've evaluated application licensing and have thoughts on how it has
   worked out for you, or perhaps why you decided not to implement it, I'd
   appreciate hearing them.

  http://groups.google.com/group/android-discuss/browse_thread/thread/2...

   ---
--
   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

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

2011-03-05 Thread Kevin TeslaCoil Software
The CTS needs to be updated to test that shared_prefs (and all app
data) is actually deleted during an uninstall. Especially if the
vendor randomly picked /dbdata/databases rather than /data/data. Or
maybe just ban Samsung.

I finally got my hands on an affected phone. This one is a Galaxy S
i9000-T running 2.2.1.

I installed my app and it got app_81, then I uninstalled using adb
uninstall com.teslacoilsw.widgetlocker then reinstalled and found my
preferences had persisted across the uninstall, but no permission
denied error. I uninstalled again in the same way, this time I went to
the Market and installed Androidify. This is when things got
interesting:
ps shows:
app_813366  2376  242568 31012  afd0ee48 S
com.google.android.apps.androidify

but ls -l /dbdata/databases shows:
drwxrwx--x app_81   app_812011-03-05 18:44
com.teslacoilsw.widgetlocker

So Androidify got my uid and my preferences now are belong to them.

I then reinstalled widgetlocker and got this in ps:
app_843582  2376  243124 36396  afd0ee48 S
com.teslacoilsw.widgetlocker

So WidgetLocker is now app_84. But /dbdata/databases still has:
drwxrwx--x app_81   app_812011-03-05 18:44
com.teslacoilsw.widgetlocker

And we are screwed...

My (unreleased) work around is to check for this and then use root to
chown /dbdata/databases/packagename and /dbdata/databases/packagename/
shared_prefs and /dbdata/databases/packagename/
packagename_preferences.xml . I do this once at first run and I do it
every time the PreferenceActivity is opened. Obviously this will only
cure rooted phones and I verified the problem on my own phone without
root, so those users are still screwed.

-Kevin

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

2011-03-03 Thread Kevin TeslaCoil Software
The method used by the stock lock screen and while in a call is
signatureOrSystem only:

!-- Allows an application to open, close, or disable the status
bar
 and its icons. --
permission android:name=android.permission.STATUS_BAR
android:label=@string/permlab_statusBar
android:description=@string/permdesc_statusBar
android:protectionLevel=signatureOrSystem /

-Kevin


On Mar 3, 6:18 pm, lbendlin l...@bendlin.us wrote:
 The stock phone app does not lock on my N1. If an app would lock the
 status bar without my permission I would uninstall that app at once.

 Have you considered making your app fullscreen?

 On Mar 3, 5:40 am, Marcin Orlowski webnet.andr...@gmail.com wrote:







  On 3 March 2011 11:27, Tom thomas.coz...@gmail.com wrote:

   I know there is a way to expand/collapse and hide status bar.
   But is it possible to lock it?

  Phone app locks, so definitely there is, but doubt it's public
  --
  Regards,
  Marcin

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

2011-02-28 Thread Kevin TeslaCoil Software
I think I've seen something like if you show a toast and then your
activity is destroyed before the toast disappears it might get stuck.
Easier to reproduce if you're calling finish(). Probably could avoid
it if you save the toast reference and do a .cancel() in onDestroy.

-Kevin

On Feb 28, 8:53 pm, Julius Spencer jul...@msa.co.nz wrote:
 Hi,

 I have an IntentService from which I am showing a Toast using:

         Toast.makeText(this, errorMessage.toString(), 
 Toast.LENGTH_SHORT).show();

 For some reason it's not disappearing.  Just wondering if anyone has seen 
 this before or knows what I'm doing wrong. I'm sure it's just something I'm 
 not thinking of but I'm stumped...

 Thanks in advance.

 Regards,
 Julius.

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

2011-02-28 Thread Kevin TeslaCoil Software
Well I could be wrong about the cause, but I have definitely seen them
stuck before. Killing the process fixed it. It wasn't in production
code so I never dug into it.

-Kevin

On Feb 28, 11:22 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 On Mar 1, 1:01 pm, Kevin TeslaCoil Software ke...@teslacoilsw.com
 wrote:

  I think I've seen something like if you show a toast and then your
  activity is destroyed before the toast disappears it might get stuck.
  Easier to reproduce if you're calling finish(). Probably could avoid
  it if you save the toast reference and do a .cancel() in onDestroy.

 That's absolutely not the case.  A lot of my activities finish with a
 toast and I've never seen one stuck.

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

2011-02-26 Thread Kevin TeslaCoil Software
What the others have said is true, but if you want to check the
permissions you can with the PackageManager's checkPermission

http://developer.android.com/reference/android/content/pm/PackageManager.html#checkPermission(java.lang.String,
java.lang.String)

On Feb 26, 1:40 am, Miguel Morales therevolti...@gmail.com wrote:
 Well, since you are modifying the manifest and recompiling a new apk for
 each version anyway.
 Simply have a file such as Const.java in which you define some static fields
 which you can check against at runtime.
 You'll have to still make changes to two places, but you won't have to touch
 your code directly.
 Also, yes permissions have to be accepted for your app to run and there is
 no need to check at runtime.









 On Fri, Feb 25, 2011 at 11:17 PM, b_t bartata...@gmail.com wrote:
  Hi,

  What is the correct way to check if app has a permission, for example
  android.permission.READ_SMS.
  I would like to create different versions of my app with the same code
  but different manifest xml with different permissions.

  So I would like to check runtime if this version has a permission or
  not.

  Thanks,
  Tamás

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

 --
 ~ Jeremiah:9:23-24
 Android 2D 
 MMORPG:http://developingthedream.blogspot.com/,http://www.youtube.com/user/revoltingx

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

2011-02-26 Thread Kevin TeslaCoil Software
 I cannot think of another enterprise that earns that much
 money from you and won't support you.

It's especially funny (? not the right word for it) when compared to
our users. We write apps that the user pays $1 or $2 for and then
demands customer support and updates for the rest of their lives. The
Google Market provides a service and takes 30% of our income, but
doesn't even provide a method of contacting support. 1 star.

Like TreKing, I'm very appreciative of Dianne, Romain and others
Android developers that regularly post and help with Android
development. I'm always happy when I'm googling for help on something
and come across a post by one of them as I know it'll be interesting
and detailed.

-Kevin

On Feb 26, 9:33 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 +100

 The fact that Google takes 30% of sales, which, for my app, is well
 into 5 digits/yr and you cannot get any kind of support, is
 despicable.  I cannot think of another enterprise that earns that much
 money from you and won't support you.

 Hopefully, when the Amazon Market goes up and running, it will provide
 competition to the Android Market and this will all improve, but I am
 not holding my breath.

 On Feb 27, 10:44 am, TreKing treking...@gmail.com wrote:







  On Sat, Feb 26, 2011 at 3:27 PM, Dianne Hackborn hack...@android.comwrote:

   Have you tried going to the Market support forum?

  http://www.google.com/support/forum/p/Android+Market/label?lid=7dc8a5...

   There are people from Market support answering questions there.

  LOL - Seriously? With all due respect Dianne, have you actually been over
  there? I spend about as much time there as I do here and I assure you, there
  is ***no one*** from the Market team answering *anything* over there. There
  was a time when you could count on Dontae to at least chime in with a
  bulls*** canned we're looking into it response, but in the last like 6
  months or so I have not seen a single response from a Google Employee in
  that support forum.

  Sometimes, if you win a lottery, they'll respond to direct developer support
  requests when major stuff breaks (like the stats that are always
  breaking). But no one, and I mean NO ONE, from the Market has ever taken
  even 5 seconds to answer questions only someone from Google could answer,
  like the points of the TOS discussed here (and this issue has come up quite
  a few times).

  At least AFAIK - if you happen to know where these types of questions have
  been answered, I'm sure we'd all like to know where to go look.

  I mean, look at what you, Romain, Xavier, and others do here: spending your
  own free time helping us out wherever you can with issues others can't. I
  presume you all do this because you care about the product and want us to
  have a good experience using it. That's why it truly boggles my mind that
  not a single individual on the Market Team gives enough of a damn about
  *their* product to respond to even a single post.

  So, unfortunately, the OP is absolutely correct. Support for the Android
  Market for both users and developers is essentially non-existent. And this
  lack of support (and for me personally the fact that no one on that team
  seems to give a damn) is the chief reason why so many developers have such a
  terrible perception of everything and anything that has to do with the
  Android Market.

  --- 
  ­--
  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: Graphical corruption upon setting Live wallpaper

2011-02-23 Thread Kevin TeslaCoil Software
 leave a complaint in the Market

Don't do this. A comment like 1 star. Has graphical errors is
useless to any developer and the developer has no way of responding. A
detailed email on the other hand can actually help improve the app/
wallpaper/whatever and the developer can reply if they have questions.

-Kevin



 On Feb 23, 3:50 pm, Amit amityadavsuc...@gmail.com wrote:







  Hello Sir,
  First of all sorry to post it again but what I would do. I am not
  getting response from anywhere,

 http://stackoverflow.com/questions/5067168/graphical-corruption-upon-..

  Here is the problem inline:

  If I set 'Live wallpaper' in background on LG P500 and launch the
  application after that pressing 'home icon' anywhere in application
  and again come back showing major graphical corruption at that point.

  This doesn't happen with 'Normal wallpaper'!

  Also, I cross checked with Samsung gt i9020 this also not having.

  Hope, this time I'll get any response from my team.

  Thanks in Advance,
  Amit.

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

2011-02-16 Thread Kevin TeslaCoil Software
If you're trying to block features on a rooted phone, then as Dianne
said, there is no guaranteed way. Hackers aren't going to let you
block them.

If you just want to know for analytics or a warning or something a
simple test that still covers most rooted phones is checking for the
Superuser.apk package com.noshufou.android.su. Something like this:

public static String superuserVersion(PackageManager pm) {
try {
PackageInfo pi =
pm.getPackageInfo(com.noshufou.android.su, 0);
try {
return pi.versionName.substring(0,
pi.versionName.indexOf(' '));
} catch (Exception ex) {
return pi.versionName;
}
} catch (NameNotFoundException e) {
return Not Found;
}
}


If you want to add features for root users then either just do your
exec with su and handle the case that the user denied you, or
initially do something like su id, or su followed by an exec id
and check the return value. If it's successful then most likely the
user will allow your future su requests, but still check for errors
just in case they don't.

http://www.xda-developers.com/ is probably a better place for root
related questions. This list tends to be more focused on what's
included in the SDK.

-Kevin


On Feb 16, 9:06 pm, mikedroid michan...@gmail.com wrote:
 how to determine if the phone is rooted or not?

 does FACTORY_RESET flag can be useD?

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

2011-02-15 Thread Kevin TeslaCoil Software
 Pls. *don't* use this style of writing SQL queries!

Otherwise you'll always have to watch your back for Little Bobby
Tables.
http://xkcd.com/327/

On Feb 15, 7:07 am, Sebastian Roth sebastian.r...@gmail.com wrote:
 On Tue, Feb 15, 2011 at 3:19 PM, Abhilash baddam 

 abhilash.androiddevelo...@gmail.com wrote:

      My problem was solved like this..
  myDB.execSQL(DELETE FROM favourites where month=' +str1+ ' );

 Pls. *don't* use this style of writing SQL queries!

 JAlexoid (Aleksandr Panzin) had a good suggestion for you.

 The reason is SQL Injection. Pls. have a read 
 here:http://en.wikipedia.org/wiki/SQL_injection

 BR,
 Sebastian

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 behavior on client side license validity check for free apps

2011-02-04 Thread Kevin TeslaCoil Software

 You cannot change a paid app to free. Once a paid app, always a paid app.

This is not true (Unless this was recently changed).
Once a free app, always a free app, but a paid app can become a free
app (And then always be a free app).

-Kevin

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

2011-02-01 Thread Kevin TeslaCoil Software
This looks like Anti-LVL http://androidcracking.blogspot.com/

Anti-LVL can work through obfuscation/reflection, but it's mostly just
find/replace. Though it's automated for the kiddies.
Extract the app and read the fingerprints.xml and make your
interesting bits harder to find.

-Kevin


On Feb 1, 4:01 pm, Moto medicalsou...@gmail.com wrote:
 Hi Jostya,

 Yes, my app is obfuscated and the signature was my signature...  It seemed
 like it doesn't matter if the application is obfuscated.  It seems to be a
 simple hack that was fast! It only took a few hours after release of my
 application... Incredible...

 I guess I'm gonna have to get creative...

 -Moto

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


[android-developers] Re: Android SDK is so slow that is ridiculous.

2011-01-26 Thread Kevin TeslaCoil Software
 And wouldn't you like to have *some* kind of working HC emulator now before
 devices ship?

I just wanted to say yes, absolutely. Thanks for getting this to us
soon, even in an unfinished/preview state rather than making us wait
for the device to ship and our apps to be broken on customers
hardware.

-Kevin


On Jan 26, 8:05 pm, Dianne Hackborn hack...@android.com wrote:
 The issue with HC is that it now has a huge screen to draw, and the emulator
 itself doesn't implement any hardware acceleration of drawing, so it needs
 to emulate ARM code that is rendering to a window, and then emulate yet more
 ARM code that composites together the final display.

 Implementing hardware acceleration of drawing in the emulator is extremely
 non-trivial.  It's not a matter of needing performance testing and
 improvement.  The bottle-neck is very obvious, it is just difficult to
 solve.

 And wouldn't you like to have *some* kind of working HC emulator now before
 devices ship?

 On Wed, Jan 26, 2011 at 5:58 PM, Jake Basile jakerbas...@gmail.com wrote:
  I have a Core i7-920, 6GB of DDR-1333 RAM, and an ATI 5770. I get maybe
  5-10 FPS on the Honeycomb emulator. This thing needs serious performance
  testing and improvement.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 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] Intent-filter to handle *.foo.zip but avoid handling other zips

2011-01-24 Thread Kevin TeslaCoil Software
Hi,

I believe I have figured things out correctly, but I would appreciate
input of others to avoid breaking things.

I'm hoping to setup my app to be able to download files such as
Gingerbread.wltheme.zip from any website and be handled with my app.
However I do not want my app to be used for normal Zip files as it's
only meant to handle these special wltheme type of zip files. I'd like
to use the .wltheme.zip filename as it makes it easy on webservers to
send the mime type correctly and it makes it easy for users to extract
the files and manually edit them. (Renaming files on Windows is a lot
more difficult than it should be).

On Gingerbread I can get away with:
activity android:name=.UserThemeInstaller
android:theme=@android:style/Theme.Dialog
intent-filter
action android:name=android.intent.action.VIEW /
category 
android:name=android.intent.category.DEFAULT /
data
  android:mimeType=application/zip
  android:scheme=file
  android:host=*
  android:pathPattern=.*\\.wltheme\\.zip /
/intent-filter
/activity

As the Download app will let you download a zip file and then when
opening from there lets my app handle it.

However for Android 2.1/2.2 it seems the file won't even download
without a generic handler for application/zip, so the above only works
if the user also has Astro or similar installed. I found that this
seems to work:
activity android:name=.UserThemeInstaller
android:theme=@android:style/Theme.Dialog
intent-filter
action android:name=android.intent.action.VIEW /
category 
android:name=android.intent.category.DEFAULT /
data
  android:mimeType=application/zip
  android:scheme=file
  android:host=*
  android:pathPattern=.*\\.wltheme\\.zip /
/intent-filter
intent-filter android:priority=-100 
action android:name=android.intent.action.VIEW /
category
android:name=android.intent.category.DEFAULT /
data
  android:mimeType=application/zip
  android:scheme=file /
/intent-filter
/activity

Where if the user only has my app installed then they download
a .wltheme.zip and it is allowed because of the handler for
application/zip. This also doesn't annoy the user much as if they
download a normal .zip and do have Astro or similar it won't try to
get them to open it with my app as the priority for the generic zip is
very low.
Worst case is if they user only has my app and downloads a normal zip,
then my app will try to handle it and present an error message. This
seems acceptable.

My question is, am I doing this correctly or is it likely to break
something?

Thanks,
-Kevin

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

2011-01-24 Thread Kevin TeslaCoil Software
I actually had this very conversation with my (bilingual) wife the
other day. Another potential problem with using system strings in your
own project is that if your default language is English and a user has
their phone set for a language you don't support, they'll then see
English for all your strings, but all the buttons and what not will be
in their language. This happens sometimes in localized software.
My wife's opinion was that even if the user doesn't speak English
well, they will already know the Yes/No/OK/Cancel buttons. But if they
do speak English well, they'd rather see the app all in English or all
in their language, not some messy hybrid. It makes the app feel
unfinished.

One neat tool for dealing with the common translations is http://crowdin.net/
which will suggest translations from it's own database of previously
translated strings.

-Kevin

On Jan 22, 7:48 am, DanH danhi...@ieee.org wrote:
 Yeah, while TPTB have a legitimate reason to object to using any/all
 of the system translations willy-nilly, it seems like it would be
 simple and very useful to harden a set of the most common stuff --
 yes/no, continue/cancel, etc.  Minimal effort on the part of TPTB --
 just commit to never deleting those words.

 On Jan 22, 1:32 am, Brill Pappin br...@pappin.ca wrote:



  Yes, and I think thats a good strategy for graphics.

  However there are thousands of string in different language value
  resources... which is why I say it it would save a heck of a lot of time.
  IMO it's worth having to test with each new platform.

  - Brill Pappin

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