[android-developers] Re: how can I catch deadlock or hang of process?

2015-11-14 Thread Nobu Games
Maybe a static analysis tool for Java can help you:

   - 
   
http://stackoverflow.com/questions/8942658/static-analysis-tool-to-detect-multithreading-problems-deadlocks-race-conditio
   - https://github.com/flurry/checkthread-android-example


On Friday, November 13, 2015 at 3:12:29 AM UTC-8, Ju-hyun Park wrote:
>
> how can I catch deadlock or hang of process?
> When the application on android has some problems such as deadlock or hang 
> etc, I want to catch the event using API..
> What should I do?
>

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


[android-developers] Re: Moved to Android Studio - how do I migrate my publishing key?

2015-10-09 Thread Nobu Games
Maybe this question on Stackoverflow helps: 
http://stackoverflow.com/questions/7112392/keystore-eclipse-adt-file-location

On Friday, October 9, 2015 at 12:28:01 PM UTC-7, Tobiah wrote:
>
> I've published under Eclipse (quite some time ago) but now I've 
> switched to Studio and need to update the app.  It asks for a 
> Key Alias, Key Password, Store file, and Store password.  I only 
> need one password with Eclipse.  I see that I have ~/.android/adbkey 
> is that the key I was using previously?  What do I need to do 
> to get Studio to use the same key? 
>
> Thanks! 
>
> Tobiah 
>

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


[android-developers] Re: Why different icon sizes?

2015-06-16 Thread Nobu Games
Yes, this is how the system works for drawables. Here a quote from the 
Android documentation:

The system handles most of the work to render your application properly on 
> each screen configuration by scaling layouts to fit the screen size/density 
> and *scaling bitmap drawables for the screen density, as appropriate*.
>

(Source: 
http://developer.android.com/guide/practices/screens_support.html#support)

The only real problems arise when:

   1. Your only drawable available has a too low resolution. Upscaling on a 
   high density screen will make it look slightly blurry. That is especially 
   noticeable when your app icon is right next to a hi-res icon.
   2. The Android system's scaling introduces unwanted artifacts. By 
   providing your own set of icons you have full control over the appearance. 
   This is especially an issue with 9-patch drawables, since the slice markers 
   may bleed into the image area due to interpolation and the markers 
   themselves may not be "readable" anymore for slicing up the image. So 
   especially in case of 9-patch drawables you probably want to provide 
   different versions for each supported screen density.


On Tuesday, June 16, 2015 at 7:56:14 AM UTC-7, RLScott wrote:
>
> I tried using a clearly incorrect icon size for a launcher icon (386 x 
> 386), and the icon was automatically down-sized on my Galaxy Tab 4 to look 
> the same as all the other app icons.  So I wonder why we need to provide 5 
> different launch icon sizes?  Is this resizing behavior one that I can 
> count on?  (By the way, I am only making side-loaded apps, so Google Play 
> Store requirements are not an issue for me.)
>
> Robert Scott
> Hopkins, MN
>
>

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


[android-developers] Re: About Application promotion

2015-05-19 Thread Nobu Games
I guess key in 3) is "without informed user action". In your scenario 
tapping a banner ad is a user action. What appears to me as legal grey area 
is the "informed user" bit. How can we possibly know that the user is 
"informed" and does in fact know that they are clicking a banner ad for an 
app, that will open its Google Play store page for installation? That 
phrase implies that the user is supposed to be knowing what they are doing. 
What this Google Play policy probably tries to express is that the banner 
ad must not be deceptive in any way. If you style the ad as a button or any 
other UI element in your app "A", and if it is not obvious that it is 
actually an ad, then you are violating that policy, because the user is not 
informed anymore. Their action of tapping the ad does not translate to the 
intended effect anymore. That means that your app ads must be recognizable 
as such probably by wording, appearance and also by the position on screen.

On Monday, May 18, 2015 at 11:07:36 PM UTC-7, Amit Siddhpura wrote:
>
> Hello sir,
>
>I have one question about app promotion, I hope sir you will help me, I 
> want to promote my app but I have read Google Policy (
> https://play.google.com/about/developer-content-policy.html) in that it 
> is written that 
>
> App Promotion
> 1) Apps published on Google Play may not directly or indirectly engage in 
> or benefit from the following behavior:
> 2) Promotion via deceptive ads on websites, apps or other properties, 
> including simulated system, service, or app notifications or alerts.
> 3) Promotion or install tactics which cause redirection to Google Play or 
> the download of the app without informed user action.
> Unsolicited promotion via SMS services.
>
>
> Sir suppose my developer account named "ABC" I have three apps named "A", 
> "B" & "C", My "A" app is most downloaded and now I want to promote my "B" & 
> "C" app in "A" app
> So I will use ImageView and make banner of "B" & "C" and use url like below
>
> market://details?id=com.B
>
> market://details?id=com.C
>
>
> Now when user open "A" app and see both banner and when user click on "B" 
> or "C" banner it will redirect to "Google Play Store to install B or C app 
> page", 
>
>
> Will it breack policy of 
>
> "*Promotion* or install tactics *which cause redirection to Google Play*"
>
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: SQLite case insensitive matching

2015-04-18 Thread Nobu Games
There rings a bell with your problem description. It's a while ago, but I 
remember now that I'm having similar problems with one of my apps and 
non-ASCII characters.
Since you are using the MATCH operator I assume you are also using the FTS3 
extension. I just found this piece of information on the documentation page 
for FTS:

*All uppercase characters within the ASCII range (Unicode codepoints less 
> than 128), are transformed to their lowercase equivalents as part of the 
> tokenization process. Thus, full-text queries are case-insensitive when 
> using the simple tokenizer. *
>

(source: http://sqlite.org/fts3.html#tokenizer)

That may explain why French accented lower-case letters are not correctly 
matched against their upper case equivalents, since they are effectively 
ignored by the default tokenizer. The same page mentions further down that 
the "unicode61" tokenizer implementation solves that problem correctly, 
however it looks like it is only available for FTS4, which in turn is only 
available since Android ICS (see 
http://stackoverflow.com/questions/6339022/sqlite3-fts4-match-and-android).

A dirty workaround would be to create an "OR"ed match query for both upper 
case and lower case versions of accented letters:

SELECT * FROM MyTable WHERE content MATCH 'Écuter OR écuter'

This however can get out of hand the more accented letters are contained in 
your search query. But if the data in your database is written according to 
standard writing rules (all lower case letters except for titles and words 
at the beginning of a sentence) you could focus just on the first letter of 
the search term for creating those "OR"ed match queries.



On Saturday, April 18, 2015 at 4:03:28 AM UTC-7, Doug Gordon wrote:
>
> Similar questions have been asked, but many are old and it's not clear 
> to me exactly what the resolution is. I have a list filter with a local 
> db query that is matching columns against user input (uses MATCH, but 
> that is probably not significant). Both the contents of the columns and 
> the user input can be mixed case, but the match should be 
> case-insensitive. This has been working (for years!) for most 
> situations, but it was recently pointed out to me by a user (in France) 
> that if he inputs a lowercase accented character, e.g. é, it will not 
> match a database entry containing the uppercase equivalent, e.g. É. 
>
> My understanding is that Android SQLite does not support this 
> automatically as it does for ASCII characters, but is there a solution 
> within Android? I have no control over what is in the database (it comes 
> from an outside source) or what the user inputs. 
>
> Doug Gordon 
> GHCS Software 
>
>

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


Re: [android-developers] App Updation from playstore

2015-02-12 Thread Nobu Games
In your original post you said that you lost your keystore and that you had 
to create a new one. Did you find your old keystore again or are you 
talking about a new keystore now?

On Wednesday, February 11, 2015 at 9:50:48 PM UTC-8, rahul kaushik wrote:
>
> I am using the same version in both and am using the same keystore ,i 
> confirm it by the password it is asking while signing 
>
> but my machine is different am using windows 8 (64 bit ) earlier it was 
> windows xp 32 bit,also my eclipse and sdk version is different is this have 
> anything to do with the issue
>
>
>
> On Wed, Feb 11, 2015 at 2:34 PM, TreKing 
> > wrote:
>
>>
>> On Tue, Feb 10, 2015 at 4:46 AM, Rahul Kaushik > > wrote:
>>
>>> Note:-am using the same package which i used in my earlier app
>>>
>>
>>> will users get the update notifications on there mobile after i upload 
>>> my updated app with new key store?if not please suggest how to do that
>>>
>>
>> If you lost your keystore you cannot continue to use the same package. 
>> The Play store will reject it.
>>
>> On Tue, Feb 10, 2015 at 6:06 AM, Rahul Kaushik > > wrote:
>>
>>> An existing package by the same name with a conflicting signature is 
>>> already installed
>>
>>
>> You may be trying to install a debug version over a release version, or 
>> vice versa. Uninstall whatever you have installed, build a release version, 
>> and try uploading it to Google Play. If you don't get any errors you should 
>> be fine. If you do, they you're using the wrong keystore and have to find 
>> the original or start anew as Mukesh noted.
>>
>> Good luck.
>>
>>
>> -
>> 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-d...@googlegroups.com 
>> 
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


[android-developers] Re: Android Studio needs "create library" function! And Android needs a different OS Name!

2015-02-12 Thread Nobu Games
I had a similar problem with wrapping my head around this libraries issue 
when I started using Android Studio and Gradle just a few weeks ago (see 
discussion here 
,
 
also for an overview of the available options). You would usually add 3rd 
party libraries as module dependecies to your app project (hit F4 and go to 
"Dependencies" tab, click the green plus icon and select "Library 
dependency"). An online repository is searched for the requested library 
(also taking the requested version number into account). As far as I 
understand, that library will be downloaded once into your local Maven 
cache, which will be used by all your app projects. So in this case there 
should be no redundancy.

When it comes to self-developed library modules you can do the same. I get 
around this module-inclusion problem by deploying development snapshots of 
my own libraries into my local Maven repository and adding them to the 
dependencies list of my Android app. No redundancy here. Libraries can be 
centrally maintained and developed outside the app project. The same with 
3rd party libraries, they also can be added as dependencies from online 
repositories. The whole project organization and setup is driven by Gradle 
build files. You are free to configure it any way you wish.

I do not quite understand the system property problem and I think there's 
also no point in requesting any change. Android updates are super-slow to 
roll out and it would take many years until you could rely on that feature. 
A library that interfaces with the Android API is also usually compiled 
against the Android SDK, so the programmer should be well aware of the 
presence of Android. Unless you access the Android API via reflection, but 
in this case you can just use reflection to figure out that your code is 
running on Android.


On Wednesday, February 11, 2015 at 2:40:22 AM UTC-8, Ristar wrote:
>
> As written in the title, the Android Studio needs a "*create library*" 
> function very very very very very badly.
>
> Chucking the source files from everywhere to everywhere else is very bad. 
> It is the lazy man's way out, yes. But if one uses his own libraries across 
> many projects, it'd be a nightmare. The current method of having different 
> libraries inside the same project is very bad.
>
> Libraries should be managed from one project to reduce headaches, double 
> work, not knowing which file is where, etc. In other words, 1 lib project 
> for all app projects to use will definitely prevent many FUBAR scenarios 
> that waste everyone's time and makes everyone angry.
>
> Look at how Netbeans does it. That is the way to go.
>
> One more thing I have noticed, is that os.name returns "Linux", not 
> "Android". This is not so good. If it returns "Android", programmers can 
> utilise existing libraries for desktop versions of Java and adapt it to 
> android quickly. Hell, you can even put "Linux Android" or the other way 
> around. As long as there is a way to differentiate between desktop and 
> mobile.
>
> For example:
>
> if(System.getProperty("os.name").equals("Android")){
> //android implementation here.
> }
> else{
> //desktop implementation here.
> }
>
> Thanks.
>

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


[android-developers] Re: Android Load library from path

2015-02-03 Thread Nobu Games
Did you copy that file manually? Have you checked the ownership? I assume 
that the file owner must be the same that is running the app process.



On Tuesday, February 3, 2015 at 5:50:58 AM UTC-8, SKore wrote:
>
> Hi,
>
> I am checking on permissive and Enforcing mechanism of selinux(SE Linux) 
> in Android 5.0. I have placed .so file in 
> /data/data/packageName/files/libtestcalc.so.
>
> when the device is in permissive mode, 
> System.load("/data/data/packageName/files/libtestcalc.so"); - works fine 
> and I am able to access the methods of .so file with out any exceptions.
>
> The same, System.load("/data/data/packageName/files/libtestcalc.so"); is 
> not working when the device is in Enforcing mode and I am getting exception 
> as follows.
>
> java.lang.UnsatisfiedLinkError: dlopen failed: couldn't map 
> "/data/data/packageName/files/libtestcalc.so" segment 1: Permission denied
>
> I guess in both the modes, same call flow will occur. I mean 
> System.load(..)->Runtime.getRuntime().load(..)->Runtime.getRuntime(..).doload(..)->Runtime.getRuntime().nativeLoad(..)
>
> @Runtime.java->doLoad(..) documentation mentioned as "nativeLoad should be 
> synchronized so there's only one LD_LIBRARY_PATH in use regardless..." 
>
> When this LD_LIBRARY_PATH will get updated?
>
> How android is differentiating the load files by modes? Want to know other 
> ways to load .so file from "/data/data/packageName/files/".
>
> Regards,
>
> Skore
>

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


Re: [android-developers] Re: What is wow factor about android studio in compare to Eclipse.

2015-02-03 Thread Nobu Games
Yesterday I tried to set up a web project in IntelliJ IDEA 14 CE and 
Android Studio. It did not work because all the necessary plugins are 
reserved for the commercial version of IntelliJ IDEA. Which is fine with 
me. They are running a business after all.
But I guess that may prove your point. It's not really an entirely "open" 
IDE and not entirely Open Source, since some features are locked away 
behind a paywall and the community does not deliver Open Source 
alternatives, yet.
Anyway, after two weeks of daily use of Android Studio I have to agree with 
what kj said. I prefer IntelliJ over Eclipse because of so many little 
things.

To be on thread topic here: the features that "wow" me most at the moment 
are the intelligent code completion 
, 
the resource value previews (strings, constants, drawables) that are 
embedded directly in the source code, and the whole "project configuration 
through Gradle build files thing". Kind of neat.

What drives me nuts at the moment are the bugs. The logcat view is always 
empty for me and makes the IDE unstable when open. Android Studio also 
tends to slow down my machine after a few hours of work. And my biggest pet 
peeve are the default keyboard shortcuts that are not entirely suitable for 
work on KDE, since some are already defined there. I also do not understand 
why the default shortcuts are so deliberately non-standard. But other than 
that I'm happy with Android Studio.


On Tuesday, February 3, 2015 at 7:14:57 AM UTC-8, JackN wrote:
>
> Perhap we think we know too much, and miss the obvious.
>  
>  
>  
> On Monday, February 2, 2015 at 9:05:17 PM UTC-8, TreKing wrote:
>
>>  
>> On Mon, Feb 2, 2015 at 9:16 AM, JackN  wrote:
>>
>>> Uh, ANDROID studio doesn't sound very open to me. Sounds like 
>>> ANDROID only...
>>
>>
>> Perhaps there is a language barrier here. "Open" usually refers to "open 
>> source", which Android Studio is.
>>
>>
>> -
>> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Reusable code organization with Android Studio

2015-01-24 Thread Nobu Games
On Saturday, January 24, 2015 at 1:29:10 PM UTC-8, Doug wrote:

> Also, learn the semantics of what having "-SNAPSHOT" in a maven version 
> string means for referencing build artifacts from a repo.
>
>
Thanks for the pointer. That looks like the feature I was looking for.

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


[android-developers] Re: Reusable code organization with Android Studio

2015-01-24 Thread Nobu Games
Thanks for your input!

On Friday, January 23, 2015 at 7:39:51 PM UTC-8, Grunthos wrote:
>
>
>>- I keep app projects in separate repositories and *I import my 
>>custom library modules*
>>   - 
>> *Importing a module creates a copy of the original *
>>   - This means *redundancy* and *code synchronization issues*. I may 
>>   forget to merge back changes I've done to one of the library modules
>>   - Unfortunately this is the "official" solution provided by the 
>>   IntelliJ IDEA documentation 
>>   
>> 
>>
>>
> Is this really so bad, or am I missing something? 
>
> In eclipse I import library projects in their own tree and make changes 
> relating to different projects in different trees. When I view one set of 
> changes is valid/correct/complete, I comit them and import them into my 
> other projects and fix/check/pray as appropriate. I view it as much the 
> same process as incorporating patches from other people. I *assume* this 
> what the IntelliJ approach is...please correct me if I am wrong!
>  
>

That's actually a very good point. I would deliberately allow redundancy to 
guarantee that a library works within an app project. As soon as the 
library is ready for prime time I can merge the changes back to the 
original repository and decide later if I need those changes in other app 
projects. It just makes the OCD part in me cringe a bit :-D 

>
>>- I set up a *Maven repository for my library modules* and add the 
>>needed modules as dependencies to my app project
>>   - Very elegant, but...
>>   - Every single tiny change in my library code requires rebuilding 
>>   and deploying the module.
>>   - I also fear that I need to increase the version code / build 
>>   number every single time so the local Maven cache gets updated? I have 
>> no 
>>   experience with this. :-/
>>   
>> Dunno. Don't know Maven, sadly.
>

I'm not sure but I believe this could probably be the ideal solution to 
satisfy my "OCD needs". I would have a central development repository for 
my library modules and add specific versions of them to my app projects. 
With Gradle it's just a matter of adding a dependency statement. That way I 
could also guarantee that my apps do not break when I make changes to my 
libraries without having to duplicate library code. It's just super 
cumbersome when I want to develop locally for a while. So I guess I'd start 
out the way you describe and have library modules as part of the app 
project. When the library is stable I could merge it back to the 
originating repository and create a release build for Maven and add that 
build version as a dependency to the app project.

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


[android-developers] Reusable code organization with Android Studio

2015-01-23 Thread Nobu Games
I've been pulling out my hair over this in the past two days and searched 
the Internet for best practices when it comes to organizing reusable code 
in an Android Studio project. Coming from an Eclipse development background 
it's not really all that intuitive to understand. This post is a bit 
longer, so bear with me.

*TL;DR:* *What's your best practice when it comes to module organization 
and version control?*

The way I organized code so far using Eclipse for development and Apache 
Ant for building projects allowed me to easily keep the app project 
separate from its library projects. They could reside in different 
directories that belong to different version control system repositories. 
Now with Android Studio and my limited understanding of Gradle and the new 
build process I am basically forced to have all so-called library 
*"modules"* arranged as sub-directories of the main app project directory. 
In terms of code organization I have the following options:

   - *I use only a single massive repository *that is basically an Android 
   Studio project that hosts all my Android app modules and custom library 
   modules
  - This is not going to happen
  - I keep app projects in separate repositories and *I import my 
   custom library modules*
  - 
*Importing a module creates a copy of the original *
  - This means *redundancy* and *code synchronization issues*. I may 
  forget to merge back changes I've done to one of the library modules
  - Unfortunately this is the "official" solution provided by the 
  IntelliJ IDEA documentation 
  

  - I keep app projects in separate repositories and *check out my 
   library modules from a separate repository as a Git submodule 
   *
  - I *cannot cherry-pick the needed library modules* from the Git 
  repository. Git submodule checks out the whole library repository
  - It does not play nicely with that one level deep project/module 
  directory structure for Android Studio projects
   - I set up a *Maven repository for my library modules* and add the 
   needed modules as dependencies to my app project
  - Very elegant, but...
  - Every single tiny change in my library code requires rebuilding and 
  deploying the module.
  - I also fear that I need to increase the version code / build number 
  every single time so the local Maven cache gets updated? I have no 
  experience with this. :-/
  
*Here is what I am currently doing* and I'm not sure if it's good enough or 
can be considered a best practice:

This is my directory structure for app projects:
\ projects
\ my-android-libs   (checked out from library modules repository)
\ module-1
\ module-2
\ ...
\ App-1 (checked out from App-1 repository)
\ app
\ ...
\ App-2 (checked out from App-2 repository)
\ app
\ ...

As suggested in this post , in 
any of those app projects I need to alter the settings.gradle file and add 
the desired module dependency like this:

include ':app'
include ':module-1'

project(':module-1').projectDir = new File(settingsDir, 
'../my-android-libs/module-1)

Then I also need to add to the app module's build.gradle file a "compile 
project" statement to the dependencies list:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile project(':module-1')
}

This workaround works so far and right now it's the "lesser evil" for me. 
However, I'm still totally new to Android Studio, Gradle and Maven and I'd 
like to hear if you guys know some best practices when it comes to module 
organization, project setup and version control. I'm especially interested 
if anyone of you goes with the private Maven repository solution and how 
that works for 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] BANNING APPS ON PURPOSE

2015-01-01 Thread Nobu Games
Well, it is possible to file takedown requests 
as a 
copyright holder. But since Michael did not publish his work before the 
stolen version was published this would probably stand no chance.

On Thursday, January 1, 2015 9:33:12 AM UTC-8, RKJ (Android developer) 
wrote:
>
> Michael,
>
> You can't ban.
>
> Rakesh
>
> On Thu, Jan 1, 2015 at 9:37 PM, Michael Benner  > wrote:
>
>> Guys, my question is:
>>
>> How can I ban those apps.
>>
>> 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-d...@googlegroups.com 
>> 
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Thanks & Regards
>
> Rakesh Kumar Jha
> Android Developer, Trainer and Mentor
> Bangalore
> Skype - rkjhaw
> (O) +918050753516
> (R) +919886336619
>  

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


[android-developers] Re: How to implement crossfade texture effect in Opengl?

2014-12-28 Thread Nobu Games
OpenGL ES 2.x and higher are the way to go, so you probably won't get 
around coding your own shaders. That comes with a lot of advantages and a 
few problems. Yes there are some compatibility issues but they are 
universal and also affect desktop GPUs due to subtle inconsistencies in 
driver implementations. The article you linked to points out the main 
problems I also encountered. However, those issues do not mean that you 
should avoid using the OpenGL ES 2.x and higher. Take it as a list of best 
practices to follow.

You should also read through the following blog about OpenGL ES programming 
for Android: 
http://www.learnopengles.com/android-lesson-one-getting-started/
The articles there also explain how to bind textures, prepare and upload 
vertex data and so on. I hope they will answer your other questions. In my 
experience you won't run into big problems with most basic shader 
approaches. That cross-fading effect should not cause any issues.

On Sunday, December 28, 2014 3:01:58 AM UTC-8, MobileVisuals wrote:
>
> Thanks, I understood what you mean after reading this article:
>
>
> http://androidblog.reindustries.com/opengl-es-2-0-2d-shaders-series-001-basic-shaders/
>
> I am on the case now and I will try to implement it. I assume that texA 
> and texB are some sort of GLSL texture objects, representing
> the first and second texture? How do I connect them to the regular texture 
> objects textures[0] and textures[1]?
>
> I found an article, which says that implementing your own shaders will not 
> work well on a lot of devices:
>
>
> http://bitiotic.com/blog/2013/09/24/opengl-es-shading-language-potholes-and-problems/
>
> They write:
>
> "In my experience OpenGL ES shaders are the real fragmentation pain point 
> of OpenGL game development on Android.
> there are a diversity of hardware implementations of the OpenGL ES 2.0 
> API."
>
> Maybe it is the same problem as with light effects, that it only works on 
> some 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: How to implement crossfade texture effect in Opengl?

2014-12-26 Thread Nobu Games
Never tried that myself but from OpenGL ES 2.x you could assign two 
textures to a fragment shader that gradually achieves that blending effect 
over time. The simplest blending effect would be linear, which has the 
basic formula:

P_mix = P_a * (1 - t) + P_b * t

where...

   - P_a would be the RGB color channel values of texture A
   - P_b the color channel values of texture B
   - t would be a time factor ranging from 0 to 1 and
   - P_mix is the blended result.


Now my GLSL skills are a bit rusty at the moment. It may look like the 
following (without any lighting calculations):

uniform sampler2D texA;
uniform sampler2D texB;
uniform float t;

varying vec2 texCoord;

void main() {
vec4 pA = texture2D(texA, texCoord);
vec4 pB = texture2D(texB, texCoord);
vec4 pMix = pA * (1.0 - t) + pB * t;
gl_FragColor = pMix;
}

>From your host app you'd need to animate the uniform value t over time.

On Wednesday, December 24, 2014 4:23:22 AM UTC-8, MobileVisuals wrote:
>
> I want to switch from the first texture to the other one with a gradual 
> fading effect. How can I do that?
>

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


Re: [android-developers] Re: Free App suspended for adding Google Analytics?

2014-11-18 Thread Nobu Games
You could in fact (try) to get around Google's payment processor if you 
change your donate button into an in-app purchase of a media file that can 
also be processed by other apps (images, videos, songs, eBook...), see Google 
Play Developer Policies 
:

Developers offering additional content, services or functionality within 
another category of app downloaded from Google Play must use Google Play's 
in-app billing service 
 as the method 
of payment, *except:* 
   
   - where payment is primarily for physical goods or services (e.g., 
   buying movie tickets, or buying a publication where the price also includes 
   a hard copy subscription); or 
   - *where payment is for digital content or goods that may be consumed 
   outside of the app itself (e.g., buying songs that can be played on other 
   music players). *


The only difficulty would be communicating the message to your users that 
the purchase is meant to be a donation for your work on the app. If you 
would phrase it like that you still would be violating the policies.


On Tuesday, November 18, 2014 11:35:13 AM UTC-6, NickL wrote:
>
> I bet you are exactly right.  Much as it sounds crazy, that is the only 
> thing that would explain this.  thanks!  
>
> I still think there must be a way to collect donations without giving 
> those scoundrels a cut of the loot. 
>
> On Tuesday, November 18, 2014 12:26:11 PM UTC-5, TreKing wrote:
>>
>>
>> On Tue, Nov 18, 2014 at 9:54 AM, NickL  wrote:
>>
>>> There is a donate link (redirects to PayPal) but there is nothing in any 
>>> way that gives the sense that new content would be made available by 
>>> clicking that link to donate, which is a Google requirement.  It just says 
>>> "touch here to donate".  
>>
>>
>> From 3.5 
>> 
>> :
>>
>> "The Payment Processor must process all fees a Developer receives for any 
>> version of a Product distributed via the Store"
>>
>> I can't speak with any authority, obviously, and I wouldn't consider a 
>> donation a "fee" (that's for the lawyers to decide), but given the reason 
>> you posted and your comment, I would expect this to be the problem. Pushing 
>> the update probably triggered a review (possibly random?) and Lord Google™ 
>> was not pleased that you are getting dollar bills yo without making your 
>> contribution to them.
>>
>> You should probably switch that out with IAP.
>>
>> Good luck.
>>
>>
>> -
>> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: insane ScrollView problems

2014-10-14 Thread Nobu Games
I'm not sure if that's just a copy & paste error, but you close the 
LinearLayout tag prematurely. So all its attributes including layout_width 
just count as "unexpected text":

http://schemas.android.com/apk/res/android"; > 


* 
^ 
| 
Here*

You can easily spot these mistakes by running Android's excellent lint 
tool. If you are using Eclipse for development you should see a yellow 
warning triangle show up at that spot.

On Tuesday, October 14, 2014 6:42:59 PM UTC-5, Spooky wrote:
>
> I give up...I've gone through examples (including using my own past code 
> that worked), and no matter what I try, using ScrollView causes a force 
> close, claiming that I haven't provided a layout_width parameter (I 
> have).  In fact, I checked EVERYTHING in the layout file, and nothing 
> is missing layout_width or layout_height.  And yet, logcat still claims 
> it isn't there.  It even give me the line number where it isn't (and is) 
> there.  I have been going in circles on this for hourscan someone 
> please point out what I'm not seeing? 
>
> Here is the layout file (main.xml): 
>
> ---  CUT HERE  --- 
>  
> http://schemas.android.com/apk/res/android"; 
> > 
> android:layout_width="fill_parent" 
> android:layout_height="wrap_content" 
> android:background="#00" 
> android:orientation="vertical" 
> tools:context="com.jdgapps.andgtbrew2.AndGTbrew2" > 
>
>   android:layout_width="fill_parent" 
>   android:layout_height="80dp" 
>   android:layout_alignParentLeft="true" 
>   android:layout_alignParentTop="true" > 
>
> android:id="@+id/linearLayout1" 
>  android:layout_width="match_parent" 
>  android:layout_height="fill_parent" 
>  android:gravity="center_vertical|center_horizontal" 
>  android:orientation="vertical" > 
>
>   android:id="@+id/newBrewView" 
>   android:layout_width="wrap_content" 
>   android:layout_height="wrap_content" 
>   android:padding="10sp" 
>   android:textSize="24sp" 
>   android:textColor="#FF" 
>   android:layout_alignParentTop="true" 
>   android:background="#" /> 
>
>   android:id="@+id/openExistingView" 
>   android:layout_width="wrap_content" 
>   android:layout_height="wrap_content" 
>   android:padding="10sp" 
>   android:textSize="24sp" 
>   android:textColor="#FF" 
>   android:background="#" /> 
>
>   android:id="@+id/cloneBrewView" 
>   android:layout_width="wrap_content" 
>   android:layout_height="wrap_content" 
>   android:padding="10sp" 
>   android:textSize="24sp" 
>   android:textColor="#FF" 
>   android:background="#" /> 
>
>   android:id="@+id/reformulateView" 
>   android:layout_width="wrap_content" 
>   android:layout_height="wrap_content" 
>   android:padding="10sp" 
>   android:textSize="24sp" 
>   android:textColor="#FF" 
>   android:background="#" /> 
>
>   android:id="@+id/brewToFileView" 
>   android:layout_width="wrap_content" 
>   android:layout_height="wrap_content" 
>   android:padding="10sp" 
>   android:textSize="24sp" 
>   android:textColor="#FF" 
>   android:background="#" /> 
>
>   android:id="@+id/reportToFileView" 
>   android:layout_width="wrap_content" 
>   android:layout_height="wrap_content" 
>   android:padding="10sp" 
>   android:textSize="24sp" 
>   android:textColor="#FF" 
>   android:background="#" /> 
>
>   android:id="@+id/reportToTeXView" 
>   android:layout_width="wrap_content" 
>   android:layout_height="wrap_content" 
>   android:padding="10sp" 
>   android:textSize="24sp" 
>   android:textColor="#FF" 
>   android:background="#" /> 
>
> 
> 
>  
>
> ---  CUT HERE  --- 
>
> And here is the error I'm getting in logcat: 
>
> ---  CUT HERE  --- 
> 10-14 18:20:42.276 E/AndroidRuntime(19964): java.lang.RuntimeException: 
> Unable to start activity 
> ComponentInfo{com.jdgapps.andgtbrew2/com.jdgapps.andgtbrew2.AndGTbrew2}: 
> java.lang.RuntimeException: Binary XML file line #2: You must supply a 
> layout_width attribute. 
>
> 10-14 18:20:42.276 E/AndroidRuntime(19964): at 
> com.jdgapps.andgtbrew2.AndGTbrew2.onCreate(AndGTbrew2.java:54) 
> ---  CUT HERE  --- 
>
> Take the ScrollView out, and it works...but only in Portrait.  In 
> Landscape, it NEEDS that ScrollView. 
>
> Does anyone see anything I'm not? 
>
> Thanks, 
>--jim 

Re: [android-developers] Re: Physical address is required for paid apps or in-app purchases

2014-09-24 Thread Nobu Games
I added all information on both tabs, with the same address, since I'm 
running a business. The legal profile is likely just between you, Google 
and the authorities which will be contacted by Google to validate your 
business.

The public profile is probably the one you want to be careful with, if you 
want to hide your home address. In my experience, the legal profile is the 
more important one. It should be absolutely identical with whatever records 
you have filed with your bank and tax authorities. In my case Google denied 
payment a few months ago because they found a tiny typo in my business 
address and they said they could not match it against the records of the 
IRS. It was something like a missing letter, so they are going to be very 
pedantic there.

On Wednesday, September 24, 2014 3:29:33 PM UTC-5, Kostya Vasilyev wrote:
>
> @Jose - I contacted Play support about it and they explained that it has 
> to do with European customer protection laws, and there is no way they will 
> make any exceptions. So I think you can forget about "reverted" too.
>
> @Noby - do you know if it should be under Business Information -> Public 
> Profile -> Address, or under Legal profile -> Payee profile -> Address? 
> I'll need to use different addresses there, for personal safety.
>
> -- K
>
> 2014-09-24 23:45 GMT+04:00 Nobu Games >
> :
>
>> As far as I know, the physical address has to be specified in your Google 
>> Wallet Merchant <https://wallet.google.com/merchant/> account, that you 
>> use for receiving payments from Google Play.
>>
>>
>> On Wednesday, September 24, 2014 2:38:24 PM UTC-5, Jose_GD wrote:
>>>
>>> I thinks this is another sign of the insanity a company can get when it 
>>> grows too big...
>>> We are less than a week from the deadline and still it isn't possible to 
>>> find the dreaded "Physical address" field in the already painful Developer 
>>> Console (too be fair it got better in some aspects lately)
>>>
>>> Hope this crazy decision gets reverted in the following days
>>>
>>> Cheers
>>>
>>> José
>>> https://play.google.com/store/apps/developer?id=Jos%C3%A9+
>>> Gonz%C3%A1lez+D%27Amico
>>>
>>>
>>> El jueves, 18 de septiembre de 2014 03:13:56 UTC-3, nagamatu escribió:
>>>>
>>>> Dear Android Developers,
>>>>
>>>> I got the following notification at Google play Developer Console.
>>>>
>>>> | Add a physical contact address Beginning September 30, 2014, you need 
>>>> to add a physical address
>>>> | to your Settings page. After you've added an address, it will be 
>>>> available on your app's detail page to
>>>> | all users on Google Play. If your physical address changes, make sure 
>>>> to update your information on
>>>> | your Settings page. 
>>>>
>>>> | If you have paid apps or apps with in-app purchases, it's mandatory 
>>>> to provide a physical address 
>>>> | where you can be contacted. If you don't provide a physical address 
>>>> on your account, it may result in
>>>> | your apps being removed from the Play Store.
>>>>
>>>> I do not want to disclose my home address in public, because I am an 
>>>> individual developer.
>>>> This is privacy issue. I don't understand why Google requires my 
>>>> physical address.
>>>>
>>>> I disclose my e-mail address and users can contact me. Also I can reply 
>>>> to messages that is written
>>>> in review at Google Play.
>>>>
>>>> If I am working for a company and office address is disclosed in 
>>>> public, I do not care for it.
>>>> But do you want to know your home address in public?
>>>>
>>>> # I sent a feedback about objection for this requirement. 
>>>>
>>>> --
>>>> nagamatu
>>>>
>>>>
>

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


[android-developers] Re: Physical address is required for paid apps or in-app purchases

2014-09-24 Thread Nobu Games
As far as I know, the physical address has to be specified in your Google 
Wallet Merchant  account, that you use 
for receiving payments from Google Play.

On Wednesday, September 24, 2014 2:38:24 PM UTC-5, Jose_GD wrote:
>
> I thinks this is another sign of the insanity a company can get when it 
> grows too big...
> We are less than a week from the deadline and still it isn't possible to 
> find the dreaded "Physical address" field in the already painful Developer 
> Console (too be fair it got better in some aspects lately)
>
> Hope this crazy decision gets reverted in the following days
>
> Cheers
>
> José
>
> https://play.google.com/store/apps/developer?id=Jos%C3%A9+Gonz%C3%A1lez+D%27Amico
>
>
> El jueves, 18 de septiembre de 2014 03:13:56 UTC-3, nagamatu escribió:
>>
>> Dear Android Developers,
>>
>> I got the following notification at Google play Developer Console.
>>
>> | Add a physical contact address Beginning September 30, 2014, you need 
>> to add a physical address
>> | to your Settings page. After you've added an address, it will be 
>> available on your app's detail page to
>> | all users on Google Play. If your physical address changes, make sure 
>> to update your information on
>> | your Settings page. 
>>
>> | If you have paid apps or apps with in-app purchases, it's mandatory to 
>> provide a physical address 
>> | where you can be contacted. If you don't provide a physical address on 
>> your account, it may result in
>> | your apps being removed from the Play Store.
>>
>> I do not want to disclose my home address in public, because I am an 
>> individual developer.
>> This is privacy issue. I don't understand why Google requires my physical 
>> address.
>>
>> I disclose my e-mail address and users can contact me. Also I can reply 
>> to messages that is written
>> in review at Google Play.
>>
>> If I am working for a company and office address is disclosed in public, 
>> I do not care for it.
>> But do you want to know your home address in public?
>>
>> # I sent a feedback about objection for this requirement. 
>>
>> --
>> nagamatu
>>
>>

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


[android-developers] Re: To implement Donation functionality using paypal natively

2014-09-22 Thread Nobu Games
The current Google Play Developer Program Policies 
 state the 
following about payment processing and monetization:

*Paid and Free Apps*
>  
>- *App purchases:* Developers charging for apps and downloads from 
>Google Play must do so by using Google Play's payment system. 
>- *In-app purchases:* 
>- 
>   - Developers offering virtual goods or currencies within a game 
>   downloaded from Google Play must use Google Play's in-app billing 
>   service 
>    as 
>   the method of payment. 
>   - Developers offering additional content, services or functionality 
>   within another category of app downloaded from Google Play must use 
> Google 
>   Play's in-app billing service 
>    as 
>   the method of payment, except: 
>  - where payment is primarily for physical goods or services 
>  (e.g., buying movie tickets, or buying a publication where the price 
> also 
>  includes a hard copy subscription); or 
>  - where payment is for digital content or goods that may be 
>  consumed outside of the app itself (e.g., buying songs that can be 
> played 
>  on other music players). 
>- Developers must not mislead users about the apps they are 
>selling nor about any in-app services, goods, content or functionality 
> they 
>are selling. If your product description on Google Play refers to in-app 
>features to which a specific or additional charge applies, your 
> description 
>must clearly notify users that payment is required to access those 
>features. 
>
> These conditions do not explicitly mention donations, but the way I read 
it is that using a 3rd party payment processor such as PayPal is only 
forbidden when the payment is meant for the app itself or extended features 
and goods that can only be used / consumed with the app. According to those 
conditions it's probably also not allowed to ask for PayPal donations for 
your programming work, since that could be seen as a late payment for the 
app.
I would say that donations for a good cause unrelated to yourself and your 
app, are acceptable. To be sure you could either try and get in touch with 
the Google Play developer support team 
 or consult a 
lawyer.

By the way, there is an Android *donations* *library* on GitHub, that 
claims to support several payment processors: 
https://github.com/dschuermann/android-donations-lib


On Saturday, September 20, 2014 2:18:24 AM UTC-5, vitthal khatpe wrote:
>
> I want to implement the Donation functionality using Paypal for a android 
> application which is generating donation for a cause. There are three 
> options to implement 
>
> 1) Using Native SDK 
>
> 2) Using webview 
>
> 3) Redirect to webpage on browser
>
> If i go with the first option, then it is possible to replace the button 
> (*Buy 
> a Thing*) with label '*Donate*' shown in sample application of Paypal Paypal 
> sample app for integrating SDK in native app 
> 
>
>
> 
>
>
>
> As i am using the donation option in native app instead of In App 
> Purchase. In this case, Will Google suspend my application from Google play 
> store?.
>
> If above case is true, In that case, do i have to go with the second 
> option (WebView) OR this webview option is also not possible as it is also 
> the part of native application.
>
> And Hence i have to redirect a user to the browser for a donation if above 
> options are not true.
>
> Please let me know the correct option.
>
> Thanks in Advance.
>
>
>
>
>

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


Re: [android-developers] Re: Save Html file Data

2014-09-19 Thread Nobu Games
Or the simpler alternative: use the HTML5 persistent local storage feature, 
so everything can be handled from within the same HTML page.

http://stackoverflow.com/questions/5899087/android-webview-localstorage
https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage

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


Re: [android-developers] need reference / example for game orientation matrix

2014-09-13 Thread Nobu Games
I can recommend this book: 
http://www.amazon.com/Mathematics-Programming-Computer-Graphics-Edition/dp/1435458869/
It covers various important topics in 3D game development and also explains 
the basics about matrices and vectors.
Another great source is this website here: http://www.euclideanspace.com/ - 
http://www.euclideanspace.com/maths/geometry/affine/index.htm

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


[android-developers] Re: WebView.setEmbeddedTitleBar gone in Jelly Bean? Which alternatives?

2014-07-22 Thread Nobu Games
Here is a follow-up since I am still getting emails from people around the 
world: the *titlebar-webview hack does not work* anymore and* it cannot be 
fixed.* That's why I deleted the project from Google Code. It was a nasty 
hack that exposed a hidden interface and was actually doomed to fail over 
time.

If you want to have a title bar view then please consider a fixed layout 
(title bar view permanently on top of web view) or try to create something 
along the lines of the NavigationDrawer component.

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


[android-developers] Re: Image captured from my app is rotated by default

2014-03-25 Thread Nobu Games
This is expected behavior, and Doug's assumption is right. JPEG images may 
contain EXIF data 
blocks that also specify the orientation of the image. On your server 
you need to read the orientation data and use it to rotate the image into 
the opposite direction. If your server code is written in PHP you can use 
the Imagick library and the following functions for determining the 
orientation and rotating the image 
respectively:Imagick::getImageOrientation(),
 
Imagick::rotateImage()
.
If the server software is written in Java you could use a library such as 
Metadata-Extractor  for 
reading the orientation and any image processing library of your choice for 
rotating the image.


On Tuesday, March 25, 2014 1:07:37 AM UTC-5, Jags wrote:
>
> Hi All,
>
> I tried to capture an image and send it to server in my app. I did that 
> using camera intent. the problem is in my samsung galaxy s4 device the 
> image is rotated -90 degree by default. I read around web that it is a 
> problem with the samsung devices. But what is the best solution to it ? if 
> i rotate the image after capture, it becomes heavy image processing in my 
> app. What is the best approach to resolve this ? 
>
> in phonegap there is something like correctOrientation = true / false 
> what's its counterpart in native code ?
>
> thanks and regards
> jags
>

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


[android-developers] Re: forcing more GC_FOR_ALLOC

2014-02-12 Thread Nobu Games
Could you tell a bit more about the game:

- What Android version are you testing on?
- Do you draw graphics using OpenGL ES or Canvas?
- How many bitmaps or textures do you use at a time?
- What's the average resolution and bit depth of your bitmaps / textures?
- Do you scale or process bitmaps on load, if so how does that code look 
like?
- Do you also use MediaPlayer / SoundPool? If yes how many instances of 
them and how many sounds are loaded into your SoundPool? What are their 
bitrates, mono/stereo?
- Do you get that OOM exception while creating a new bitmap object?

On Wednesday, February 12, 2014 4:41:39 PM UTC-6, firebreather wrote:
>
> i'm recycling large bitmap files for my game in hopes of avoiding out of 
> memory errors. however the system does not appear to be making the memory 
> available for new bitmap allocation and no matter how many bitmaps I 
> recycle it always appears to crashe at the same time as if I didn't recycle 
> anything. I'm using system.gc to force garbage collection after  every 
> .recycle command, but it doesn't seem to make a difference. neither 
> does  view.getResources().flushLayoutCache();  or 
> view.destroyDrawingCache();.
> here is the log:
>
> 02-12 16:24:45.006: D/dalvikvm(1627): GC_EXPLICIT freed 3113K, 20% free 
> 25450K/31751K, paused 77ms+47ms
> 02-12 16:24:45.006: D/MainGamePanel(1627): in main after gc
> 02-12 16:24:46.966: D/dalvikvm(1627): GC_CONCURRENT freed <1K, 14% free 
> 27403K/31751K, paused 35ms+140ms
> 02-12 16:24:52.975: D/dalvikvm(1627): GC_CONCURRENT freed 2546K, 16% free 
> 26871K/31751K, paused 60ms+91ms
> 02-12 16:25:35.253: D/dalvikvm(1627): GC_CONCURRENT freed 1742K, 15% free 
> 27138K/31751K, paused 51ms+44ms
> 02-12 16:26:38.351: D/dalvikvm(1627): GC_CONCURRENT freed 1923K, 15% free 
> 27226K/31751K, paused 87ms+69ms
> 02-12 16:28:03.941: D/dalvikvm(1627): GC_CONCURRENT freed 3577K, 20% free 
> 25696K/31751K, paused 26ms+57ms
> 02-12 16:28:08.879: D/Datapool(1627): recycle called
> 02-12 16:28:10.356: D/dalvikvm(1627): GC_EXPLICIT freed 934K, 20% free 
> 25578K/31751K, paused 73ms+73ms
> 02-12 16:28:10.356: D/Datapool(1627): system.gc called
> 02-12 16:28:12.356: D/dalvikvm(1627): GC_EXPLICIT freed 732K, 22% free 
> 24845K/31751K, paused 60ms+66ms
> 02-12 16:28:12.356: D/Datapool(1627): system.gc called
> 02-12 16:28:13.536: D/dalvikvm(1627): GC_FOR_ALLOC freed 85K, 23% free 
> 24760K/31751K, paused 1128ms
> 02-12 16:28:13.756: I/dalvikvm-heap(1627): Grow heap (frag case) to 
> 26.915MB for 2797584-byte allocation
> 02-12 16:28:15.486: D/dalvikvm(1627): GC_CONCURRENT freed 0K, 14% free 
> 27492K/31751K, paused 79ms+114ms
> 02-12 16:28:17.428: D/dalvikvm(1627): GC_FOR_ALLOC freed 0K, 14% free 
> 27492K/31751K, paused 649ms
> 02-12 16:28:17.428: I/dalvikvm-heap(1627): Forcing collection of 
> SoftReferences for 1243076-byte allocation
> 02-12 16:28:18.715: D/dalvikvm(1627): GC_BEFORE_OOM freed 0K, 14% free 
> 27492K/31751K, paused 1276ms
> 02-12 16:28:18.715: E/dalvikvm-heap(1627): Out of memory on a 1243076-byte 
> allocation.
>
>
>
>

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


[android-developers] Re: ANR from internal function

2014-02-10 Thread Nobu Games
I guess the solution is trying to debug the heck out of it, that's also 
what the OP was basically asking for. The causes in her/his case will most 
likely be too different to be useful for you, since I think it's related to 
multithreading deadlocks due to bad locking / synchronization. I had 
similar problems in my last game, because I screwed up at some places. 
Proper thread synchronization can be subtly difficult to implement.

What you could do is running your app using a debugger. As soon as the app 
gets unresponsive, look into the list of currently active threads that 
belong to your app process (in Eclipse that would be in the debug view in 
the debug perspective). As far as I recall, locked up threads are marked as 
"waiting". You should be able to see the currently executing method names 
and complete call stacks per thread. Their locations in code may give you 
hints what's causing the problem. You also may have to pause your app in 
order to avoid that crash happening.


On Monday, February 10, 2014 3:48:02 AM UTC-6, Landry shuai wrote:
>
> I have met the same problem. Do you have a solution for this problem?
>
> On Friday, March 22, 2013 12:09:25 AM UTC+8, Mind wrote:
>>
>> Hi,
>>
>> I have implemented a 2D game using SurfaceView + GameThread (does nothing 
>> atm) + ViewThread pattern that calls a draw method on the SurfaceView.
>>
>> However, it randomly stops redrawing the screen.  "Randomly" means it can 
>> take up to several minutes of play to freeze.  Other things like timers/etc 
>> on the Activity itself continue to work.
>>
>> See the tombstone data below.  I really don't know how to read this.  It 
>> seems that the call to RoundRectShape() is the problem while drawing the 
>> rectangle from touchDown to touchUp.  However, it works fine for some 
>> minutes of random touching before crashing.
>>
>> I would appreciate it if someone with more knowledge could give me some 
>> idea on HOW to debug this.  Thanks!
>>
>> Here is the tombstone data:
>>
>> "main" prio=5 tid=1 WAIT
>>   | group="main" sCount=1 dsCount=0 obj=0x41b809a0 self=0x40091010
>>   | sysTid=31227 nice=0 sched=0/0 cgrp=apps handle=1075041244
>>   | state=S schedstat=( 0 0 0 ) utm=67 stm=29 core=1
>>   at java.lang.Object.wait(Native Method)
>>   - waiting on <0x41b80da0> (a java.lang.VMThread) held by tid=1 (main)
>>   at java.lang.Thread.parkFor(Thread.java:1231)
>>   at sun.misc.Unsafe.park(Unsafe.java:323)
>>   at java.util.concurrent.locks.LockSupport.park(LockSupport.java:159)
>>   at 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:810)
>>   at 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:843)
>>   at 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1173)
>>   at 
>> java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:183)
>>   at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:259)
>>   at android.view.SurfaceView.updateWindow(SurfaceView.java:497)
>>   at 
>> android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:231)
>>   at android.view.View.dispatchWindowVisibilityChanged(View.java:7544)
>>   at 
>> android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1039)
>>   at 
>> android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1039)
>>   at 
>> android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1039)
>>   at 
>> android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1039)
>>   at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1211)
>>   at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989)
>>   at 
>> android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351)
>>   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
>>   at android.view.Choreographer.doCallbacks(Choreographer.java:562)
>>   at android.view.Choreographer.doFrame(Choreographer.java:532)
>>   at 
>> android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
>>   at android.os.Handler.handleCallback(Handler.java:725)
>>   at android.os.Handler.dispatchMessage(Handler.java:92)
>>   at android.os.Looper.loop(Looper.java:137)
>>   at android.app.ActivityThread.main(ActivityThread.java:5041)
>>   at java.lang.reflect.Method.invokeNative(Native Method)
>>   at java.lang.reflect.Method.invoke(Method.java:511)
>>   at 
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
>>   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
>>   at dalvik.system.NativeStart.main(Native Method)
>>
>> "Thread-3900" prio=5 tid=12 TIMED_WAIT
>>   | group="main" sCount=1 dsCount=0 obj=0x4242c4c8 self=0x73c2f6c0
>>   | sysTid=31253 nice=0 sched=0/0 cgrp=apps handle=1924236928
>>   | state=S schedstat=( 0 0 0 ) utm=62 stm=44 core=1
>>   at java.lang.VMThread.sleep(Nativ

[android-developers] Re: Activty on orientation

2014-02-08 Thread Nobu Games
By default the activity gets recreated on certain events such as 
orientation change. This is, as far as I know, the preferred behavior. You 
can handle these so-called "runtime changes" (such as orientation change, 
but there are more events that trigger activity re-creation such as changed 
system language) yourself by specifying the android:configChanges attribute 
of your activity in the manifest XML file. Handling orientation changes 
yourself will basically tell Android not to re-create the activity in case 
of an orientation change, and therefore your view hierarchy will be 
retained. See 
herefor
 more information.

On Saturday, February 8, 2014 6:38:40 AM UTC-6, rahul kaushik wrote:
>
> Hi,
>
> I created dynamic controls on view ,i call the this view creation at 
> OnCreate when i changed the orientation the activity call the OnCreate 
> again and it consume same amount of time which which was created at very 
> first time ,can i reduce this time on orientaion 
> Pls Suggest
>
> Thanks
> RK
>

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


[android-developers] Re: LVL: possible to check license for a different app?

2014-02-06 Thread Nobu Games
Educated guess: the UID may be the app's user id (UID). As far as I know, 
Android creates a unique user for each installed app for enforcing 
app-specific file system permissions. The licensing service probably checks 
that the requesting app process' user id matches the user id for the 
requested package. So it looks more like a security check and I'd assume 
that you cannot work around that, unless you'd run your request as that 
other user. And that's probably only possible on a rooted device.

On Thursday, February 6, 2014 7:54:17 AM UTC-6, 3c wrote:
>
> Does any-one has a solution to this? I would really need this to work! 
> Isn't there any way to check the license of one package from another 
> package?
>
>
> On Thursday, January 23, 2014 8:47:16 AM UTC+1, 3c wrote:
>>
>> Hello, I was really wondering the same thing (for a different purpose), 
>> however no-one clearly answered your original question here, so I've 
>> actually tested it directly.
>>
>> First thing, I had to modify the LVL library to take a package name and 
>> version code as parameter instead of using the current app's information 
>> automatically.
>>
>> Without the other paid app installed, I received 
>> a ERROR_INVALID_PACKAGE_NAME.
>>
>> Once the other paid app was installed, I unfortunately received 
>> a ERROR_NON_MATCHING_UID.
>>
>> As I couldn't find any UID information in the LVL library, the answer is 
>> now pretty clear: it's not possible.
>>
>>
>> On Thursday, January 6, 2011 1:27:25 AM UTC+1, andfan22 wrote:
>>>
>>> Hi all 
>>>
>>> Just wondering if I can use LVL to check that the user is licensed to 
>>> use a DIFFERENT app from the current one -- ie. one with a different 
>>> package name. 
>>>
>>> Why would I want to do this?  I'm developing an app which I'm 
>>> considering publishing using a free + pro license model.  The main app 
>>> would be a free, ad supported app.  To turn off ads the user would 
>>> purchase a pro license key from the market (published as a paid app 
>>> containing no functionality).  The user would continune to use the app 
>>> that was downloaded for free, which checks if the paid app is 
>>> installed, and if so it disables ads.   I prefer this model to a fully 
>>> featured paid app model, as it eliminates the need to migrate data 
>>> from the free version to the paid when the user upgrades. 
>>>
>>> Under this model I would like the free app to check if the paid app is 
>>> installed, and if so the free app would then use LVL to check if the 
>>> user has purchased the paid app via the market.  Will it be possible 
>>> for the free app to pass the package name of the paid app to LVL, and 
>>> to get back a result confirming whether the paid app has been 
>>> purchased or not? 
>>>
>>> Looking at the LVL source code I suspect I can do this by modifying 
>>> the constructor of LicenseChecker to set mPAckageName to a supplied 
>>> argument rather than setting it to mContext.getPackageName(). 
>>>
>>> Are there any gotcha's I may be missing? 
>>>
>>> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Home screen icon ads

2014-02-05 Thread Nobu Games
It could be just about any app that uses some ad(ware) SDK. As far as I 
know doing that kind of thing also requires a specific permission (

com.android.launcher.permission.INSTALL_SHORTCUT). So you could look through 
your list of installed apps and look for one with that permission.
Maybe there are also AdWare scanner apps that can automate that search for you.


On Wednesday, February 5, 2014 11:41:26 AM UTC-6, Steve Gabrilowitz wrote:
>
> I know this probably isn't the right group for this question but I'm not 
> sure where else to ask and have googled with no appropriate hits.  Recently 
> I've been getting a whole bunch of these annoyances and haven't installed 
> anything outside of the Play Store so apparently somebody isn't playing by 
> Googles new rules and is getting away with it!  Is there any way to track 
> down which app is doing this so that I can take appropriate action?
>

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


[android-developers] Re: licensing - ServerManagedPolicy not caching

2014-02-02 Thread Nobu Games
Actually Google isn't doing their developers any favor with the LVL. The 
documentation reads like it is meant to serve as a drop-in solution that 
adds reliable DRM to your paid app. Just configure it a little bit with 
some policy and your "app is safe". On the other hand there is that lengthy 
Google 
I/O 
talkand
 some 
official blog 
poststhat
 discourage from using the LVL "as is", since all its components are 
known and a cracker can easily find them in your decompiled Java code and 
just remove them. The LVL is more of a proof of concept that should give 
you ideas how to interface the Play licensing service. That means changing 
and rewriting the whole LVL up to a point where the original is not 
recognizable anymore and at that point you understand every single bit of 
it yourself and don't run into that policy problem anymore, because you'd 
implement that policy yourself.

I voiced my opinion about the LVL and DRM here in the past and I used to be 
in favor of all these efforts. But trying to do it as properly as possible 
is a lot of additional overhead (it took me almost a week the first time), 
and when not done properly it either does not protect your app at all and / 
or pisses off legitimate customers. So I decided to get rid of any kind of 
DRM in my products altogether. It makes me sleep better because I know that 
it won't accidentally accuse one of my paying customers of theft just 
because I may have done some silly mistake. And in the end, if your app is 
interesting enough someone will crack it anyway. I guess it's more 
important to focus on those people who are willing to pay for your work and 
services. And maybe it really does help to see those cracked copies as some 
kind of free advertisement for your name and brand.

If you still want to implement DRM for your app, then watch that video I 
linked above. It's probably as in-depth as it can get when it comes to the 
LVL.


On Sunday, February 2, 2014 8:05:45 AM UTC-6, firebreather wrote:
>
> is licensing worth it for a paid game app?
>
> I have licensing added to my paid game, but I've found it goes online to 
> check for a license every single time the app is run, instead of only 
> occasionally doing it, as it's supposed to do with the 
> 'servermanagedpolicy' as opposed to the 'strict policy'.
>
> there are no ads in my paid game and I don't want the user to always have 
> to be online and wait for verification for every play.
>
> now I actually set a flag in the 'preferences' file the first time the 
> license check succeeds, so it doesn't check for licensing at all after the 
> first check, although I imagine this could be easy to hack for piraters.
>
> should the servermanagedpolicy' be cacheing something in the phone so it 
> doesn't have to check every play?
>
> here is the policy in the docs:
>
> A flexible Policy that uses settings provided by the licensing server to 
> manage response caching and access to the application while the device is 
> offline (such as when the user is on an airplane). For most applications, 
> the use of ServerManagedPolicy is highly recommended.
> Show trimmed content 
>

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


[android-developers] Re: CSS Height % Not working in Android App Screen

2014-01-28 Thread Nobu Games
I'm not sure if this is the cause but I noticed that your sample HTML page 
is missing a view port meta tag, which is commonly used in mobile web 
pages. The rendering logic is a bit different in mobile browsers due to the 
smaller screen size of mobile devices. Here is an explanation of mobile web 
browser view ports: http://www.quirksmode.org/mobile/viewports2.html

You have to add a meta tag to your HTML page header that tells the mobile 
browser something along the lines that the view port has to match the 
actual device screen width. Here is a Mozilla documentation page that 
explains it very well:

https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag

On Saturday, January 25, 2014 8:33:03 AM UTC-6, Cayce wrote:
>
> I have an app that delivers screen content in an html format, pulled from 
> a database. I need to work in percentages for width & height of elements 
> that make up the display, to accommodate various devices. I can't get the 
> height % to work in any components, no matter what I try. I've reduced the 
> layout to the simplest format for troubleshooting and am including it here. 
> I've assigned background colors to elements so as to see the effects of 
> code modifications.
> In the screenshot I've attached, the yellow background is part of the 
> background art. The yellow HTML color attribute is hidden behind the red 
> Body color, but should be showing at 100% height if working properly. This 
> is my display code, simplified:
>
>  http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> 
>  
> 
>  
>  
>  
> *{ margin:0;   padding:0;}   
> html { width:100%;  min-height:100%;   background:yellow;}  
> body { width:100%;  min-height:100%;  background:red;} 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
>
> Screenshot:
>
>
> 
>
> Thanks for any help getting through this.
>
> Cayce
>
>
>

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


[android-developers] Re: Rating Hijacking !

2014-01-22 Thread Nobu Games
I got feedback today from Google Play support acknowledging my complaints 
about that quick-rating widget:

Thank you for contacting the Google Play developer support team. I 
> sincerely apologize for the inconvenience.
>
> We really appreciate your thoughtful feedback, and we'll be sure to take 
> your thoughts into consideration as we work to improve Google Play.
>
> Thanks for your understanding and continued support!
>

Fingers crossed that this issue will get sorted out soon :-)

On Tuesday, January 21, 2014 1:33:59 PM UTC-6, Nobu Games wrote:
>
> I'm still far from being top or even mid-tier in terms of app downloads 
> but this morning I also got my first 2-star mystery rating for a paid app 
> of mine - no comment and no Google+ name I could respond to. That didn't 
> happen to me so far since most users tried the free version first and then 
> decided to buy afterward.
>
> This wouldn't have bothered me that much but nevertheless I wanted to see 
> for myself how that "recommendation rating widget" looks like on my phone. 
> So I opened the Google Play store app and scrolled down the lengthy front 
> page with several swipe movements. And I suddenly saw that an image was 
> flashing and quickly changing to "1 star". I accidentally rated some random 
> app while swiping the screen.
>
> This bug 100% reproducible:
>
>1. Touch one of the stars
>2. Move your finger up or down outside the recommendation box
>3. Lift finger
>4. App gets rated
>
> This can happen quickly and accidentally while scrolling down the screen. 
> Since I am right-handed (as the majority of people), my thumb naturally 
> reaches to the left side of the screen, where the worse rating options are 
> (1 and 2 stars). I bet this happens thousands of times every day without 
> people even realizing what they just did. I sent a bug report to Google 
> Play support about that issue.
>
> I also have to agree that the phrasing of the recommendation is completely 
> misleading. If it weren't for this thread here I would have thought that 
> I'd be rating recommendations and not apps. If I were asked to rate my 
> favorite "scanner app" with the question "rate this item to get 
> recommendations", I would give that recommendation a bad rating because I 
> am already 100% happy with my scanner app and I'm absolutely not interested 
> in more apps like that. I guess something along these lines may have 
> happened with my paid app this morning.
>
> Google Play really has to fix that as quick as possible. This new 
> recommendation widget is a substantial change in the overall rating system 
> Google had no experience with before. Stuff like that should be extensively 
> tested before put into production mode. Real users should have been 
> observed while interacting with that new widget. Real users should have 
> been asked how they interpret the meaning of that new feature. To make that 
> feature more useful it should be either decoupled from recommendations and 
> be absolutely straightforward: "Do you like this app? Rate it". If 
> recommendations are more important than that then it should be a simple 
> thumbs up / thumbs down and the result must not affect the rating of the 
> recommended app.
>
>
> On Friday, December 27, 2013 4:37:06 AM UTC-6, Tolriq wrote:
>>
>> Hi,
>>
>> My app rating is being hijacked by competitors and I don't know what to 
>> do :(
>> I've tried to contact Google but there's no category for that and they 
>> don't answer from the other category contact :(
>>
>> My app is 4.9 rating since a very very very long time and all very very 
>> few bad rating always had comments.
>> Since 14 days I start to have lot's of 1 or 2 stars rating without any 
>> comments and without having released a new version or the app having 
>> problems.
>> There's still the same amount of 4 / 5 star rating coming every day.
>>
>> This graph for the 6 last months from Play Store console : 
>> http://postimg.org/image/i2bpm94vt/ shows the problem clearly and proves 
>> without a doubt the hijacking action :(
>>
>> What are the possible actions against that ?
>> This is a shame that years of work can be attacked so easily :(
>>
>> How to contact some Google representative to have this investigated ?
>>
>> Regards,
>> Tolriq
>>
>

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


[android-developers] Re: Rating Hijacking !

2014-01-21 Thread Nobu Games
I'm still far from being top or even mid-tier in terms of app downloads but 
this morning I also got my first 2-star mystery rating for a paid app of 
mine - no comment and no Google+ name I could respond to. That didn't 
happen to me so far since most users tried the free version first and then 
decided to buy afterward.

This wouldn't have bothered me that much but nevertheless I wanted to see 
for myself how that "recommendation rating widget" looks like on my phone. 
So I opened the Google Play store app and scrolled down the lengthy front 
page with several swipe movements. And I suddenly saw that an image was 
flashing and quickly changing to "1 star". I accidentally rated some random 
app while swiping the screen.

This bug 100% reproducible:

   1. Touch one of the stars
   2. Move your finger up or down outside the recommendation box
   3. Lift finger
   4. App gets rated
   
This can happen quickly and accidentally while scrolling down the screen. 
Since I am right-handed (as the majority of people), my thumb naturally 
reaches to the left side of the screen, where the worse rating options are 
(1 and 2 stars). I bet this happens thousands of times every day without 
people even realizing what they just did. I sent a bug report to Google 
Play support about that issue.

I also have to agree that the phrasing of the recommendation is completely 
misleading. If it weren't for this thread here I would have thought that 
I'd be rating recommendations and not apps. If I were asked to rate my 
favorite "scanner app" with the question "rate this item to get 
recommendations", I would give that recommendation a bad rating because I 
am already 100% happy with my scanner app and I'm absolutely not interested 
in more apps like that. I guess something along these lines may have 
happened with my paid app this morning.

Google Play really has to fix that as quick as possible. This new 
recommendation widget is a substantial change in the overall rating system 
Google had no experience with before. Stuff like that should be extensively 
tested before put into production mode. Real users should have been 
observed while interacting with that new widget. Real users should have 
been asked how they interpret the meaning of that new feature. To make that 
feature more useful it should be either decoupled from recommendations and 
be absolutely straightforward: "Do you like this app? Rate it". If 
recommendations are more important than that then it should be a simple 
thumbs up / thumbs down and the result must not affect the rating of the 
recommended app.


On Friday, December 27, 2013 4:37:06 AM UTC-6, Tolriq wrote:
>
> Hi,
>
> My app rating is being hijacked by competitors and I don't know what to do 
> :(
> I've tried to contact Google but there's no category for that and they 
> don't answer from the other category contact :(
>
> My app is 4.9 rating since a very very very long time and all very very 
> few bad rating always had comments.
> Since 14 days I start to have lot's of 1 or 2 stars rating without any 
> comments and without having released a new version or the app having 
> problems.
> There's still the same amount of 4 / 5 star rating coming every day.
>
> This graph for the 6 last months from Play Store console : 
> http://postimg.org/image/i2bpm94vt/ shows the problem clearly and proves 
> without a doubt the hijacking action :(
>
> What are the possible actions against that ?
> This is a shame that years of work can be attacked so easily :(
>
> How to contact some Google representative to have this investigated ?
>
> Regards,
> Tolriq
>

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


[android-developers] Re: Android how we can free the RAM memory of the device.

2013-12-30 Thread Nobu Games
I could imagine that forcing the OS into a low memory situation might 
trigger what you want. By temporarily allocating large blocks of memory 
from native code (using the NDK) the OS may try to stop background apps and 
services which in turn will free their claimed resources and RAM. Don't 
forget to free your allocated memory.

On Monday, December 30, 2013 10:15:17 AM UTC-6, 12169 wrote:
>
> Hi,
>
> I have seen an application clean master that  free the system memory when 
> we click the option( boost memory).and it actually free the system RAM  and 
> i checked this programmatically.but i donot know how this application free 
> the system RAM.any help?  
>
> On Monday, December 30, 2013 4:20:04 AM UTC-8, 12169 wrote:
>>
>> Hi,
>>
>> I have found some applications that claims to free the RAM of the 
>> device.after search i have found that they free the inactive memory of the 
>> device.but i donot found any api to free the inactive memory of the 
>> device.any help how we can free the RAM of the device. 
>>
>

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


[android-developers] Re: WeakReference containing callback interface

2013-12-11 Thread Nobu Games
Why don't you check your progress bar if it's null before modifying it? If 
the progress bar got garbage collected it's safe to say that it is not 
there anymore (not visible) and any modification wouldn't make any sense at 
that stage.

On Wednesday, December 11, 2013 8:43:56 AM UTC-6, TheNetStriker wrote:
>
> I've got a question regarding WeakReferences in Android. I'am using 
> AndroidQuery in my app to load images asynchronous. I've modified the 
> AndroidQuery source a bit, so that it is also able to send progress 
> callbacks so that I can update the progressbars in my notifications. The 
> problem is that the progress object in AndroidQuery is referenced as 
> a WeakReference so that references to progressbars which are no longer 
> visible on the UI are getting garbage collected. The problem now that 
> AndroidQuery works with an ExecutorService and that my callback objects 
> also are getting garbage collected when the Runnable has to wait for its 
> execution. I could change the WeakReference to a hard one to fix this 
> proboem, but then I would have memory leaks when referencing progressbars 
> directly. Here is how I pass the callback interface to AndroidQuery:
>
> aq.progress(new ProgressCallback() { 
> @Override
> public void setProgress(final int progress) {
>  //update progressbar
> }
>  @Override
> public void setMax(int max, int progress) {
>  //update progressbar
> }
> })
>
> Is there a way to pass such a callback object without loosing the 
> reference when it is referenced inside an WeakReference object?
>

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


[android-developers] Re: Suggestion for next release of Android Studio

2013-12-01 Thread Nobu Games
You should file a feature request ticket here (if not already there): 
http://code.google.com/p/android/

On Saturday, November 30, 2013 8:39:11 PM UTC-6, Phil Gibbs wrote:
>
> Double clicking on a class (and everything else) brings the class into the 
> edit area but does not bring it into the active edit screen.  The tab needs 
> to be clicked to bring it into focus.  Please bring it into focus using the 
> double-click - like Eclipse allows.
>
>

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


[android-developers] Re: Fog color does not work in Jellybean!

2013-11-28 Thread Nobu Games
Try to debug by retrieving the GL error code:

Log.d("GL Error", gl.getErrorCode());

When the value is non-0 then there is an error. You need to identify the GL 
function call causing that error state. You could for example add a logging 
output line after each GL function call like this:

gl.glEnable(GL10.GL_FOG);
Log.d("Enable fog", gl.getErrorCode());
gl.glFogx(GL10.GL_FOG_MODE, GL10.GL_EXP);
Log.d("Set fog mode", gl.getErrorCode());
gl.glFogfv(GL10.GL_FOG_COLOR, fogColorsBuffer);
Log.d("Set fog color", gl.getErrorCode());

If you get a non-0 number you need to look up the meaning of that error 
code.

On Saturday, November 23, 2013 4:29:51 AM UTC-6, MobileVisuals wrote:
>
> It was possible to use fog color according to the OpenGL standard in the 
> previous Android versions, but it no longer works in Jellybean. The color 
> of the fog is no longer seen, all fog just becomes black. What can I do to 
> get the fog colors shown on Jellybean? This is my code:
>
> float[] fogColorsVfa;
> FloatBuffer fogColorsBuffer;
>
> fogColorsBuffer = FloatBuffer.allocate(4 * 4); 
> fogColorsVfa = new float[4];
> fogColorsVfa[0] = 0.5f;//yellow with some alpha
> fogColorsVfa[1] = 1f;
> fogColorsVfa[2] = 1f;
> fogColorsVfa[3] = 0f; 
> fogColorsBuffer.put(fogColorsVfa);
>
>
> gl.glEnable(GL10.GL_FOG);
> gl.glFogx(GL10.GL_FOG_MODE, GL10.GL_EXP);
> gl.glFogfv(GL10.GL_FOG_COLOR, fogColorsBuffer);
>
>
>

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


Re: [android-developers] Re: .db files being renamed to .back

2013-11-08 Thread Nobu Games
The SQLite documentation says that the 
maximum database file size is 2,147,483,646 pages
A single page can range from 512 to 65,536 bytes. So the minimum page size 
configuration would yield a maximum database file size of 1 TB. So 
something else is going wrong here.

Out of curiosity I checked the vanilla SQLite C source code for occurrences 
of ".back" and could not find anything. Just a vague guess: it looks to me 
like some odd kind of data corruption recovery handling. In older versions 
of Android the strategy was just deleting the corrupted database file and 
starting from scratch. It could be a vendor-specific customization or maybe 
a different firmware like CyanogenMod.

But I think it's more likely that your customers who report that problem 
are to blame. Probably by misusing some file manager or backup software as 
gjs already mentioned :-/

Could they recover their data by renaming these ".back" files to ".db"?


On Friday, November 8, 2013 4:23:57 PM UTC-6, Nathan wrote:
>
>
>
> On Friday, November 8, 2013 1:44:13 PM UTC-8, Steve Gabrilowitz wrote:
>>
>> Just a wild thought, the number of bytes in a 2GB database is also the 32 
>> bit maxint, could this be more than  a coincidence?
>>
> It could very well be, and it is the subject of a previous thread by me:
>
>
> https://groups.google.com/forum/#!searchin/android-developers/Nathan$20sqlitedatabase|sort:date/android-developers/Gg3W0UjaC4g/vInIUekydH8J
>
> However, there was no definite conclusion. I did tell the customer that 
> files bigger than 2GB "might" be a problem. 
>
> Others on the topic:
>
> https://groups.google.com/forum/#!searchin/android-developers/Nathan$20sqlitedatabase|sort:date/android-developers/gDREeuaWQtA/w7C54ZcjAPMJ
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: why does SharedPreferences framework allow you to insert a preference with a null key - given it can't reload the preferences afterwards?

2013-10-30 Thread Nobu Games
I quickly peeked into the source code and well, this is the way how it is 
programmed. When an exception occurs while the preferences data file gets 
read, SharedPreferences sets internally an empty map so you start from 
scratch. I even dug a bit deeper. The XML serializer just ignores NULL keys 
and creates XML output that cannot be properly read anymore through the map 
deserialization method which seems to expect an existing key value.

As for why it has been programmed like that... I think the reasoning may be 
that preferences are not deemed to be of so much importance that it should 
make the app crash in case of failure. This error state is silently 
discarded and you start over with the defaults. I think that's a reasonable 
approach since any app should be able to start over with empty preferences.

In this particular case you may have discovered a tiny bug you may want to 
report. But to be honest, using null keys is a pretty unusual thing to do.

On Wednesday, October 30, 2013 5:48:12 AM UTC-5, Palmer Eldritch wrote:
>
> The preferences are apparently *cleared *when one tries to load them when 
> there is a null key which is bad ! Reproducer :
>
> public class XmlExceptionTest extends AndroidTestCase {
> /** Run it twice - on the second run the exception is thrown */
> public void testXmlException() {
> Context ctx = getContext();
> SharedPreferences prefs = PreferenceManager
> .getDefaultSharedPreferences(ctx); // exception thrown 
> here (line 18)
> // and apparently it clears the prefs as the condition below 
> is false
> if (prefs.contains("run_once")) { // false
> Log.w("XmlExceptionTest",
> "contains null key :" + prefs.contains(null));
> }
> Editor e = prefs.edit();
> e.putBoolean("run_once", true).commit();
> e.putString(null, "I put a sting with null key").commit();
> assertTrue("Contains null", prefs.contains(null));
> PreferenceManager.getDefaultSharedPreferences(ctx); // 
> exception
> // NOT thrown here  - why ? - apparently there is a static 
> factory
> // returning the instance it already constructed
> // e.clear().commit(); // this eliminates the exception
> }
> }
> 
> exception :
>
> W/ApplicationContext(): getSharedPreferences
> W/ApplicationContext(): org.xmlpull.v1.XmlPullParserException: Map 
> value without name attribute: string
> W/ApplicationContext(): at 
> com.android.internal.util.XmlUtils.readThisMapXml(XmlUtils.java:521)
> W/ApplicationContext(): at 
> com.android.internal.util.XmlUtils.readThisValueXml(XmlUtils.java:733)
> W/ApplicationContext(): at 
> com.android.internal.util.XmlUtils.readValueXml(XmlUtils.java:667)
> W/ApplicationContext(): at 
> com.android.internal.util.XmlUtils.readMapXml(XmlUtils.java:470)
> W/ApplicationContext(): at 
> android.app.ContextImpl.getSharedPreferences(ContextImpl.java:361)
> W/ApplicationContext(): at 
> android.preference.PreferenceManager.getDefaultSharedPreferences(PreferenceManager.java:348)
> W/ApplicationContext(): at 
> gr.uoa.di.android.helpers.test.XmlExceptionTest.testXmlException(XmlExceptionTest.java:18)
> W/ApplicationContext(): at 
> java.lang.reflect.Method.invokeNative(Native Method)
> W/ApplicationContext(): at 
> java.lang.reflect.Method.invoke(Method.java:521)
> W/ApplicationContext(): at 
> junit.framework.TestCase.runTest(TestCase.java:154)
> W/ApplicationContext(): at 
> junit.framework.TestCase.runBare(TestCase.java:127)
> W/ApplicationContext(): at 
> junit.framework.TestResult$1.protect(TestResult.java:106)
> W/ApplicationContext(): at 
> junit.framework.TestResult.runProtected(TestResult.java:124)
> W/ApplicationContext(): at 
> junit.framework.TestResult.run(TestResult.java:109)
> W/ApplicationContext(): at 
> junit.framework.TestCase.run(TestCase.java:118)
> W/ApplicationContext(): at 
> android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
> W/ApplicationContext(): at 
> android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
> W/ApplicationContext(): at 
> android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)
> W/ApplicationContext(): at 
> android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)
>
> Posted in SO 
> hereand
>  in the relevant thread 
> here  - but still no answers
>
> 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.co

[android-developers] Re: "Not Licensed for this country" when paid app used in another country?

2013-10-24 Thread Nobu Games
Are you sure your Australian customer had the app still installed on his 
phone? Maybe he tried to reinstall it during his stay in the US and the 
error message was actually from Google Play. What 3rd party libraries are 
part of your app?

On Wednesday, October 23, 2013 6:52:02 PM UTC-5, Julian Bunn wrote:
>
> One of my paid app users, who bought the app in Australia, travelled to 
> the USA and tried to use the app there. When the app was started he 
> received the message "Not Licensed for this country", and was unable to 
> use it!
>
> Is this a known limitation? Any guesses as to what is going on here? 
> Needless to say, this is not something I have programmed in to the app (nor 
> would I have any idea how to do so even if I wanted to!).
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Signed APK corrupt on deploy. FC with Class Not Found exceptions

2013-10-18 Thread Nobu Games
If it just happens with the release version this may be a ProGuard 
misconfiguration issue. "Class not found" and "Method not found" exceptions 
are symptomatic for that. Check the exact exception message for the class 
name that couldn't be found. Make sure that your release build really 
contains that class (it may be part of a linked library or JAR file, make 
sure that it really gets included with your APK, there are various ways and 
tools for doing so like dex2jar). If it is in fact an obfuscation problem 
you need to add ProGuard rules for protecting this class (and probably 
others, too) from being obfuscated.

On Friday, October 18, 2013 11:21:04 AM UTC-5, Brill Pappin wrote:
>
> I just got killed by a corrupt APK when I deployed to production.
> It took me three versions to get the APK build to build one that was not 
> corrupt (I had to completely remove the project from the disk and recheck 
> it out and rebuild it).
>
> What made matters worse is that it now takes Google hours to deploy, so 
> even when I discovered a corrupt build people would be downloading the bad 
> version for hours while the new version made it way through the system.
> In this case, it made really pissed off consumers because it was a 
> keyboard that suddenly stopped working and they couldn't even switch to the 
> default keyboard without getting an FC.
>
> The crazy thing was that I didn't change the code at all between the three 
> deployments (except to verify that the error was bogus), so I know it was a 
> corrupt APK. 
>
> Has anyone else experienced this kind of issue, and am I going to be 
> dealing with it regularly now?
>
>

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


[android-developers] Re: NDK: faster alternative to JNI based custom rendering

2013-10-14 Thread Nobu Games
As you already pointed out, floats can be a bottleneck. In many cases it is 
possible to rewrite graphics algorithms in a way to make exclusive use of 
integers. You need to get rid of the fractional part and that can be done 
by scaling up all values depending on your needs for the precision. When 
all calculations are done you need to scale the numbers down again. 
Multiplications and especially divisions can be expensive, too of course. 
When your scale factor is a power of 2 you can use bit-shifting instead of 
multiplication and division which is computationally as cheap as it can get.

I wrote a small image processing and drawing library a while ago and wrote 
all algorithms to make use of integers. In case of convolution matrices it 
was possible to speed up the calculations up to 3 times compared to their 
floating point counterparts.

Another speed optimization trick is precomputing a table of reoccurring or 
known terms and values. This can be done with gradients for example. What I 
didn't dabble with yet is ARM's NEON extension. I read all over the place 
that (if used correctly) it can give you another significant speed boost. 
GCC provides some 
intrinsicsfor the 
extension. And as far as I know you can also tell GCC to 
automatically optimize for NEON. Since not all ARM CPUs are equipped with 
that extension this may be dangerous, though, unless you  create a version 
for NEON and a standard version and determine on runtime which one to load 
and use.

Android's 
RenderScriptmight
 be a pretty fast solution, too, but I'm not sure if you'll be able to 
easily convert your drawing algorithms to make it work with it. It's 
basically pretty good at crunching numbers and quickly running convolution 
matrices for image processing by using the GPU and theoretically all 
available CPU cores.


On Monday, October 14, 2013 7:28:29 AM UTC-5, Rick wrote:
>
> Hello all,
>
> I'm porting C/C++ based graphics project to Android where I need to 
> transform dynamic graphical tree hierarchy(describing the screen content) 
> from the C side to Android Java acitivity.
> So far I tried following techinque:
> 1. call AndroidBitmap_lockPixels() in C
> 2. recurse thru the tree hierarchy and render every node to the locked 
> bitmap in C
> 3. call AndroidBitmap_unlockPixels()
> 4. call canvas.drawBitmap() in the onDraw() of my Java activity View
>
> This approach works relatively well but the main performance 
> bottleneck(except the relativley frequent JNI calls) is the performance of 
> the C rendering part which uses lot of floating point operations (using 
> doubles) and therefore is not optimized for the ARM cpus.
>
> Since the C rendering code does most of the graphics operations that are 
> already built in the Canvas(Skia) frontend on the Java side I'm now 
> thinking that maybe it could be possible to just somehow "serialize" the C 
> graphical operations transfer them to Java side where they will be 
> interpreted using the Canvas calls.
> Also note the graphical structure at the C side can be changed during 
> every render frame so I need to this quite frequently...
>
> Is there any Android expert who have experience with simmilar problems? 
> Does it make sense to try the alternative approach I decribed above? If so 
> what is the fastest way to transfer/share such C data with Java? Or are 
> there any other possible solutions?
>
> Thanks in advance for any useful hints,
>
> Rick
>
>

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


[android-developers] Re: Activity partially offscreen

2013-10-11 Thread Nobu Games
Hm... you could get the top level container view from the Window component 
and transform that view. The transformation probably needs to be done with 
a translation animation. However, you'll also need to catch and change 
touch events since their coordinates will be off.

On Thursday, October 10, 2013 7:52:06 PM UTC-5, bob wrote:
>
> Is there a way to push an activity to the right or left so that half of it 
> is off the screen?
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: How to display in HH:MM:SS

2013-10-10 Thread Nobu Games
Take a look at the 
DateUtilsclass.
 It provides various "elapsed time" and time range methods

On Thursday, October 10, 2013 12:21:02 PM UTC-5, abhay_401 wrote:
>
> Hi,
>
> I am having two dates with times for example:
>
> String dateStart = "01/14/2012 09:30:55";
>  String dateStop = "01/15/2012 18:25:54";
>
> SimpleDateFormat format = new SimpleDateFormat("MM/dd/ HH:mm:ss");
>   
> Date d1 = null;
> Date d2 = null;
>  
>  d1 = format.parse(dateStart);
>  d2 = format.parse(dateStop);
>
> When I subtract:  d2 - d1, I want to show the ela[sed time in between the 
> above two dates in the format in *HH:MM:SS*: like i want the output 
> something like: 
> *33:05:01. How can I get in that format..? If anybody is having any idea 
> please help me out... *
>
>
>
>
>

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


[android-developers] Re: Finding Legal Fonts - best practices.

2013-10-10 Thread Nobu Games
Google Fonts  is a great library of Open 
Source Fonts.

On Thursday, October 10, 2013 1:13:46 PM UTC-5, Nathan wrote:
>
> I admit, I am a bit stumped about fonts. It seems to be a legal minefield. 
>
> In this case, it is not a TextView, it is a game engine that can render 
> TTF or bitmap fonts. 
>
> I am not going to naively assume that any fonts I can find on my Windows 
> or Mac are legal to redistribute. 
>
> It appears that Fonts.com would require a brokered negotiation with the 
> designer of the font and, likely, more money than I expect the app to make 
> in a year. 
>
> It seems like the only safe route would be to use a royalty free 
> commercial use font from here. 
> http://www.fontsquirrel.com/
> Assuming that someone didn't pirate a font and put it on there. 
>
> Or using Roboto, and risk that it might offend discriminating iOS users in 
> the iOS version. Or would they even care?
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Upgrading Apk

2013-10-09 Thread Nobu Games
There is no fix and no workaround. Even if Google Play would allow you to 
upload your APK signed with a different key, Android devices would refuse 
to install your update because of that mismatch. If you are really sure 
that you cannot find your old keystore then you have to publish your update 
as a new app with a different package name.

On Wednesday, October 9, 2013 4:30:39 AM UTC-5, rahul kaushik wrote:
>
> Hello ,
>  i have lost my old keystore signing file for the older version of 
> apk,when i try to upload new apk with new keystore signing file i get the 
> below error:
>
> You uploaded an APK that is signed with a different certificate to your 
> previous APKs. You must use the same certificate. Your existing APKs are 
> signed with the certificate(s) with fingerprint(s):
>
> [ SHA1: BD:C5:13:57:EF:75:00:DE:AC:E7:19:21:FE:64:2B:B9:93:CF:90:2A ]
>
> and the certificate(s) used to sign the APK you uploaded have 
> fingerprint(s):
>
> [ SHA1: A4:6D:AC:EE:47:DA:1F:8A:20:E9:64:64:21:40:85:3F:56:03:BA:12 ] 
>
> Please suggest
>
> Thanks
> RK
>
>

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


[android-developers] Re: Show Glyph outside Unicode Range ? label:Android

2013-10-09 Thread Nobu Games
I don't think that Android's typeface component or TextView allows 
switching to different variants. If your font does not have a mapping from 
that glyph to a Unicode code point then you probably won't be able to 
render it.

If you have a font editing application you could extract that glyph and 
assign it to an ordinary "1" :-/



On Wednesday, October 9, 2013 7:32:17 AM UTC-5, Ingo Klein wrote:
>
> Hi guys,
> i would like to show a Glyph (GlyphID 932) of a Font that i use in my app.
> The Glyph isn't specified in the Unicode therefor is doesn't have and 
> UnicodeID.
> Its a special redrawn "1" inside this Font.
> Under Photoshop you can acces it via "OpenType-> Format variants" (or sort 
> of, i use the German Version) 
> and it will display the correct Character.
> I also tried to copy it directly in the Source but only got a squared 
> Questionmark.
>
> Any ideas ?
>
> Code below :
>
> Typeface tf = Typeface.createFromAsset(this.getActivity().getAssets(), 
> "fonts/thesansextra.otf");
> TextView tv = (TextView) view.findViewById(R.id.txt_sub);
> tv.setText("1");
> tv.getPaint().setAntiAlias(true);
> tv.setTypeface(tf);
>
>
>
>
>

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


[android-developers] Re: Random IllegalStateException on some phone

2013-10-03 Thread Nobu Games
That crash message says that there is further information in some 
additional log output. What does it say?

On Thursday, October 3, 2013 5:21:44 AM UTC-5, Davide Moriello wrote:
>
> Hi, some testers are reporting me this error on some smartphone and I 
> really don't know what it is and how to fix it. Someone has an idea?
>
> Thank you
>  
>
> java.lang.IllegalStateException: A fatal developer error has occurred. 
> Check the logs for further information.
> at com.google.android.gms.internal.p$f.a(Unknown Source)
> at com.google.android.gms.internal.p$f.a(Unknown Source)
> at com.google.android.gms.internal.p$b.p(Unknown Source)
> at com.google.android.gms.internal.p$a.handleMessage(Unknown Source)
> at android.os.Handler.dispatchMessage(Handler.java:99)
> at android.os.Looper.loop(Looper.java:130)
> at android.app.ActivityThread.main(ActivityThread.java:3687)
> at java.lang.reflect.Method.invokeNative(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:507)
> at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
> at dalvik.system.NativeStart.main(Native Method)
>
>

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


[android-developers] Re:  getRotationMatrixFromVector() broken on Note 3

2013-10-02 Thread Nobu Games
As a temporary fix you could just copy-paste the original source code from 
the Android SDK as a drop-in replacement:

public static void getRotationMatrixFromVector(float[] R, float[] 
> rotationVector) {
>
> float q0;
> float q1 = rotationVector[0];
> float q2 = rotationVector[1];
> float q3 = rotationVector[2];
>
> if (rotationVector.length == 4) {
> q0 = rotationVector[3];
> } else {
> q0 = 1 - q1*q1 - q2*q2 - q3*q3;
> q0 = (q0 > 0) ? (float)Math.sqrt(q0) : 0;
> }
>
> float sq_q1 = 2 * q1 * q1;
> float sq_q2 = 2 * q2 * q2;
> float sq_q3 = 2 * q3 * q3;
> float q1_q2 = 2 * q1 * q2;
> float q3_q0 = 2 * q3 * q0;
> float q1_q3 = 2 * q1 * q3;
> float q2_q0 = 2 * q2 * q0;
> float q2_q3 = 2 * q2 * q3;
> float q1_q0 = 2 * q1 * q0;
>
> if(R.length == 9) {
> R[0] = 1 - sq_q2 - sq_q3;
> R[1] = q1_q2 - q3_q0;
> R[2] = q1_q3 + q2_q0;
>
> R[3] = q1_q2 + q3_q0;
> R[4] = 1 - sq_q1 - sq_q3;
> R[5] = q2_q3 - q1_q0;
>
> R[6] = q1_q3 - q2_q0;
> R[7] = q2_q3 + q1_q0;
> R[8] = 1 - sq_q1 - sq_q2;
> } else if (R.length == 16) {
> R[0] = 1 - sq_q2 - sq_q3;
> R[1] = q1_q2 - q3_q0;
> R[2] = q1_q3 + q2_q0;
> R[3] = 0.0f;
>
> R[4] = q1_q2 + q3_q0;
> R[5] = 1 - sq_q1 - sq_q3;
> R[6] = q2_q3 - q1_q0;
> R[7] = 0.0f;
>
> R[8] = q1_q3 - q2_q0;
> R[9] = q2_q3 + q1_q0;
> R[10] = 1 - sq_q1 - sq_q2;
> R[11] = 0.0f;
>
> R[12] = R[13] = R[14] = 0.0f;
> R[15] = 1.0f;
> }
> }
>

Interestingly enough the original code does not explicitly throw the 
exception you mentioned. So it must be some weird Samsung hack. You could 
try registering with Samsung as a developer and use their support ticket 
system in order to tell them about this problem. However, I already 
complained once about one of their SDKs and never heard back from them.

On Wednesday, October 2, 2013 8:41:01 AM UTC-5, String wrote:
>
> I've been getting error reports from users of the Note 3 that boil down to 
> the following:
>
>
>  *java.lang.IllegalArgumentException: R array length must be 3 or 4*
>
> *at 
> android.hardware.SensorManager.getRotationMatrixFromVector(SensorManager.java:1336)
> *
>
>
>  This function, *getRotationMatrixFromVector()*, is documented as a 
> "Helper function to convert a rotation vector to a rotation matrix. Given a 
> rotation vector (presumably from a ROTATION_VECTOR sensor)". My typical 
> call to this function looks like this:
>
>
>  *SensorManager.getRotationMatrixFromVector(R, rotationVector);*
>
>
>  Where the *rotationVector *comes from the hardware accelerometer and 
> gyroscope, and (despite the error message about *R*) it's with this 
> parameter where the problem lies. It's directly passed from 
> *android.hardware.SensorEventListener.onSensorChanged(SensorEvent 
> event)* for a *Sensor.TYPE_ROTATION_VECTOR* event. The *event *parameter 
> there has a *values *property that is passed as the *rotationVector *in 
> the previous call. And according to the docs at
>
> http://developer.android.com/reference/android/hardware/SensorEvent.html#values,
>  
> this array can legitimately have up to 5 elements - moreover, in Android 
> 4.3, it *should *have all 5. However, passing an array of length 5 causes 
> the Note 3 to crash on the aforementioned *IllegalArgumentException*; it 
> seems to expect 4 elements at most.
>
>
>  So, here's the summary: Android 4.3 passes an array with 5 elements to 
> this hardware event, and the Note 3 throws an exception when passed that 
> same array to the system-defined helper function for that event. This 
> behavior does not happen on the other 4.3 devices I have at hand (Galaxy 
> Nexus and Nexus 7); it appears to be a basic flaw in the Samsung 
> implementation of 4.3.
>
>
>  And I know, this all looks like minutiae of a hyper-specific issue - but 
> believe me, it's likely to be encountered by any app using the device's 
> motion sensors. A Google search for *getRotationMatrixFromVector *returns 
> 51,400 results.
>
> Any comment from Samsung on this would be most welcome, if unlikely.
>
>
> 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 unsubscribe from this group and stop receiving emails from it, send an em

[android-developers] Re: Xml file corrupted over sprint cellular network ?

2013-09-26 Thread Nobu Games
Could you post an example of such a corrupted version of your XML files? 
Maybe as a hex dump?

On Thursday, September 26, 2013 4:01:31 AM UTC-5, Gaurav Sharma wrote:
>
> I am having a very strange issue in my android app. I receive xml file 
> from server and perform operation based on xml content.
>
> It is working on almost every network for eg. AT&T, Verizon in USA, 
> airtel, vodaphone and others in india.But it not working on sprint network 
> USA.
>
> When i tried to find xml content i am getting some byte code or unicode 
> not the plain xml file. I looked for more information i found other also 
> has faced this issue on sprint evdeo. people says turn off byte mobile 
> optimization here 
>
> I am not able to turn off mobile byte optimization. If i switch to wifi 
> network it receive file properly. Issue occur on sprint cellular network 
> only.
>
> Any help or any pointer will be very much appreciated. Thanks in advance
>

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


[android-developers] Re: Lower level documentation on how Google's backend starter works w/ Android devices

2013-09-21 Thread Nobu Games
I'm not sure if I understand you correctly, but the following homepage 
contains documentation about the Google+ API including their HTTP-based API 
which allows you to roll your own client implementation in any language you 
want:

https://developers.google.com/+/api

On Friday, September 20, 2013 10:15:19 AM UTC-5, Ken wrote:
>
> Does anyone know of a document that describes how Google+ login and 
> endpoints and GCM at the network level (what data gets sent back and forth)?
> I'm trying to write a replacement backend w/o staring at Wireshark traces 
> :-)
>
>

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


[android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Nobu Games
I just did some digging around and your error code translates into the 
following define constant: 
*SQLITE_IOERR_FSTAT*

So basically it's an fstat error which according to this 
threadcan
 happen when you try to access the database after it (or one of the 
journal files) have been deleted. 
Othersalso mention that 
this error has to do with changing data while another 
thread is trying to read it simultaneously. I guess the "write-ahead" 
journaling of SQLite does not mix well with thread concurrency. In my 
experience you should try to synchronize all concurrent read and write 
access to your SQLite database yourself and not rely on the built-in 
locking facilities (they never worked for me correctly).


On Wednesday, September 18, 2013 7:22:34 PM UTC-5, Nathan wrote:
>
> I am investigating the cause of some handled exceptions: 
> SQLiteDiskIOException disk I/O error (code 1802) 
>
> I ran across this thread which implies that, due to a bug in Android's 
> version of SQLite, I should be limiting SQlite Databases to 2GB. 
>
>
> https://groups.google.com/forum/#!searchin/android-developers/Sqlitediskioexception/android-developers/eYNJrIgabxU/e7sKm9QCfN4J
>
> I am already restricting users to 4GB because I believe most SD Cards 
> limit a single file to that size. 
> Of course some power users are going to bug me about allowing them more 
> for extFat. I have resisted because: 
> A. I don't know how to automatically detect that. 
> B. Users aren't sophisticated enough to know how their 
>
> But now, it looks like I will have to limit them to 2 GB. Is that true?
>
> And, in fact, it does appear that some users have seen data disappear and 
> reappear, and it could be tied to handled SQLiteDiskIOExceptions, and that 
> could be tied to this bug. 
>
> And does it differ by Android version?
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: java.lang.StringIndexOutOfBoundsException while playing video in videoView : Android v 4.2.1

2013-09-18 Thread Nobu Games
I could not find any reference to String.substring in the original Android 
source code of VideoView. It looks like a broken device-specific 
customization to me.

On Wednesday, September 18, 2013 4:34:02 AM UTC-5, Matt wrote:
>
> I am getting this crash when I play video on videoView in Android version 
> 4.2.1. I found this out specifically on Micromax Canvas A210 device. It is 
> not showing any message where the error is occurring. Is this a bug or 
> something wrong in application? The crash log is as below:
>
> 09-18 11:05:53.245: E/AndroidRuntime(2323): FATAL EXCEPTION: main
> 09-18 11:05:53.245: E/AndroidRuntime(2323): 
> java.lang.StringIndexOutOfBoundsException: length=11; regionStart=0; 
> regionLength=-1
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> java.lang.String.startEndAndLength(String.java:583)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> java.lang.String.substring(String.java:1464)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.widget.VideoView.openVideo(VideoView.java:407)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.widget.VideoView$6.surfaceCreated(VideoView.java:730)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.SurfaceView.updateWindow(SurfaceView.java:606)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.SurfaceView.access$000(SurfaceView.java:88)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.SurfaceView$3.onPreDraw(SurfaceView.java:183)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:692)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2123)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1139)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4879)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.Choreographer$CallbackRecord.run(Choreographer.java:776)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.Choreographer.doCallbacks(Choreographer.java:579)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.Choreographer.doFrame(Choreographer.java:548)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:762)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.os.Handler.handleCallback(Handler.java:725)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.os.Handler.dispatchMessage(Handler.java:92)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.os.Looper.loop(Looper.java:153)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> android.app.ActivityThread.main(ActivityThread.java:5297)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> java.lang.reflect.Method.invokeNative(Native Method)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> java.lang.reflect.Method.invoke(Method.java:511)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
> 09-18 11:05:53.245: E/AndroidRuntime(2323): at 
> dalvik.system.NativeStart.main(Native Method)
>
> Other versions and devices that I have tested my app on and is working 
> fine are:
> Android versions: 4.1.2, 4.2.2, 4.3, 2.3.3, 4.0.3, 4.0.4
> Devices: Samsung Galaxy s2, Samsung Galaxy Tab 2 (7" and 10"), Samsung 
> Galaxy s plus, Sony
>

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


[android-developers] Re: AudioTrack

2013-09-11 Thread Nobu Games
>From the documentation of 
>AudioTrack
:

It allows streaming *PCM audio buffers* to the audio hardware for playback.
>

PCM is basically uncompressed audio data. MP3 is compressed audio that's 
why you hear noise. You have two options for solving that problem:

1. Decode your MP3 stream on the fly and feed it to your AudioTrack
2. Use 
MediaPlayerinstead
 of AudioTrack

On Wednesday, September 11, 2013 12:35:09 AM UTC-5, Yamusani Vinay wrote:
>
> How to play mp3 song using audio track in android.I used following code 
> but i am getting noise...
>
> InputStream in = getResources().openRawResource(R.raw.ding);
> try {
> ByteArrayOutputStream out = new 
> ByteArrayOutputStream(
> in.available()
> );
> for (int b; (b = in.read()) != -1;) {
> out.write(b);
> }
> Log.d(TAG, "Got the data");
> audioData = out.toByteArray();
>
> this.releaseAudioTrack();
> this.audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, 44100,
> AudioFormat.CHANNEL_OUT_STEREO, 
> AudioFormat.ENCODING_PCM_8BIT,
> audioData.length, AudioTrack.MODE_STATIC);
> Log.d(TAG, "Writing audio data...");
> this.audioTrack.write(audioData, 0, audioData.length);
> Log.d(TAG, "Starting playback");
> audioTrack.play();
>

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


[android-developers] Re: can we get the time for which android device remain shut down?

2013-09-07 Thread Nobu Games
This Stackoverflow 
questiongives
 you a solution.

On Friday, September 6, 2013 3:39:03 PM UTC-5, ashish wrote:
>
> Hi,
>
> can get the time for which android device remain shutdown?
>

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


[android-developers] Re: SQLiteException: error code 5: database is locked. When accessing ContentProvider from AsyncTask

2013-09-07 Thread Nobu Games
This error can happen when you try to open the same database (file) 
multiple times. Which in turn can happen when you are using multiple 
instances of SQLiteOpenHelper. So where do you create the instance of 
"database"?

On Saturday, September 7, 2013 8:52:44 AM UTC-5, Eurig Jones wrote:
>
> Quite frequently I get the following exception and I'm really entirely 
> sure what to do about it.
>
> java.lang.RuntimeException: An error occured while executing 
> doInBackground()
> at android.os.AsyncTask$3.done(AsyncTask.java:200)
> at 
> java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
> at 
> java.util.concurrent.FutureTask.setException(FutureTask.java:125)
> at 
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
> at java.lang.Thread.run(Thread.java:1019)
> Caused by: android.database.sqlite.SQLiteException: error code 5: 
> database is locked
> at android.database.sqlite.SQLiteStatement.native_execute(Native 
> Method)
> at 
> android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61)
> at 
> android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:1704)
> at 
> azurewing.android.db.provider.NotificationProvider.delete(NotificationProvider.java:80)
> at azurewing.android.db.provider.Provider.delete(Provider.java:87)
> at 
> azurewing.android.db.provider.NotificationProvider.delete(NotificationProvider.java:1)
> at 
> android.content.ContentProvider$Transport.delete(ContentProvider.java:234)
> at android.content.ContentResolver.delete(ContentResolver.java:692)
> at 
> azurewing.android.db.table.NotificationTable.removeAllNotifications(NotificationTable.java:89)
> at 
> azurewing.android.sync.SyncReceiver$1$1.doInBackground(SyncReceiver.java:52)
> at 
> azurewing.android.sync.SyncReceiver$1$1.doInBackground(SyncReceiver.java:1)
> at android.os.AsyncTask$2.call(AsyncTask.java:185)
> at 
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
> ... 4 more
>
> I am accessing a ContentProvider (NotificationProvider here) via an 
> AsyncTask. The ContentProvider uses a database of course.
>
> @Override
> public int delete(Uri uri, String selection, String[] selectionArgs)
> {
> SQLiteDatabase  db = database.getWritableDatabase();
> int numDeleted = database.delete(NotificationTable.TABLE_NAME, 
> selection, selectionArgs);
> return numDeleted;
> }
>
> I'm a bit stumped about what to do here. It's clearly a threading issue I 
> think, so I'm thinking of everytime I get the database, I do it from a 
> synchronized method in 1 class. Is this a good idea?
>

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


[android-developers] Re: android can we get current time ?

2013-09-05 Thread Nobu Games
Android provides the 
SystemClockcomponent
 that gives you the elapsed milliseconds since boot. I guess 
that's pretty much what you want.


On Thursday, September 5, 2013 3:57:34 AM UTC-5, ashish wrote:
>
> Hi,
>
> i want to perform some time based operation in android device?
> but user can change the device time manually as the result current time 
> varies..is there any way so that i can track the current time?
>

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


[android-developers] Re: Apache License 2

2013-09-01 Thread Nobu Games
Legalese is sometimes even for native speakers hard to understand. Here is 
what the Apache Software Foundation has to say about the meaning of the 
license in layman's terms: 
http://www.apache.org/foundation/license-faq.html#WhatDoesItMEAN


On Tuesday, August 27, 2013 12:19:49 PM UTC-5, Shubham Aggarwal wrote:
>
> Hi, 
> I am creating an application which uses an example source code provided in 
> Google Android Documentation licensed under apache license 2.0
> Is it legal to directly copy one or more of the files from that source 
> code in my application (to be published on market)
>
> Thanks
> Shubham
>

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


[android-developers] Re: Detect a gesture startet from the outside of a view

2013-08-24 Thread Nobu Games
You could still try the approach I described by getting rawX and rawY from 
the motion event and match it with the global rect position of the target 
view. Motion event coordinates are usually in a local coordinate system. I 
guess the local coordinate system is the one of the ImageView you start 
your gesture with, hence the too big numbers when you get your 
ACTION_CANCEL on the other view.

On Saturday, August 24, 2013 5:19:04 AM UTC-5, OronS wrote:
>
> Little search showed that ACTION_CANCEL is the right value to get from the 
> system, but the (X,Y) values on this event are not proportional to the 
> gesture I made :S
> Y values are way bigger than expected
> I did expand the HitRect size, but it's still too big
>
> On Friday, August 23, 2013 10:24:03 PM UTC+3, OronS wrote:
>>
>> Hi :)
>> Thanks for your post
>>
>> I'm trying to implement specific gesture between images...no drag & drop
>> The images are inside *GestureOverlayView (because of prediction = 
>> gestureLibrary.recognize()...I don't know how to recognize a gestures which 
>> have curls or shapes)*, and I thought the parent intercepts touch event 
>> automatically (by automatically I mean set the OnTouch listener to the 
>> parent).
>> Don't you think inheritance is wrongly used in this case??
>>
>> Anyway..I used *gestureOverlayView.setOnTouchListener* to intercept 
>> touch events on children, and *
>> gestureOverlayView.addOnGesturePerformedListener* to check whether the 
>> gesture was recognized, and user's finger passed through both images.
>>
>> The problem now is that in *gestureOverlayView.setOnTouchListener,*instead 
>> of ACTION_UP, I get ACTION_CANCEL :S
>>
>> I don't know if it should be like that
>>
>> On Friday, August 23, 2013 6:17:23 PM UTC+3, Nobu Games wrote:
>>>
>>> Is it just gestures or are you trying to implement drag and 
>>> drop<http://developer.android.com/guide/topics/ui/drag-drop.html>(because 
>>> it sounds like that). Either way you could just intercept motion 
>>> events in the parent view group that contains your images and let it handle 
>>> your gesture recognition.
>>>
>>> So let's say you create a derivative class "L" of your layout that 
>>> contains the image views.
>>>
>>> You could override 
>>> dispatchTouchEvent(MotionEvent)<http://developer.android.com/reference/android/view/ViewGroup.html#dispatchTouchEvent%28android.view.MotionEvent%29>of
>>>  L and check for the following motion event states:
>>>
>>> *1. Gesture started (ACTION_DOWN)*
>>> Iterate your list of ImageView children of L and see if the touch event 
>>> point is in one of them. If yes, your gesture starts.
>>>
>>> The View class has the method getGlobalVisibleRect(Rect, 
>>> Point)<http://developer.android.com/reference/android/view/View.html#getGlobalVisibleRect(android.graphics.Rect,%20android.graphics.Point)>which
>>>  can be used for checking if your touch event coordinate hits one of 
>>> your image views. It would roughly look like the following (not tested 
>>> since I'm not sure if these methods return locations in screen or window 
>>> coordinate system, you may need to debug it):
>>>
>>> *Rect* r = new *Rect*();* *// should be class member you can reuse
>>>> float x = motionEvent.getRawX();
>>>> float y = motionEvent.getRawY();
>>>>
>>>> *for*(*ImageView* iv : imageViews) {
>>>> iv.getGlobalVisibleRect(r);
>>>>
>>>> *if*(r.contains(x, y)) {
>>>> // Touch event is inside image view
>>>> }
>>>> }
>>>>
>>>
>>> *2. Gesture ongoing (ACTION_MOVE)*
>>> If you visualize your gesture by drawing some trail or moving around the 
>>> first touched image view then this is the right point to do so. Here you 
>>> can update your view(s).
>>>
>>> *3. Gesture finished (ACTION_UP)*
>>> Here you need to iterate your ImageView children again in order to see 
>>> if the finger has been lifted over another image view. In that case your 
>>> gesture was successful.
>>>
>>> *4. Gesture canceled (ACTION_CANCEL)*
>>> Whatever your gesture is doing should be canceled here.
>>>
>>>
>>> On Friday, August 23, 2013 1:21:59 AM UTC-5, OronS wrote:
>>>>
>>>> Hi there [image: :)]
>>>>
>>>> I have two ImageViews in my app.
>>>> I've added a 

[android-developers] Re: SurfaceHolder.setFormat() only working when called from the *wrong* thread?

2013-08-23 Thread Nobu Games
I'm not sure if I understand you correctly when exactly you set the format. 
It sounds too me as if you're setting it "too late", after the OpenGL ES 
context has been created.

What I do is setting the format in the Activity's onCreate method on the UI 
thread before the OpenGL context is initialized and before a renderer has 
been set. Maybe your setFormat call is postponed in a way so you lose the 
OpenGL context and it forces a re-creation? I guess it just works for you 
on different devices because your call to setFormat does not actually 
change the format, so nothing happens. Your older 2.2 Android device may 
have a different default format for the surface view (such as RGB565) 
compared to newer devices.


On Friday, August 23, 2013 1:11:57 PM UTC-5, latimerius wrote:
>
> In a testing program I'm playing with currently, I want to use setFormat() 
> to adapt the pixel format of my surface to the chosen EGL config before I 
> pass the surface holder to eglCreateWindowSurface().
>
> Now, I call EGL from my render thread and I know SurfaceHolder.setFormat() 
> is documented to have to be "called from the same thread running the 
> SurfaceView's window", which I take to be the main thread.  To comply, I 
> wrap my setFormat() call in a Runnable which I pass to runOnUiThread() and 
> wait() until it's actually executed.
>
> This works perfectly on some devices, however it gives me intermittent 
> failures on Optimus One (with Android 2.2)  - on program start-up, three 
> times out of four the screen is just black.  Even if start-up goes right, 
> the first configuration change makes the screen go black.  The program 
> still runs and no GL or EGL calls signal any errors.
>
> Here's the weirdest part - if I omit the runOnUiThread() stuff and simply 
> call setFormat() from my render thread, it fixes the problem and the 
> program runs 100% solid on Optimus no matter much beating I give it - 
> randomly pressing Home and Back while rotating the device wildly, putting 
> it to sleep and waking it back up, the renderer always handles the native 
> window changes correctly and renders just fine.
>
> I'm at a loss, does anyone have an explanation?
>
>

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


[android-developers] Re: Detect a gesture startet from the outside of a view

2013-08-23 Thread Nobu Games
Is it just gestures or are you trying to implement drag and 
drop(because it 
sounds like that). Either way you could just intercept motion 
events in the parent view group that contains your images and let it handle 
your gesture recognition.

So let's say you create a derivative class "L" of your layout that contains 
the image views.

You could override 
dispatchTouchEvent(MotionEvent)of
 L and check for the following motion event states:

*1. Gesture started (ACTION_DOWN)*
Iterate your list of ImageView children of L and see if the touch event 
point is in one of them. If yes, your gesture starts.

The View class has the method getGlobalVisibleRect(Rect, 
Point)which
 can be used for checking if your touch event coordinate hits one of 
your image views. It would roughly look like the following (not tested 
since I'm not sure if these methods return locations in screen or window 
coordinate system, you may need to debug it):

*Rect* r = new *Rect*();* *// should be class member you can reuse
> float x = motionEvent.getRawX();
> float y = motionEvent.getRawY();
>
> *for*(*ImageView* iv : imageViews) {
> iv.getGlobalVisibleRect(r);
>
> *if*(r.contains(x, y)) {
> // Touch event is inside image view
> }
> }
>

*2. Gesture ongoing (ACTION_MOVE)*
If you visualize your gesture by drawing some trail or moving around the 
first touched image view then this is the right point to do so. Here you 
can update your view(s).

*3. Gesture finished (ACTION_UP)*
Here you need to iterate your ImageView children again in order to see if 
the finger has been lifted over another image view. In that case your 
gesture was successful.

*4. Gesture canceled (ACTION_CANCEL)*
Whatever your gesture is doing should be canceled here.


On Friday, August 23, 2013 1:21:59 AM UTC-5, OronS wrote:
>
> Hi there [image: :)]
>
> I have two ImageViews in my app.
> I've added a gesture detector (GestureOverlayView), and added gestures to 
> the app by using android's sample, which record gestures and save them to a 
> file, and I then load this file.
>
> My Goal is to limit the gestures area.. I want them to start from one 
> ImageView, and end on the other.
> I didn't find anything on google!! : /
>
> I've added OnTouch listener to both images, but I don't know how to detect 
> a gesture coming from the outside of a View.
>
> I can detect a gesture starts from one Image ("Down" event), but when my 
> finger goes over the second and then go up, the event triggered is "Cancel" 
> on the first image
>
> Please Help
>
> Thanks,
> Oron 
>

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


[android-developers] Re: Designing Help into Your App

2013-08-22 Thread Nobu Games
Personally I always go for option 2, a full screen webview in an extra 
activity for displaying help for the current page. I store localized HTML 
files in the assets directory. It's just a matter of adding some language 
code to the file names and loading the correct page for the current locale 
while falling back to English. It works so far for me.

I also agree with what TreKing: it's not a top priority for most 
developers. But in my humble opinion they probably shouldn't write the end 
user documentation of their own apps in the first place. First of all 
because of some kind of blindness when it comes to possible real help 
questions. They know their babies inside out. Second of all documentation 
written by programmers tends to sound way too technical. I guess it's 
better to let somebody who isn't that technical but good at writing do that 
job. And that person should try to figure out the app with a fresh pair of 
eyes.

Ultimately I don't think that users really care that much about detailed 
context-sensitive help texts because of "*tl;dr". *Most users require the 
app to be self-explaining. At best there should be some easy to understand 
tutorial overlays that explain UI elements with arrows and short texts.

In an early version of my latest game I tried to "force" the player through 
a 4 minutes tutorial that explains with an animated character every aspect 
of the game. I was thinking that ought to be alright and digestible for a 
one-time experience. But my beta testers felt bored and complained about 
that. So I went with that overlay mini-tutorial approach. No more 
complaints.

On Wednesday, August 21, 2013 6:09:14 PM UTC-5, Nathan wrote:
>
> I've been thinking about ways to integrate help into an app. 
>
> I wanted to see what other people have done. 
>
> http://developer.android.com/design/patterns/help.html
>
> Context sensitive, at a minimum, per screen, and possibly point to certain 
> buttons using a PopupWindow to point out something like "This button will . 
> . . ".
>
> What have you done and how well has it worked? I could imagine there are 
> some frameworks or open source project already. 
>
> I've thought about using the following technologies.
>
>- A bunch of formatted strings with basic tags in string tags. 
>- A webview in a non full screen activity, displaying one or many 
>simply html files from the res folder (this can't be in assets - in needs 
>to be localized).  
>- A popupwindow, using showasDropDown, to anchor it to another view or 
>button that I want the help to be related to. 
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Black screen on Samsung Galaxy S4 mini

2013-08-21 Thread Nobu Games
Is it an OpenGL ES live wallpaper? Does your code check OpenGL for error 
codes?
 
As far as I know these errors do not get logged by default. It may be just 
about anything like OpenGL running out of memory while trying to upload a 
texture or something like that.

On Wednesday, August 21, 2013 1:43:32 PM UTC-5, MobileVisuals wrote:
>
> One of my live wallpaper shows  a black screen on Samsung Galaxy S4 mini. 
> It works on other devices and I try to debug S4 mini.There are no error 
> messages, which I can use as a clue. Does anyone have an idea what can 
> cause this?
>

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


[android-developers] Re: Add a contact via ContentProvider programmatically

2013-08-20 Thread Nobu Games
I'm not completely sure but I think you need to create separate inserts for 
the name and the phone number. So make a separate insert for the phone 
number and don't forget to set the correct mime type for that.


On Tuesday, August 20, 2013 9:01:48 AM UTC-5, Greenhand wrote:
>
> I have tried to add a contact ContentProvider programmatically but in 
> vain. The following is my code:
>  
> import android.app.Activity;
> import android.content.ContentUris;
> import android.content.ContentValues;
> import android.net.Uri;
> import android.os.Bundle;
> import android.provider.ContactsContract.CommonDataKinds.Phone;
> import android.provider.ContactsContract.CommonDataKinds.StructuredName;
> import android.provider.ContactsContract.Data;
> import android.provider.ContactsContract.RawContacts;
> import android.view.Menu;
>  
> public class MainActivity extends Activity {
>  @Override
>  protected void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.activity_main);
>   
> ContentValues values = new ContentValues();
> Uri rawContactUri = 
> getContentResolver().insert(RawContacts.CONTENT_URI, values);  
> long rawContactId = ContentUris.parseId(rawContactUri);
> values.put(Data.RAW_CONTACT_ID, rawContactId);  
> values.put(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE);  
> values.put(StructuredName.GIVEN_NAME, "Test"); //the contact name
> values.put(Phone.NUMBER, "123456789"); //the contact phone number
> values.put(Phone.TYPE, Phone.TYPE_MOBILE);
> 
> getContentResolver().insert(android.provider.ContactsContract.Data.CONTENT_URI,
>  
> values);
>  }
>  
> with permission  android:name="android.permission.WRITE_CONTACTS" />  
>  
> However, the result is pretty weird. The first screenshot shows the name 
> "2" instead of "Test" and the second screenshot shows no phone number 
> instead of "123456789." Do I miss something?
>

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


[android-developers] Re: Can not debug Galaxy s4 mini

2013-08-19 Thread Nobu Games
Does your phone show some popup message when you try to debug it from your 
PC? Beginning with 4.2.2 there is a "secure USB debugging" feature. You 
have to explicitly authorize a host computer: 
http://android-developers.blogspot.com/2013/02/security-enhancements-in-jelly-bean.html

If you set up your phone with multiple user accounts make sure to switch to 
the primary user count (the first one created) to see that opt-in message.

On Monday, August 19, 2013 9:15:58 AM UTC-5, MobileVisuals wrote:
>
> I  did as Mukesh wrote, but it is still the same problem. I am using the 
> original USB cable.  Isn't the ADB server running on the mobile device? If 
> so, do I have to unroot the mobile to execute the "adb kill-server" 
> command? 
>
>
> On Monday, August 19, 2013 10:14:29 AM UTC+2, MobileVisuals wrote:
>>
>> I can not debug my Galaxy s4 mini. "Android device chooser" starts, but 
>> the OK button is greyed out. This makes it impossible to proceed. It looks 
>> like the screenshot here:
>>
>> http://www.mobile-visuals.com/deb.jpg
>>
>> How should I proceed to get this working?  Does this happen because the 
>> target has the "unknown" status on the device? I followed this guide to set 
>> the debugging on the device:
>>
>> http://www.youtube.com/watch?v=W4geZOSXzO8
>>
>

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


[android-developers] Re: NoClassDefFound Exception, when using imported jar from libs folder

2013-08-19 Thread Nobu Games
You screenshot shows that your Java library project is built using 
JavaSE-1.7. Unfortunately that does not work. You have to set the Java 
compiler version to 1.6 for that project.

On Monday, August 19, 2013 8:33:44 AM UTC-5, Skip wrote:
>
> I am trying referencing a *libs* folder in my project.
>
> *1.)* I created a simple jar with one single dummy class 
> ImportableDummy.java and exported the project as a jar.
>
> *Jar Project:*
>
> [image: enter image description here]
>
> *2.)* Then I put the jar into the *libs folder* inside my Project. The 
> lib is then listed under "Private Libraries":
>
> *Jar referencing Project:*
>
> [image: enter image description here] [image: enter image description 
> here]
>
> *3.)* At least I doublechecked, that the "PrivateLibraries" are marked as 
> "exported"
>
> [image: enter image description here]
>
> *QUESTION:*
>
> Still there is a java.lang.NoClassDefFoundError: 
> com.test.my.ImportableDummy exception, when I run the App. During 
> compileTime the class is perfectly found by the compiler.
>
> What am I missing?
>
>- P.S. A tried to create a separate lib project for the jar too, with 
>the same result.
>- P.P.S. I started Eclipse with the -clean argument with no result
>
>

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


[android-developers] Re: drawBitmap Flip, Scale and Translate

2013-08-17 Thread Nobu Games
Keep in mind that the origin of a bitmap draw operation is the upper left 
corner of the bitmap. So is the origin of canvas (unless you change it with 
a transformation matrix).

When you tell canvas to render everything flipped horizontally and draw the 
bitmap on the canvas at (0;0) the bitmap will be rendered outside the 
canvas to the left. Just imagine that all pixel coordinates of canvas are 
multiplied by your scale values. Your x-axis scale value gives every 
pixel's x-coordinate a negative sign. So every pixel on the visible side of 
the canvas is flipped alongside the left edge of the canvas and become 
invisible. You need to translate the bitmap horizontally to compensate for 
that.

You can set an additional postTranslate on the transformation matrix. Or 
you could set the x-coordinate of the bitmap draw operation accordingly.

Matrix flipmatrix = new Matrix();
flipmatrix.setScale(-1, 1);
flipmatrix.postTranslate(-canvas.getWidth(), 0);

I haven't tried that myself and I'm sometimes also a bad with affine matrix 
calculations. I'm not sure about the negative sign of canvas.getWidth() so 
you probably need to play around a bit with that.

You also probably should try a plain bitmap draw operation without source 
and target rect but just coordinates in order to see if that works for you.


On Saturday, August 10, 2013 11:26:24 AM UTC-5, decode wrote:
>
>
> I have my code as below : 
>
> canvas.drawBitmap(bitmap, src, dest,p); (p is null. using default paint, 
> src is null aswell)
>
> src and dest are Rect
>
> I am trying to flip the bitmap horizontally by using canvas.scale as below 
>
> canvas.save();
> canvas.scale(-1.0f, 1.0f);
> canvas.drawBitmap(bitmap, src, dest, p);
>
> The image just diappeared. 
>
> I am trying to use matrices. But I feel there should be some easier way 
> around. 
>
> I want to flip the image and draw in the rect dest(positon and scaling)
>
>
> Code I am trying now 
>
> Matrix flipmatrix = new Matrix();
> flipmatrix .setScale(-1, 1);
> flipmatrix .postScale(calcScaleX, calcScaleY);
> flipmatrix .postTranslate(calcPosX,calcPosY);
> c.drawBitmap(bitmap, flipmatrix , null);
>
>
>
> Can anyone help me with this. I am not good with matrices. I think there 
> is a easier way out
>
>
>
>
>
>
>
>
>
>
>

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


[android-developers] Re: Which niche of Android app generates the most revenue or is likely to generate the most revenue in the future?

2013-08-16 Thread Nobu Games
Following AppBrain statistics show that the top ranking categories are 
personalization and entertainment:

http://www.appbrain.com/stats/android-market-app-categories

I'm not sure if there is any noteworthy niche in these categories. There 
are always trends and copy-cats of successful products. I guess the only 
real key to making money with apps is being able to provide a quality 
product, regular updates and continuously promoting it with a solid 
advertising plan and budget. It's usually not done with just releasing the 
app and announcing it on a few forums and social websites. As with all 
things related to business: you have to have money in order to make money.

Talking about most revenue... I read a few articles on Gamasutra where 
mobile app developers swear on "freemium" (free download with in app 
payments for feature upgrades).
Here are various opinions on that matter from different game developers:

http://www.gamasutra.com/view/news/191047/Paid_vs_freetoplay_Advice_from_notable_mobile_studios.php

Related links:

   - Maximizing your launch on iOS and 
Android
   - Maximizing your ad revenue 
potential
   - Todd Moore: "How to get a million downloads" (sounds provocative but 
   it's worth a watch) 
   - Increasing monetization by using 
Pay-per-Engagement


On Thursday, August 15, 2013 9:25:50 AM UTC-5, navanshu wrote:
>
>
>

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


[android-developers] Re: How to animate a bar which grows in height

2013-08-15 Thread Nobu Games
Shoot! I just saw that you're using alignParentBottom...

Maybe you can just tweak the ScaleAnimation and feed it with negative 
values or flip the from / to values



On Thursday, August 15, 2013 9:53:29 AM UTC-5, Daniel Rindt wrote:
>
> Hello,
>
> i try to let grow a bar which actually is a simple View with a color in 
> hight for animating a voting display. My code looks like this:
>
> ScaleAnimation anim = new ScaleAnimation(1, 1, 0, 1, 0, 0);
> anim.setDuration(5000);
> anim.setFillEnabled(true);
> anim.setFillAfter(true);
>
> mQ1.startAnimation(anim);
>
> mQ1 is a View. But when the animation starts its top down animated instead 
> of bottom up. So i played with the parameters also and got lots
> of different effects. Maybe its not possible to achieve this? Or i have to 
> rotate it before?
>
> Thanks for reading
> Daniel
>

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


Re: [android-developers] Re: How to animate a bar which grows in height

2013-08-15 Thread Nobu Games
Shoot! I just saw that you're using alignParentBottom... so that may answer 
my doubts about Animations and re-layouts. It probably doesn't work. At 
least not with that attribute :-/

On Thursday, August 15, 2013 1:24:48 PM UTC-5, Nobu Games wrote:
>
> I'm not sure if that really works properly with animations, since I'm not 
> sure how and if they trigger re-layouts. But in theory you could try 
> android:gravity="bottom" in your RelativeLayout or use  
> android:alignParentBottom="true" in your bar child views.
>
> If this doesn't work, you may have to bite the bullet and create a custom 
> view that just renders your bars the way you need it. But maybe someone 
> else has a better idea.
>
> On Thursday, August 15, 2013 11:23:29 AM UTC-5, Daniel Rindt wrote:
>>
>> 2013/8/15 Nobu Games 
>>
>>> Hi Daniel,
>>>
>>> can you post the layout in which these bars are embedded? You may be 
>>> able to solve it with some "bottom gravity" setting in the parent container 
>>> layout
>>>
>>
>> Hey,
>>
>> cool thats what i haven't played with. Here is the layout:
>> http://schemas.android.com/apk/res/android
>> "
>> android:layout_width="match_parent"
>> android:layout_height="match_parent"
>> android:orientation="vertical" >
>>
>> > android:id="@+id/reference_height"
>> android:layout_width="50dp"
>> android:layout_height="200dp"
>> android:layout_alignParentBottom="true"
>> android:layout_alignParentLeft="true"
>> android:layout_marginBottom="75dp"
>> android:layout_marginLeft="20dp"
>> android:background="@android:color/black" />
>>
>> > android:id="@+id/q1"
>> android:layout_width="150dp"
>> android:layout_height="200dp"
>> android:layout_alignParentBottom="true"
>> android:layout_alignParentLeft="true"
>> android:layout_marginBottom="75dp"
>> android:layout_marginLeft="84dp"
>> android:background="@android:color/darker_gray" />
>>
>> 
>>
>> Thanks for your friendly support.
>> Daniel
>>
>

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


Re: [android-developers] Re: How to animate a bar which grows in height

2013-08-15 Thread Nobu Games
I'm not sure if that really works properly with animations, since I'm not 
sure how and if they trigger re-layouts. But in theory you could try 
android:gravity="bottom" in your RelativeLayout or use  
android:alignParentBottom="true" in your bar child views.

If this doesn't work, you may have to bite the bullet and create a custom 
view that just renders your bars the way you need it. But maybe someone 
else has a better idea.

On Thursday, August 15, 2013 11:23:29 AM UTC-5, Daniel Rindt wrote:
>
> 2013/8/15 Nobu Games >
>
>> Hi Daniel,
>>
>> can you post the layout in which these bars are embedded? You may be able 
>> to solve it with some "bottom gravity" setting in the parent container 
>> layout
>>
>
> Hey,
>
> cool thats what i haven't played with. Here is the layout:
> http://schemas.android.com/apk/res/android";
> android:layout_width="match_parent"
> android:layout_height="match_parent"
> android:orientation="vertical" >
>
>  android:id="@+id/reference_height"
> android:layout_width="50dp"
> android:layout_height="200dp"
> android:layout_alignParentBottom="true"
> android:layout_alignParentLeft="true"
> android:layout_marginBottom="75dp"
> android:layout_marginLeft="20dp"
> android:background="@android:color/black" />
>
>  android:id="@+id/q1"
> android:layout_width="150dp"
> android:layout_height="200dp"
> android:layout_alignParentBottom="true"
> android:layout_alignParentLeft="true"
> android:layout_marginBottom="75dp"
> android:layout_marginLeft="84dp"
> android:background="@android:color/darker_gray" />
>
> 
>
> Thanks for your friendly support.
> Daniel
>

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


[android-developers] Re: How to animate a bar which grows in height

2013-08-15 Thread Nobu Games
Hi Daniel,

can you post the layout in which these bars are embedded? You may be able 
to solve it with some "bottom gravity" setting in the parent container 
layout

On Thursday, August 15, 2013 9:53:29 AM UTC-5, Daniel Rindt wrote:
>
> Hello,
>
> i try to let grow a bar which actually is a simple View with a color in 
> hight for animating a voting display. My code looks like this:
>
> ScaleAnimation anim = new ScaleAnimation(1, 1, 0, 1, 0, 0);
> anim.setDuration(5000);
> anim.setFillEnabled(true);
> anim.setFillAfter(true);
>
> mQ1.startAnimation(anim);
>
> mQ1 is a View. But when the animation starts its top down animated instead 
> of bottom up. So i played with the parameters also and got lots
> of different effects. Maybe its not possible to achieve this? Or i have to 
> rotate it before?
>
> Thanks for reading
> Daniel
>

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


[android-developers] OpenGL ES 1.1 with alpha channel

2013-08-12 Thread Nobu Games
I have a problem with setting up OpenGL ES 1.1 with alpha channel support.

First of all: I need an alpha channel within OpenGL ES for performing alpha 
masking and blending effects. My game uses a texture with alpha channel for 
masking another texture. This only happens to work when I initialize OpenGL 
ES with the following configuration:

glView.setEGLConfigChooser(8, 8, 8, 8, 0, 8);

I could use the stencil buffer instead and parts of my game do that, too. 
However, my Nexus 7 tablet crashes pretty hard with a colorfully distorted 
screen when I use the stencil buffer in conjunction with alpha testing 
(which is necessary for discarding transparent pixels in the masking 
texture):

gl.glEnable(GL10.GL_ALPHA_TEST);
gl.glAlphaFunc(GL10.GL_GREATER, 0.05f);

Romain Guy says 
herethat
 the alpha channel set in setEGLConfigChooser does not need to be used 
unless the window is translucent. However, when I compile my game with:

glView.setEGLConfigChooser(8, 8, 8, 0, 0, 8); // alpha = 0

My texture masking effect does not work anymore. Instead I can only see the 
unmasked texture hovering as a square on the screen. All other textures 
with alpha channel are rendered correctly but only when I don't try to 
alpha-mask them.

I could leave the configuration with 8 bits alpha channel. However, then I 
get on some older devices crashes with an EGL_BAD_MATCH  error because 
their surface view apparently only supports RGB565 or maybe even something 
worse than that.

I tried fixing the problem as follows:

glView.setEGLConfigChooser(5, 6, 5, 8, 0, 8);

But that does not work either (config chooser cannot find a matching 
configuration). What can I do in this situation? How can I keep my alpha 
channel within OpenGL ES (I don't need it for the surface nor the window) 
and make older devices happy without crashing right on initialization?

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




[android-developers] Re: Admob in a View

2013-08-12 Thread Nobu Games
I guess you are talking about interstitial ads. They are also sometimes 
called full screen ads:

https://developers.google.com/mobile-ads-sdk/docs/admob/advanced

On Monday, August 12, 2013 3:08:16 PM UTC-5, shiva pendem wrote:
>
> Hi,
>
> I am working on a game with a view, i would like to display ads after 
> completion of each level,
>
> but i don't know how to display ads in view,
>
> Can any one please send me the sample source to display ads in view to 
> pendem@gmail.com ,
>
> Thanks
> Shiva Shankar
>

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




[android-developers] Re: Need to show a dialog on top of all other Apps for a custom hardware.

2013-08-11 Thread Nobu Games
I played around with the Google Play Games Services SDK a bit and it looks 
like they also have such a kind of dialog that is able to be on top of 
everything else (and even survives activity transitions). It's the 
"welcome" log in message that pops up on top of the screen.

I'm not sure where the code for this popup resides. You may want to take a 
look at the SDK code, though I believe you may not be able find it there 
since it could be part of a system component (Play Services system app).

However, it seems to be possible to add a view to the window from within a 
service:

http://stackoverflow.com/questions/4481226/creating-a-system-overlay-always-on-top-button-in-android
and also
http://stackoverflow.com/questions/12650463/getting-window-display-from-service-android

The only problem is listening to onKeyDown from a service: 
http://stackoverflow.com/questions/3454710/onkeydown-in-a-service-global-hot-keys/3455094#3455094

I guess that would be the only thing where you need to implement your 
firmware customization in order to make that possible.

On Thursday, August 8, 2013 5:22:30 AM UTC-5, Tushar wrote:
>
> Hi,
>
> I need to show a dialog (more like a horizontal bar) on press of a custom 
> Key (on my custom device powered by Android).
> This dialog should appear on top of any other application(say "A") that 
> might be running when the Key is pressed. The app "A" should keep on 
> running and its UI should be visibile (i.e the app "A: should not go to 
> "onPause()"). It should work something similar to SystemUI's volume change 
> dialog when Volume Hard Keys are pressed.  I want to make minimum changes 
> in framework.  My understanding is that I need to make changes in 
> PhoneWindowManager.java to handle the press of custom Key, which will then 
> call my app residing in application layer, which will just inflate the 
> dialog. Would this work? If so, is there a better way to implement it? If 
> not, how can I implement this? 
>

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




Re: [android-developers] Re: Gradle build is screwing up in weird ways on 5% of devices when used with Proguard -- same config and source works fine in Eclipse build

2013-08-09 Thread Nobu Games
I agree with you. And that also may be of concern for Eric Lafortune, the 
ProGuard developer. It could be that there is a glitch in his code 
obfuscation routines.

On Friday, August 9, 2013 2:49:42 AM UTC-5, Daniele Segato wrote:
>
> I would write at 
> https://groups.google.com/forum/#!forum/adt-dev 
>
> in addition to the bug report 
>
> On 08/07/2013 07:02 PM, Digipom wrote: 
> > I figured it out -- I seem to have run into some sort of an obscure 
> > floating-point optimization bug that occurs on certain devices. I 
> > opened https://code.google.com/p/android/issues/detail?id=58698 to 
> track 
> > the issue. I haven't found a workaround yet aside from exporting from 
> > Eclipse for now, but I'm trying different things like replacing floats 
> > with doubles to see if that makes a difference. It's slow-going since I 
> > can't reproduce the issue locally and rely on remote debugging. ;) 
> > 
> > On Sunday, August 4, 2013 3:42:52 PM UTC-4, Digipom wrote: 
> > 
> > Hello, 
> > 
> > I recently moved to Gradle from Eclipse so that I could have an easy 
> > time of building from the command line, and at first I was very 
> > happy with the Gradle build, until about 5% of the customers started 
> > emailing me and complaining that the app was behaving strangely and 
> > not working correctly. No crashes, just... behaving oddly, and only 
> > on 5% of the devices. The code & Proguard config is identical, so it 
> > seems something bad is happening with the way that the code is being 
> > generated. I haven't figured it out yet, but I'm digging into things 
> > with apktool and I'm seeing a lot of differences with the generated 
> > classes from the same class files, which I find strange because the 
> > Proguard config that I'm feeding in is the same. Unfortunately, I 
> > have to go back to manual builds with Eclipse for now due to this 
> issue. 
> > 
> > Does anyone else have any similar experiences or insight into this? 
> > Are the Eclipse / Gradle builds using different build tools behind 
> > the scenes which could lead to differences in the generated code and 
> > cause some files to be mis-generated? Thank 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-d...@googlegroups.com 
> > To unsubscribe from this group, send email to 
> > android-developers+unsubscr...@googlegroups.com  
> > For more options, visit this group at 
> > http://groups.google.com/group/android-developers?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> > Groups "Android Developers" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to android-developers+unsubscr...@googlegroups.com. 
>
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>
>

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




[android-developers] Re: Gradle build is screwing up in weird ways on 5% of devices when used with Proguard -- same config and source works fine in Eclipse build

2013-08-07 Thread Nobu Games
If it is floating point related you could try adding the "strictfp" 
modifier to your methods or classes that rely on platform-independent 
floating point arithmetics.

On Wednesday, August 7, 2013 12:02:04 PM UTC-5, Digipom wrote:
>
> I figured it out -- I seem to have run into some sort of an obscure 
> floating-point optimization bug that occurs on certain devices. I opened 
> https://code.google.com/p/android/issues/detail?id=58698 to track the 
> issue. I haven't found a workaround yet aside from exporting from Eclipse 
> for now, but I'm trying different things like replacing floats with doubles 
> to see if that makes a difference. It's slow-going since I can't reproduce 
> the issue locally and rely on remote debugging. ;)
>
> On Sunday, August 4, 2013 3:42:52 PM UTC-4, Digipom wrote:
>>
>> Hello,
>>
>> I recently moved to Gradle from Eclipse so that I could have an easy time 
>> of building from the command line, and at first I was very happy with the 
>> Gradle build, until about 5% of the customers started emailing me and 
>> complaining that the app was behaving strangely and not working correctly. 
>> No crashes, just... behaving oddly, and only on 5% of the devices. The code 
>> & Proguard config is identical, so it seems something bad is happening with 
>> the way that the code is being generated. I haven't figured it out yet, but 
>> I'm digging into things with apktool and I'm seeing a lot of differences 
>> with the generated classes from the same class files, which I find strange 
>> because the Proguard config that I'm feeding in is the same. Unfortunately, 
>> I have to go back to manual builds with Eclipse for now due to this issue.
>>
>> Does anyone else have any similar experiences or insight into this? Are 
>> the Eclipse / Gradle builds using different build tools behind the scenes 
>> which could lead to differences in the generated code and cause some files 
>> to be mis-generated? Thank 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: How do I flip images?

2013-08-07 Thread Nobu Games
Unfortunately not, it's simply too specific. In that case you may have to 
roll your own implementation, I'm afraid. Or better: just simplify your 
requirements and use a ViewPager for flipping your pages. It's just a 
horizontal scroll animation but it's ok.

On Wednesday, August 7, 2013 3:31:21 PM UTC-5, SonyPhoneGuy wrote:
>
> I cant seem to find a good one... The only one thats slightly pleasing is: 
> https://code.google.com/p/android-page-curl/  
>
> I downloaded their reader off the app market which implements it.  Its 
> awful.
>
> I thought there would be some easy way of doing what the Play Book does, 
> thought there would be some native method of doing this...
>
>
> On Wed, Aug 7, 2013 at 9:16 PM, Nobu Games 
> > wrote:
>
>> I was in the same shoes a while ago. There is no easy way to get a 
>> convincing animation. And you cannot get it at all using Android animation 
>> objects.
>>
>> There are a few "page curl", "page flip" tutorials out there. It will 
>> boil down to creating your own view that renders it. And that's not really 
>> trivial to do especially when you want to make that "interactive" by 
>> dragging around the page and changing the curl dynamically based on the 
>> finger position. Maybe you'll find a ready made component for Android by 
>> searching for "Android page curl".
>>
>>
>> On Wednesday, August 7, 2013 2:59:47 PM UTC-5, SonyPhoneGuy wrote:
>>>
>>> I am trying to do some flip animation.
>>>
>>> I have been able to successfully use the ObjectAnimator to do a few 
>>> flips, but I am trying to re-create a more believable page flip - rather 
>>> like a book flip - similar to what is used in Play Books.
>>>
>>> Is there any easy way to do this? any documentations around?
>>>
>>> Thank 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-d...@googlegroups.com
>> To unsubscribe from this group, 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 a topic in the 
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/android-developers/6Nupi1tOLP4/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

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




[android-developers] Re: buggy legacy options menu on Samsung S4

2013-08-07 Thread Nobu Games
Sorry, I did not realize, there was a ZIP file. I was thinking the download 
button is just some big graphic and my "visual parser" in my head discarded 
it :-D

Your activity is as simple as it can get and I cannot spot any mistake. It 
really may be just some rare firmware glitch and nothing much to worry 
about. Unfortunately we have to deal with these random device-specific 
oddities all the time.

If you really want to work around that issue you could make use of an 
action bar and move the most important and relevant menu options there.


On Tuesday, August 6, 2013 11:01:17 AM UTC-5, Jay Howard wrote:
>
> I'm seeing the following behavior (on a Samsung S4, but potentially also 
> on other Samsung devices) in an app that uses a "legacy" options menu:
>
> 1. User taps hardware menu button to bring up options menu.  There are 
> more than six items in the menu.
> 2. User taps the bottom-right "more" button to access the overflow menu 
> items.
> 3. User taps the hardware back button to return to the initial options 
> menu.
> 4. User taps any combination of menu items, potentially multiple times 
> each.  Nothing happens.  onOptionsItemSelected() is never called.
> 5. User taps the hardware back button to close the options menu.
> 6. User taps the hardware menu button to display the options menu again.  
> At this point, onOptionsItemSelected() is called in quick succession for 
> each menu item the user tapped when the menu was previously displayed.
>
> Can anyone advise?
>
> I've created a simple demo app to demonstrates the behavior along with a 
> video that shows exactly what I'm talking about.  There's also a screenshot 
> with device info for the device I tested on.  I've shared them here:
>
> https://drive.google.com/folderview?id=0B6DvDY2BvxUTRUNxWFVUNDl4QlU
>
> The demo app implements onCreateOptionsMenu() and onOptionsItemSelected() 
> nearly identically to the examples given here:
>
> http://developer.android.com/guide/topics/ui/menus.html#options-menu
>
> I posted this question on StackOverflow a while back, but none of the 
> responses were helpful:
>
>
> http://stackoverflow.com/questions/17180909/options-menu-locks-up-on-galaxy-s4
>

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




[android-developers] Re: How do I flip images?

2013-08-07 Thread Nobu Games
I was in the same shoes a while ago. There is no easy way to get a 
convincing animation. And you cannot get it at all using Android animation 
objects.

There are a few "page curl", "page flip" tutorials out there. It will boil 
down to creating your own view that renders it. And that's not really 
trivial to do especially when you want to make that "interactive" by 
dragging around the page and changing the curl dynamically based on the 
finger position. Maybe you'll find a ready made component for Android by 
searching for "Android page curl".

On Wednesday, August 7, 2013 2:59:47 PM UTC-5, SonyPhoneGuy wrote:
>
> I am trying to do some flip animation.
>
> I have been able to successfully use the ObjectAnimator to do a few flips, 
> but I am trying to re-create a more believable page flip - rather like a 
> book flip - similar to what is used in Play Books.
>
> Is there any easy way to do this? any documentations around?
>
> Thank 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] [Market] Commenting unpublished application

2013-08-07 Thread Nobu Games
In response to my own question and for the public record:

Everybody who downloads a published (free) app still has access to the 
unpublished market page by opening the direct market page URL. You can 
still download it from scratch when the app is not there on your device and 
you can also update it.

It's pretty convenient, because I can still roll out updates for an 
unpublished app. People are apparently not notified through the Google Play 
app about it, but my app has its own update notification feature, so that's 
no big deal.

On Monday, August 5, 2013 12:31:11 PM UTC-5, Nobu Games wrote:
>
> I wonder if this is still true, since Google Play changes the rules every 
> now and again. Unfortunately I cannot find any official statement on that 
> matter.
>
> My problem right now is that I participated in an AppGratis campaign and I 
> had to unpublish my app. However, people are still reporting bugs and I 
> need to roll out updates somehow without re-publishing that AppGratis app 
> on Google Play. Most users are not tech-savvy enough for side-loading APKs.
>
> So are the following assumptions correct:
>
> 1. User downloads published app from Google Play
> 2. App is unpublished from Google Play
> 3. App gets updated while still being unpublished
>
> A) User gets update through Google Play
> B) User only gets updates as long as the originally downloaded app is 
> installed on the phone
> C) User does not get updates / cannot install app when she decides to 
> uninstall or switches the Android device
>
>
>
> On Wednesday, May 2, 2012 10:18:16 AM UTC-5, MagouyaWare wrote:
>>
>> It is my understanding that once a user has downloaded your app they will 
>> ALWAYS have access to it in Google Play...  Unpublishing it only affects 
>> users that have not already downloaded/installed the app.
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/magouyaware
>>
>>
>> On Wed, May 2, 2012 at 4:14 AM, Marcin Orlowski wrote:
>>
>>> I always though unpublishing app takes it away from users so they 
>>> neither can install it or update. And I also thought unpublished apps are 
>>> simply gone from user perspective so they cannot see them in Market. But 
>>> now I see one of my apps is still being commented (even today) even it is 
>>> unpublished for couple of days What do I miss?
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@googlegroups.com
>>> To unsubscribe from this group, 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: buggy legacy options menu on Samsung S4

2013-08-07 Thread Nobu Games
Could you post your Activity code?

On Tuesday, August 6, 2013 11:01:17 AM UTC-5, Jay Howard wrote:
>
> I'm seeing the following behavior (on a Samsung S4, but potentially also 
> on other Samsung devices) in an app that uses a "legacy" options menu:
>
> 1. User taps hardware menu button to bring up options menu.  There are 
> more than six items in the menu.
> 2. User taps the bottom-right "more" button to access the overflow menu 
> items.
> 3. User taps the hardware back button to return to the initial options 
> menu.
> 4. User taps any combination of menu items, potentially multiple times 
> each.  Nothing happens.  onOptionsItemSelected() is never called.
> 5. User taps the hardware back button to close the options menu.
> 6. User taps the hardware menu button to display the options menu again.  
> At this point, onOptionsItemSelected() is called in quick succession for 
> each menu item the user tapped when the menu was previously displayed.
>
> Can anyone advise?
>
> I've created a simple demo app to demonstrates the behavior along with a 
> video that shows exactly what I'm talking about.  There's also a screenshot 
> with device info for the device I tested on.  I've shared them here:
>
> https://drive.google.com/folderview?id=0B6DvDY2BvxUTRUNxWFVUNDl4QlU
>
> The demo app implements onCreateOptionsMenu() and onOptionsItemSelected() 
> nearly identically to the examples given here:
>
> http://developer.android.com/guide/topics/ui/menus.html#options-menu
>
> I posted this question on StackOverflow a while back, but none of the 
> responses were helpful:
>
>
> http://stackoverflow.com/questions/17180909/options-menu-locks-up-on-galaxy-s4
>

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




[android-developers] Re: Web search.

2013-08-05 Thread Nobu Games
Make yourself familiar with regular expressions and try to evaluate the 
input string for matching known URL address patterns. The problem here is, 
that your pattern matching must not be strict. So you also need to allow 
input like

www.domain.com
domain.com

without http(s) protocol prefix which will be the most likely user input. 
Unfortunately that is a malformed URL and you need to auto-complete it so 
it gets valid:

www.domain.com --> http://www.domain.com/

Everything that does *not *match your URL pattern should be treated as 
search query. You could pass on that query to Google or whatever search 
engine of your choice.


On Monday, August 5, 2013 2:10:07 PM UTC-5, SonyPhoneGuy wrote:
>
> Hello,
>
> I would like to make a search interface on android with Eclipse.
>
> I have managed to add a search box on my form by using the menu xml which 
> shows on the form action bar.  I also have an webview on my form that is to 
> load what is entered into the search box. 
>
> I was wondering if there was an easy way to do websearch (if the entered 
> term is not a webresource) or to display the webpage if the search term is 
> correct ... rather like how the native browser does it on android.
>
> Thank 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] [Market] Commenting unpublished application

2013-08-05 Thread Nobu Games
I wonder if this is still true, since Google Play changes the rules every 
now and again. Unfortunately I cannot find any official statement on that 
matter.

My problem right now is that I participated in an AppGratis campaign and I 
had to unpublish my app. However, people are still reporting bugs and I 
need to roll out updates somehow without re-publishing that AppGratis app 
on Google Play. Most users are not tech-savvy enough for side-loading APKs.

So are the following assumptions correct:

1. User downloads published app from Google Play
2. App is unpublished from Google Play
3. App gets updated while still being unpublished

A) User gets update through Google Play
B) User only gets updates as long as the originally downloaded app is 
installed on the phone
C) User does not get updates / cannot install app when she decides to 
uninstall or switches the Android device



On Wednesday, May 2, 2012 10:18:16 AM UTC-5, MagouyaWare wrote:
>
> It is my understanding that once a user has downloaded your app they will 
> ALWAYS have access to it in Google Play...  Unpublishing it only affects 
> users that have not already downloaded/installed the app.
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Wed, May 2, 2012 at 4:14 AM, Marcin Orlowski 
> 
> > wrote:
>
>> I always though unpublishing app takes it away from users so they neither 
>> can install it or update. And I also thought unpublished apps are simply 
>> gone from user perspective so they cannot see them in Market. But now I see 
>> one of my apps is still being commented (even today) even it is unpublished 
>> for couple of days What do I miss?
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: example source code or tutorial on using fragments and OpenGL ES 2.0

2013-08-05 Thread Nobu Games
Sounds like an interesting project. Keep me up to date about your progress 
:-)

On Sunday, August 4, 2013 9:00:25 PM UTC-5, James Black wrote:
>
> Basically, my program has some similarity, in use, as a graphing 
> calculator, but, the equation may be planetary orbits, and the user may 
> want to rotate the solar system to see how the planetary orbits change. 
>  That is why I am looking at OpenGL, rather than canvas.
>
> The user will be able to make changes to equations, then I show them the 
> effects graphically.
>
> But, not being able to have more than one SurfaceView means that using 
> Fragments won't work anyway. :(
>
> Thank you.
>
>
> On Sun, Aug 4, 2013 at 3:13 PM, Nobu Games 
> > wrote:
>
>> Hi James,
>>
>> as far as I know it's not (reliably) possible to have more than one 
>> SurfaceView<https://groups.google.com/forum/#!msg/android-developers/fQihJKLki7M/nz4QWV8eyxQJ>(or
>>  GLSurfaceView) in one Activity at the same time. Since it sounds like 
>> you just want to draw graphs, it would be probably better to resort to a 
>> custom view component and drawing on a Canvas.
>>
>> If you fancy OpenGL ES rendering capabilities then you should just have a 
>> single GLSurfaceView and implement swiping / paging yourself by capturing 
>> touch events and drawing the OpenGL ES scene accordingly.
>>
>>
>>
>>
>> On Saturday, August 3, 2013 10:00:32 PM UTC-5, James Black wrote:
>>>
>>> Hello,
>>>   I want to start on a program using OpenGL ES but I want to use 
>>> fragments, as it will be simpler, I think, to show equations in one 
>>> fragment and the graph in another fragment.  The equations and the graphing 
>>> will be separate instances of using GLSurfaceView.
>>>
>>>   As I write this I almost wonder if I should use a HUD, as explained 
>>> phere: http://stackoverflow.**com/questions/8842173/android-**
>>> image-over-opengl-es-game-hud<http://stackoverflow.com/questions/8842173/android-image-over-opengl-es-game-hud>
>>>
>>>   But for equations that people can modify I don't know if that is the 
>>> best option.
>>>
>>> http://stackoverflow.com/**questions/1629775/tutorials-**
>>> and-libraries-for-opengl-es-**games-on-android<http://stackoverflow.com/questions/1629775/tutorials-and-libraries-for-opengl-es-games-on-android>
>>>
>>> Thank you.
>>>
>>> -- 
>>> Resume & Projects: 
>>> http://careers.stackoverflow.**com/jamesblack<http://careers.stackoverflow.com/jamesblack>
>>>
>>> "I know that you believe you understand what you think I said, but I'm 
>>> not sure you realize that what you heard is not what I meant."
>>> - Robert McCloskey 
>>>
>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Resume & Projects: http://careers.stackoverflow.com/jamesblack
>
> "I know that you believe you understand what you think I said, but I'm not 
> sure you realize that what you heard is not what I meant."
> - Robert McCloskey 
>

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




[android-developers] Re: example source code or tutorial on using fragments and OpenGL ES 2.0

2013-08-04 Thread Nobu Games
Hi James,

as far as I know it's not (reliably) possible to have more than one 
SurfaceView(or
 GLSurfaceView) in one Activity at the same time. Since it sounds like 
you just want to draw graphs, it would be probably better to resort to a 
custom view component and drawing on a Canvas.

If you fancy OpenGL ES rendering capabilities then you should just have a 
single GLSurfaceView and implement swiping / paging yourself by capturing 
touch events and drawing the OpenGL ES scene accordingly.



On Saturday, August 3, 2013 10:00:32 PM UTC-5, James Black wrote:
>
> Hello,
>   I want to start on a program using OpenGL ES but I want to use 
> fragments, as it will be simpler, I think, to show equations in one 
> fragment and the graph in another fragment.  The equations and the graphing 
> will be separate instances of using GLSurfaceView.
>
>   As I write this I almost wonder if I should use a HUD, as explained 
> phere: 
> http://stackoverflow.com/questions/8842173/android-image-over-opengl-es-game-hud
>
>   But for equations that people can modify I don't know if that is the 
> best option.
>
>
> http://stackoverflow.com/questions/1629775/tutorials-and-libraries-for-opengl-es-games-on-android
>
> Thank you.
>
> -- 
> Resume & Projects: http://careers.stackoverflow.com/jamesblack
>
> "I know that you believe you understand what you think I said, but I'm not 
> sure you realize that what you heard is not what I meant."
> - Robert McCloskey 
>

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




[android-developers] Re: Fragments navigation and backstack issue

2013-08-04 Thread Nobu Games
Hi!

I remember the pain with fragments and the back stack while working on an 
app last year. My solution was the following. In the activity's onCreate 
method I would do the following:

FragmentManager fm = getSupportFragmentManager();
> fm.addOnBackStackChangedListener(new OnBackStackChangedListener() {
> @Override
> public void onBackStackChanged() {
> FragmentManager fm = getSupportFragmentManager();
>
> if(fm.getBackStackEntryCount() == 0) {
> finish();
> }
> }
> });
>

It basically listens to fragment back stack changes and forces the Activity 
to finish when the stack is empty

On Sunday, August 4, 2013 4:47:47 AM UTC-5, user123 wrote:
>
> Im trying to implement a fragment based navigation pattern, which can be 
> reduced to this:
>
>
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> In words: There is:
>
>- 
>
>Home fragment
>- 
>
>Fragment A
>- 
>
>Fragment B
>
> The fragments are shown in FrameLayout "content". The navigation bar is 
> part of the activity.
>
> Workflow should be: Press back on home: Exit App. Press back on A or B: 
> show Home.
>
> Most of it works as it should, but I have the problem that with a complex 
> workflow like this:
>
> Start(home) - A - B - A - Back - B - Back
>
> I expect that it will show home, but instead it shows A. I think it's 
> because the first transaction (home - A) it's in the backstack and it shows 
> A. But I don't understand why then it works correctly in the simple cases?
>
> The code:
>
> public class MainActivity extends FragmentActivity {
> boolean isInHome; //a flag to control when we add fragment to the backstack 
> or not
> @Overrideprotected void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.activity_main);
>
> //set home fragment programmatically first time
> FragmentTransaction transaction = 
> getSupportFragmentManager().beginTransaction();
> Fragment fragmentHome = new FragmentHome();
> transaction.replace(R.id.content, fragmentHome);
> transaction.commit();
>
> isInHome = true;
>
> //initialize layout
> Button home = (Button) findViewById(R.id.home);
> Button a = (Button) findViewById(R.id.a);
> Button b = (Button) findViewById(R.id.b);
>
> home.setOnClickListener(new View.OnClickListener() {
> @Override
> public void onClick(View v) {
> //clear complete backstack (in this case, just pop home 
> transaction)
> getSupportFragmentManager().popBackStackImmediate(null, 
> FragmentManager.POP_BACK_STACK_INCLUSIVE);
>
> //show home fragment
> FragmentTransaction transaction = 
> getSupportFragmentManager().beginTransaction();
> Fragment fragmentHome = new FragmentHome();
> transaction.replace(R.id.content, fragmentHome);
> transaction.commit();
>
> isInHome = true;
> }
> });
>
> a.setOnClickListener(new View.OnClickListener() {
> @Override
> public void onClick(View v) {
> FragmentTransaction transaction = 
> getSupportFragmentManager().beginTransaction();
> Fragment fragmentA = new FragmentA();
> transaction.replace(R.id.content, fragmentA);
> if (isInHome) { //add the home transaction to the backstack, such 
> that press back on this fragment shows home again
> transaction.addToBackStack("home");
> }
> transaction.commit();
> isInHome = false;
> }
> });
>
> b.setOnClickListener(new View.OnClickListener() {
> @Override
> public void onClick(View v) {
> FragmentTransaction transaction = 
> getSupportFragmentManager().beginTransaction();
> Fragment fragmentB = new FragmentB();
> transaction.replace(R.id.content, fragmentB);
> if (isInHome) { //add the home transaction to the backstack, such 
> that press back on this fragment shows home again
> transaction.addToBackStack("home");
> }
> transaction.commit();
> isInHome = false;
> }
> });}
> @Overridepublic void onBackPressed() {
> super.onBackPressed();
>
> isInHome = true; //quick solution to update status - when press back on A 
> or B, we are in home (and press back in home exits the app, so this doesn't 
> matter)}
>
> }
>
> What's wrong here?
>
> Thanks in advance.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send e

[android-developers] Re: No sample tutorials for Paypal Mobile Express Checkout with Button in the app?

2013-08-04 Thread Nobu Games

On Sunday, August 4, 2013 10:47:44 AM UTC-5, Polaris431 wrote:
>
> I'm not sure what you meant when you posted this, but I can't imagine 
>>> Google will reject apps where the app uses in-app billing with Paypal or 
>>> any other payment system. In fact, you can have an app that takes the user 
>>> to the company's mobile website that lets them use PayPal to make a 
>>> payment. 
>>
>>
>From the Google Play Developer 
>Policies
:


   - 
>
>*In-app purchases:* Developers offering additional content, services 
>or functionality within an application downloaded from Google Play must 
> use 
>Google Play's payment system as the method of payment, except: 
>   - where payment is primarily for physical goods or services (e.g. 
>   buying movie tickets; e.g. buying a publication where the price also 
>   includes a hard copy subscription); or 
>   - where payment is for digital content or goods that may be 
>   consumed outside of the application itself (e.g. buying songs that can 
> be 
>   played on other music players) 
>
   
 

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




[android-developers] Re: WebView Problem showing Google Maps

2013-08-03 Thread Nobu Games
Just a guess, maybe Google Maps is trying to (incorrectly) redirect to the 
mobile version of the page and cannot find the correct link. Did you also 
enable JavaScript in your WebView?

On Saturday, August 3, 2013 4:40:52 PM UTC-5, Gary Blakely wrote:
>
> Consider the following code...
>
> LocateBrowser = (WebView)findViewById(R.id.locatebrowser);
> LocateBrowser.setWebViewClient(new WebViewClient());
> LocateBrowser.loadUrl("
> http://maps.google.com/maps?z=17&t=h&q=loc:31.8526,-110.9959";);
>
> The Google maps page shows in the WebView with a "Loading . . ." activity 
> logo for about a second.  The Google's 404 page then shows saying it can't 
> find /Search.  I don't know where it gets "/Search".
>
> I don't know why it is doing this.  If I substitute other URLs such as
>
> http://www.deanblakely.com/AndroidNews.aspx
> or
> http://www.amazon.com
>
> It works fine.
>
> Also, if I put the above google maps URL into a browser on my PC it works 
> fine.
> Also, if I don't implement the WebViewClient (second line) it shows 
> perfectly but in a separate browser window.(I don't want that).
>
> What am I doing wrong or what am I forgetting to do?
> Thanks,
> Gary
>

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




[android-developers] Re: Do SQLiteDatabase references "go stale"?

2013-08-03 Thread Nobu Games
There is an old entry on Stackoverflow about SQLiteDiskIOException: 
http://stackoverflow.com/questions/3220482/sqlitediskioexception-in-android

It also mentions the getCount method


On Friday, August 2, 2013 6:55:53 PM UTC-5, Nathan wrote:
>
> I have got back two nonfatal exception reports. I can't match them to any 
> particular user yet. 
>
> When attempting the open. 
> android.database.sqlite.SQLiteCantOpenDatabaseException unknown error 
> (code 14): Could not open database
> From: 
> SQLiteDatabase.java line 
> 669android.database.sqlite.SQLiteDatabase.openDatabase 
>
> Another, when checking for a record's existence:
> android.database.sqlite.SQLiteDiskIOException disk I/O error
> from
> SQLiteCursor.java line 268 
> android.database.sqlite.SQLiteCursor.getCount 
>
> They appear to be pretty rare. No sign it is tied to a corrupt database. 
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: ContentResolver insert return null on 4.3

2013-08-02 Thread Nobu Games
Is there anything in log cat related to MediaStore?

On Friday, August 2, 2013 2:43:17 PM UTC-5, eli wrote:
>
> Thanks for your answer, I just entered hard coded values there to make the 
> code more clear, this is not the issue.
>
> Eli
> On Aug 2, 2013 10:29 PM, "Nobu Games" > 
> wrote:
>
>> Sorry Eli,
>>
>> I should have read your code more carefully. You're hard-coding file 
>> paths in that insert request which is bad practice. You cannot assume that 
>> there paths like "/sdcard/..." on all Android devices. They can be named 
>> completely differently depending on device / manufacturer and especially on 
>> Jelly Bean there's  something like a "virtual file system" for supporting 
>> multiple user accounts and these file paths look totally different.
>>
>> You should make use of the context.getExternalStorage(...) and related 
>> methods (also look into the Environment class).
>>
>> Maybe the hard-coded file path is the problem there?
>>
>> On Friday, August 2, 2013 2:20:50 PM UTC-5, eli wrote:
>>>
>>> It always return null on 4.3, and works perfectly on all other versions.
>>> On Aug 2, 2013 10:13 PM, "Nobu Games"  wrote:
>>>
>>>> I just had a quick peek at the API level 14 source code and it looks 
>>>> like there are two possible reasons for that problem:
>>>>
>>>> 1. The actual ContentProvider the ContentResolver connected to returns 
>>>> null on insert (for whatever reason, that is a mystery)
>>>> 2. A RemoteException was thrown during the insert operation. The 
>>>> exception is caught by the ContentResolver and it returns just null 
>>>> instead. The reason for that is (according to the source code comment) 
>>>> that 
>>>> the process / app is about to die anyway.
>>>>
>>>> Other ContentResolver methods behave exactly the same. Also the query 
>>>> methods. It can - without a warning - just return null, even though it 
>>>> works in your tests a million times.
>>>>
>>>> You therefore need to check the result for null and come up with a 
>>>> strategy for coping with that problem, like scheduling a re-query or 
>>>> checking if your activity is about to be finished.
>>>>
>>>> On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:
>>>>>
>>>>> This code works on all Android versions except on 4.3:
>>>>>
>>>>>ContentValues content = new 
>>>>> ContentValues(4);
>>>>> content.put(Video.**VideoColumn**s.TITLE, "vid.mp4");
>>>>> content.put(Video.**VideoColumn**s.DATE_ADDED,
>>>>> System.currentTimeMillis() / 1000);
>>>>> content.put(Video.Media.MIME_TYPE, "video/mp4");
>>>>> content.put(MediaStore.Video.Media.DATA, 
>>>>> "/sdcard/vid.mp4");
>>>>> ContentResolver resolver = getContentResolver();
>>>>>* Uri uri = resolver.insert(MediaStore.Vid
>>>>> eo.Media.EXTERNAL_CONTENT_URI,*
>>>>> *content);*
>>>>>
>>>>> On 4.3 *uri *is null.
>>>>> Can someone help?
>>>>>
>>>>>  Thanks,
>>>>> Eli
>>>>>
>>>>  -- 
>>>> -- 
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to android-d...@**googlegroups.com
>>>> To unsubscribe from this group, send email to
>>>> android-developers+**unsubscr...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>>> --- 
>>>> You received this message because you are subscribed to a topic in the 
>>>> Google Groups "Android Developers" group.
>>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>>> topic/android-developers/I-**nzRB0w6DM/unsubscribe<https://groups.google.com/d/topic/android-developers/I-nzRB0w6DM/unsubscribe>
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> android-developers+**unsubscr...@googlegroups.com.
>>>> For

Re: [android-developers] Re: ContentResolver insert return null on 4.3

2013-08-02 Thread Nobu Games
Sorry Eli,

I should have read your code more carefully. You're hard-coding file paths 
in that insert request which is bad practice. You cannot assume that there 
paths like "/sdcard/..." on all Android devices. They can be named 
completely differently depending on device / manufacturer and especially on 
Jelly Bean there's  something like a "virtual file system" for supporting 
multiple user accounts and these file paths look totally different.

You should make use of the context.getExternalStorage(...) and related 
methods (also look into the Environment class).

Maybe the hard-coded file path is the problem there?

On Friday, August 2, 2013 2:20:50 PM UTC-5, eli wrote:
>
> It always return null on 4.3, and works perfectly on all other versions.
> On Aug 2, 2013 10:13 PM, "Nobu Games" > 
> wrote:
>
>> I just had a quick peek at the API level 14 source code and it looks like 
>> there are two possible reasons for that problem:
>>
>> 1. The actual ContentProvider the ContentResolver connected to returns 
>> null on insert (for whatever reason, that is a mystery)
>> 2. A RemoteException was thrown during the insert operation. The 
>> exception is caught by the ContentResolver and it returns just null 
>> instead. The reason for that is (according to the source code comment) that 
>> the process / app is about to die anyway.
>>
>> Other ContentResolver methods behave exactly the same. Also the query 
>> methods. It can - without a warning - just return null, even though it 
>> works in your tests a million times.
>>
>> You therefore need to check the result for null and come up with a 
>> strategy for coping with that problem, like scheduling a re-query or 
>> checking if your activity is about to be finished.
>>
>> On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:
>>>
>>> This code works on all Android versions except on 4.3:
>>>
>>>ContentValues content = new ContentValues(4);
>>> content.put(Video.**VideoColumns.TITLE, "vid.mp4");
>>> content.put(Video.**VideoColumns.DATE_ADDED,
>>> System.currentTimeMillis() / 1000);
>>> content.put(Video.Media.MIME_**TYPE, "video/mp4");
>>> content.put(MediaStore.Video.**Media.DATA, 
>>> "/sdcard/vid.mp4");
>>> ContentResolver resolver = getContentResolver();
>>>* Uri uri = resolver.insert(MediaStore.
>>> Video.Media.EXTERNAL_CONTENT_URI,*
>>> *content);*
>>>
>>> On 4.3 *uri *is null.
>>> Can someone help?
>>>
>>> Thanks,
>>> Eli
>>>
>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, 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 a topic in the 
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/android-developers/I-nzRB0w6DM/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>

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




[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-08-02 Thread Nobu Games
Hi Edvinas,

I need to ask again, because I think that may be the cause of the delay: 
how do you communicate the touch events to your rendering thread? Because 
Android can bombard your UI thread with lots of touch events in no time. 
But your rendering thread needs to "peek" before updating the game state in 
regular intervals into the current state of touch input. It's your game 
loop / rendering thread that needs to dictate the rhythm in order to 
synchronize the "whole experience".

What I do in my game is the following:

1. Touch input event handler receives all motion events on UI thread
---> converts motion event data into a custom data structure and puts it 
into one queue that belongs to UI thread

2. Simultaneously the game loop / render thread updates the game state and 
checks for input first:
---> It requests the data from touch handler in a thread safe manner 
(synchronized)
---> Touch handler internally swaps motion data queue A with a 
secondary motion data queue B
---> Touch handler returns queue A to game loop
---> Game loop / render thread processes queue data and recycles all motion 
data structures (so they can be re-used in order to avoid garbage 
collection activity)

And that repeats like this and these two queues get always swapped. That 
way you let your game loop determine the pace.

On Thursday, August 1, 2013 4:30:57 AM UTC-5, Edvinas Kilbauskas wrote:
>
> OK, I did that. And yes. It doesn't have the delay anymore! But the 
> problem is... It's Canvas. I don't need canvas, it doesn't fulfill my 
> needs. I need OpenGL.
> What the hell could be wrong? This is REALLY strange. OpenGL ES 1.0 has 
> delay, ES 1.1 has delay, ES 2.0 has delay. Canvas - no delay!
> This should be other way around, because as far as I know canvas uses 
> software rendering, while OpenGL uses hardware, which should be way faster!
> Any more ideas?
>

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




[android-developers] Re: ContentResolver insert return null on 4.3

2013-08-02 Thread Nobu Games
I just had a quick peek at the API level 14 source code and it looks like 
there are two possible reasons for that problem:

1. The actual ContentProvider the ContentResolver connected to returns null 
on insert (for whatever reason, that is a mystery)
2. A RemoteException was thrown during the insert operation. The exception 
is caught by the ContentResolver and it returns just null instead. The 
reason for that is (according to the source code comment) that the process 
/ app is about to die anyway.

Other ContentResolver methods behave exactly the same. Also the query 
methods. It can - without a warning - just return null, even though it 
works in your tests a million times.

You therefore need to check the result for null and come up with a strategy 
for coping with that problem, like scheduling a re-query or checking if 
your activity is about to be finished.

On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:
>
> This code works on all Android versions except on 4.3:
>
>ContentValues content = new ContentValues(4);
> content.put(Video.VideoColumns.TITLE, "vid.mp4");
> content.put(Video.VideoColumns.DATE_ADDED,
> System.currentTimeMillis() / 1000);
> content.put(Video.Media.MIME_TYPE, "video/mp4");
> content.put(MediaStore.Video.Media.DATA, "/sdcard/vid.mp4");
> ContentResolver resolver = getContentResolver();
>* Uri uri = 
> resolver.insert(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,*
> *content);*
>
> On 4.3 *uri *is null.
> Can someone help?
>
> Thanks,
> Eli
>

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




[android-developers] Yet another EGL_BAD_MATCH problem. How to do it the right way? For all devices?

2013-08-02 Thread Nobu Games
I have another rather rare problem with OpenGL ES which has to do with the 
dreaded EGL_BAD_MATCH problem.

I do know that there is a correlation between the following factors that 
yield that problem and make the game crash:

1. The Android device is most of the time rather old with a dated Android 
version (API level 8 to 10)
2. I explicitly set the surface view holder's pixel format to RGB_888
3. I request the following configuration: setEGLConfigChooser(8, 8, 8, 8, 
16, 8); (I have to admit that I probably don't need a 16 bits depth buffer, 
but I do need the 8 bits stencil buffer)

What I have read so far about this problem is the following "silver bullet" 
solution: just create your own config chooser. I get that point. But even 
then developers say on some forums  that it crashes on some devices, so 
apparently it's pretty difficult to find a good matching configuration that 
doesn't make OpenGL ES crash.

How to approach that problem reliably without having all these gazillion 
Android devices at your hands? Is there a good recipe for that, like a 
solid generic implementation of a chooser?

Thanks in advance


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




[android-developers] Re: Do SQLiteDatabase references "go stale"?

2013-08-02 Thread Nobu Games
Oh my... when I think about that, I have a pretty old first generation 
Samsung Galaxy S (I9000). Its internal storage memory seems to be dying and 
quite a few apps behave erratically, including crashes and data loss. 
Sometimes it's stuck in an "infinite" reboot loop. So I'm pretty sure it 
won't last for too long.

I guess these are also probably things to watch out for when talking to 
customers (how old is their phone, do they store data on an external SD 
card, because these things can also break and silently corrupt your data. I 
lost a lot of photos and MP3s because of that :-)

It would be great if there were some system level tool for non-rooted 
devices to make a proper file system and storage integrity check...

On Wednesday, July 31, 2013 5:14:25 PM UTC-5, Kostya Vasilyev wrote:
>
>
>
> On Thursday, August 1, 2013 2:01:29 AM UTC+4, Nathan wrote:
>>
>>
>>  
>>
>>> In older Android versions that error was not treated gracefully and the 
>>> database file could get corrupted. In newer versions you are greeted with 
>>> an exception. When the database file gets corrupted, the default behavior 
>>> of SQLiteDatabase is "silently" dropping the whole database file and 
>>> creating a new one, so basically you start from scratch in such a situation 
>>> and probably your table creation / setup routines kick in and start fresh.
>>>
>>
>> Sounds horrible, and has probably happened to a few unfortunate users.  
>>
>
> Recent Android versions, too, have code to detect database being corrupted 
> and then delete and re-create (the database obviously loses all its data). 
> I see this happen in my app from time to time -- it's *extremely* rare and 
> *extremely* unpleasant to the users. Not sure what the origin of the issue 
> is - bugs in SQLite, or maybe flash memory going bad?
>
> As for not opening the same file, have you considered 
> File#getCanonicalPath?
>
> http://developer.android.com/reference/java/io/File.html#getCanonicalFile()
>
> Not sure if it'll properly resolve all those compatibility and profile 
> specific memory card paths that ICS/JB have, but perhaps it's worth a try?
>
> -- K
>  
>
>

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




[android-developers] Re: Do SQLiteDatabase references "go stale"?

2013-07-31 Thread Nobu Games
Just another related thought: SQLiteDatabase contains some implicit 
"transaction magic" under the hood which is meant to prevent "accidents" 
due to simultaneous accesses from different threads. That does not always 
work that great and can lead to some kind of indefinite deadlock situation. 
You can ease that problem by making sure to only give one thread 
"ownership" of the db connection by letting it open and query the 
connection.

You also must make sure not to open the same database connection multiple 
times. In older Android versions that error was not treated gracefully and 
the database file could get corrupted. In newer versions you are greeted 
with an exception. When the database file gets corrupted, the default 
behavior of SQLiteDatabase is "silently" dropping the whole database file 
and creating a new one, so basically you start from scratch in such a 
situation and probably your table creation / setup routines kick in and 
start fresh.


On Wednesday, July 31, 2013 2:01:33 PM UTC-5, Nathan wrote:
>
>
>
> On Wednesday, July 31, 2013 9:21:59 AM UTC-7, Nobu Games wrote:
>>
>> How are you handling transactions in your queries? 
>
>
> A single record written is done as a single transaction. I believe, 
> though, that the writing part is all done and it is now just reading. No 
> transactions on reading. 
>
>  
>
>> In later versions of Android SQLite writes by default temporary 
>> "journaling" data files that are not immediately merged with the actual 
>> database file (see here: http://www.sqlite.org/tempfiles.html). This 
>> might be an explanation for the reported behavior, see the following quote 
>> from the SQLite documentation:
>>
>> However, if the last connection does not shutdown cleanly, the WAL file 
>>> will remain in the filesystem and will be automatically cleaned up the next 
>>> time the database is opened. 
>>>
>>
> I would expect some blocking on first open after a crash in that 
> situation. 
>  
>
>> Other than that, are you sure the path argument is always the same?
>>
>
> Not completely sure. I want to investigate if there is a possibility of 
> getting two paths that are equivalent, yet don't look the same in a string 
> compare. 
> If so, this code would fail to prevent opening the same file twice in the 
> same process. 
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Do SQLiteDatabase references "go stale"?

2013-07-31 Thread Nobu Games
Just another related thought: SQLiteDatabase contains some implicit 
"transaction magic" under the hood which is meant to prevent "accidents" 
due to simultaneous accesses from different threads. That does not always 
work that great and can lead to some kind of indefinite deadlock situation. 
You can ease that problem by making sure to only give one thread 
"ownership" of the db connection by letting it open and query the 
connection. You could enforce that by implementing a content provider that 
is only used by your app.

You also must make sure not to open the same database connection multiple 
times. In older Android versions that error was not treated gracefully and 
the database file could get corrupted. In newer versions you are greeted 
with an exception. When the database file gets corrupted, the default 
behavior of SQLiteDatabase is "silently" dropping the whole database file 
and creating a new one, so basically you start from scratch in such a 
situation and probably your table creation / setup routines kick in and 
start fresh.




On Wednesday, July 31, 2013 2:01:33 PM UTC-5, Nathan wrote:
>
>
>
> On Wednesday, July 31, 2013 9:21:59 AM UTC-7, Nobu Games wrote:
>>
>> How are you handling transactions in your queries? 
>
>
> A single record written is done as a single transaction. I believe, 
> though, that the writing part is all done and it is now just reading. No 
> transactions on reading. 
>
>  
>
>> In later versions of Android SQLite writes by default temporary 
>> "journaling" data files that are not immediately merged with the actual 
>> database file (see here: http://www.sqlite.org/tempfiles.html). This 
>> might be an explanation for the reported behavior, see the following quote 
>> from the SQLite documentation:
>>
>> However, if the last connection does not shutdown cleanly, the WAL file 
>>> will remain in the filesystem and will be automatically cleaned up the next 
>>> time the database is opened. 
>>>
>>
> I would expect some blocking on first open after a crash in that 
> situation. 
>  
>
>> Other than that, are you sure the path argument is always the same?
>>
>
> Not completely sure. I want to investigate if there is a possibility of 
> getting two paths that are equivalent, yet don't look the same in a string 
> compare. 
> If so, this code would fail to prevent opening the same file twice in the 
> same process. 
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Bizarre OpenGL ES rendering artifact on Nexus 7 with Android 4.3

2013-07-31 Thread Nobu Games
Thanks for the explanation

On Wednesday, July 31, 2013 12:52:14 PM UTC-5, Romain Guy (Google) wrote:
>
>
> glSurfaceView.getHolder().setFormat(PixelFormat.RGBA_);
>>
>
> This gives you a translucent surface, which means that any pixel that is 
> not drawn completely opaque will be blended with whatever window is behind 
> your app. It will affect your performance btw.
>  
>
>> Should I change the surface view format to RGB_888 instead?
>>
>
> Yes, that will fix your problem and improve perfornance.
>  
>
>>
>> Regards,
>>
>> Thomas
>>
>>
>> On Wednesday, July 31, 2013 12:13:51 PM UTC-5, Romain Guy (Google) wrote:
>>>
>>> Is your SurfaceView marked with the transparent pixel format? If so, 
>>> what you are seeing would be expected. If your SurfaceView is opaque then 
>>> you *must* draw every pixel opaque on screen.
>>>
>>>
>>> On Wed, Jul 31, 2013 at 8:25 AM, Nobu Games wrote:
>>>
>>>> I got a big problem with a game of mine and the latest version of 
>>>> Android. Semi-transparent pixels rendered on the OpenGL ES surface let the 
>>>> underlying activity shine through as following screen shot shows.
>>>>
>>>> This problem only appears in a new "AppGratis" promoted version of the 
>>>> game I just released this morning and here is the really bizarre thing: 
>>>> ONLY the APK downloaded from Google Play has this problem. When I install 
>>>> the same APK that is locally stored on my computer via adb I do not have 
>>>> this problem.
>>>> I re-installed the Google Play version multiple times and the rendering 
>>>> artifact is always reproducible.
>>>>
>>>> It looks like Google Play alters the APK or maybe it is incorrectly 
>>>> installed on the device. However, I do not even know what may trigger that 
>>>> "shine through" effect. Any help (especially from Google) appreciated.
>>>>
>>>>
>>>>
>>>> <https://lh5.googleusercontent.com/-dHoFBBlJjUo/UfkqiTWOIAI/ADc/PZDIZTdKawQ/s1600/device-2013-07-31-100411.png>
>>>>  
>>>> -- 
>>>> -- 
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to android-d...@**googlegroups.com
>>>> To unsubscribe from this group, send email to
>>>> android-developers+**unsubscr...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Android Developers" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to android-developers+**unsubscr...@googlegroups.com.
>>>> For more options, visit 
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>  
>>>>  
>>>>
>>>
>>>
>>>
>>> -- 
>>> Romain Guy
>>> Android framework engineer
>>> roma...@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-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Romain Guy
> Android framework engineer
> roma...@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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Bizarre OpenGL ES rendering artifact on Nexus 7 with Android 4.3

2013-07-31 Thread Nobu Games
Hi Romain,

thanks for your reply. It seems I do not understand the surface view 
initialization for making the alpha channel within OpenGL ES work. I set up 
the surface view with:

glSurfaceView.getHolder().setFormat(PixelFormat.RGBA_);

The game is already out with that surface view setup since May and nobody 
complained about the graphics so far. It also got reviewed with screen 
shots and videos and so on and this artifact is nowhere to be seen.

I also do not understand why there is a difference in rendering between the 
APK downloaded through Google Play and the exact same APK locally installed 
via adb.

Should I change the surface view format to RGB_888 instead?

Regards,

Thomas


On Wednesday, July 31, 2013 12:13:51 PM UTC-5, Romain Guy (Google) wrote:
>
> Is your SurfaceView marked with the transparent pixel format? If so, what 
> you are seeing would be expected. If your SurfaceView is opaque then you 
> *must* draw every pixel opaque on screen.
>
>
> On Wed, Jul 31, 2013 at 8:25 AM, Nobu Games 
> > wrote:
>
>> I got a big problem with a game of mine and the latest version of 
>> Android. Semi-transparent pixels rendered on the OpenGL ES surface let the 
>> underlying activity shine through as following screen shot shows.
>>
>> This problem only appears in a new "AppGratis" promoted version of the 
>> game I just released this morning and here is the really bizarre thing: 
>> ONLY the APK downloaded from Google Play has this problem. When I install 
>> the same APK that is locally stored on my computer via adb I do not have 
>> this problem.
>> I re-installed the Google Play version multiple times and the rendering 
>> artifact is always reproducible.
>>
>> It looks like Google Play alters the APK or maybe it is incorrectly 
>> installed on the device. However, I do not even know what may trigger that 
>> "shine through" effect. Any help (especially from Google) appreciated.
>>
>>
>>
>> <https://lh5.googleusercontent.com/-dHoFBBlJjUo/UfkqiTWOIAI/ADc/PZDIZTdKawQ/s1600/device-2013-07-31-100411.png>
>>  
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Romain Guy
> Android framework engineer
> roma...@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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




  1   2   3   4   >