[android-developers] Programmatic Hotspot / AP creation in 7.1

2016-12-19 Thread Jason Ernst
I have noticed that in 7.1 hotspot creation programmatically no longer 
works like in the older versions (works well from 4.x - 7.0). I have been 
using this library: https://github.com/mvdan/accesspoint which uses the 
reflection api to expose the hotspot creation functions. I know this isn't 
an officially supported method, but it has worked well up until 7.1

I am finding when looking through the console information that there was 
some error with dnsmasq when the hotspot was created, however this error is 
no longer being updated after subsequent updates to 7.1. I was wondering if 
the ability to create a hotspot using the reflection API is no longer 
supported, or if there is some parameter being missed?

Any suggestions are appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/3c1f83a6-4207-4441-a428-6aa4d1c1f3ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Meta: Changes to new-user moderation policy

2016-09-01 Thread Jason Atwood
How easy is it to delete a spam account from the admin console? Single 
button click? If it's easy, I'll volunteer to be an admin just to help with 
the spam. If a few other people did this too I bet we could have it down to 
zero in no time.

On Wednesday, August 31, 2016 at 1:18:44 PM UTC-4, Streets Of Boston wrote:
>
> Please, make this group moderated again or figure something out to weed 
> out all the spam, rants and job-postings. 
>
> This group has been basically useless. 
> Finding actual questions to answer is near impossible.
> Posting your own question will get drowned out in a sea of spam a second 
> later.
>
> Thank you,
> --- Anton.
>
> On Monday, November 30, 2015 at 6:28:00 PM UTC-5, Trevor Johns wrote:
>>
>> *As of today, new members to this group are able to post immediately, 
>> without being subject to moderator approval.*
>>
>> Previously, posts from new members to this group would be held for 
>> moderation. However, with the addition of Stack Overflow and Google+ as 
>> popular discussion mediums, it's been difficult to find volunteer 
>> moderators. As a result, the moderation queue has been showing signs of 
>> neglect -- which means that new posts just aren't getting through.
>>
>> To address this, effective immediately, I've removed the moderation 
>> restriction for new members.
>>
>> While this means that some spam may get through, this is necessary in 
>> order to keep this group functioning properly going forward. If you do see 
>> spam, simply report it through the Google Groups web UI. (Click on "Report 
>> Abuse" next to the "Reply" button.) For larger/urgent issues, you can also 
>> contact the group owners via email: 
>> https://groups.google.com/forum/#!contactowner/android-developers
>>
>> -- 
>> Trevor Johns
>> Google Developer Programs, Android
>> http://developer.android.com
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/0e27c1a0-b710-4cdf-aea3-be48bd50b85a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] I'm getting a ClassNotFoundException from play services lib when using Proguard

2016-08-22 Thread Jason Atwood
I just turned on ProGuard on my build and now I'm getting a 

java.lang.ClassNotFoundException: Didn't find class 
"com.google.android.gms.chimera.GmsModuleInitializer" on path: 
DexPathList[[zip file 
"/system/app/PlayGames.apk"],nativeLibraryDirectories=[/vendor/lib, 
/system/lib]]


If I understand from the docs all that I need to use Proguard with Play 
Services should be included by the Android Gradle plugin:

*Note: ProGuard directives are included in the Play services client 
libraries to preserve the required classes. The Android Plugin for Gradle 
 
automatically appends ProGuard configuration files in an AAR (Android 
ARchive) package and appends that package to your ProGuard configuration. 
During project creation, Android Studio automatically creates the ProGuard 
configuration files and build.gradle properties for ProGuard use. To use 
ProGuard with Android Studio, you must enable the ProGuard setting in your 
build.gradle buildTypes. For more information, see the ProGuard 
 guide.*

This the important part of my app module build.gradle file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
...
}
...
buildTypes {
release {
signingConfig signingConfigs.releaseConfig
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
qa {
signingConfig signingConfigs.releaseConfig
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
debug {
applicationIdSuffix ".debug"
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}


dependencies {
...

//google play services
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'
}



This is my top level build.gradle file:


// Top-level build file where you can add configuration options common to all 
sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}

allprojects {
repositories {
jcenter()
mavenCentral()
}
}


What am I missing?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/5a7dbbf9-602a-43a3-ac6a-cfa9b7d1fecb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Checking new app version from Google playstore programatically

2016-08-11 Thread Jason Christian
Hello,

I'm currently developing an Android App and one of the feature of the app 
is to check for available new version programatically from Google playstore 
and inform the user if there's a new version available. I am currently 
using JSOUP to retrieve the app page's HTML content and look for the tag 
"itemprop=softwareVersion". I could then compare the version code within 
the HTML tag with the one I have on the device.

One of the examples: 
http://stackoverflow.com/questions/25201349/programmatically-check-play-store-for-app-updates

Unfortunately, when I checked the app's playstore page's HTML source code, 
I didn't find any div tag that contains "itemprop=softwareVersion" in the 
source code, which means that the example cannot be used anymore. Is it 
true that Google changed the playstore page's source code?
If so, can you suggest any other way to programatically check for available 
new version from google playstore?

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/ce2e107a-99fd-44b8-8d67-45b994e80b72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Mobile App Development facts

2016-08-09 Thread Jason Adams
Here are some facts about mobile app development...https://goo.gl/AoWmEI

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/79f3d40a-1a8b-4e6b-9640-d22fcf59c075%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Can i get wifi beacon information

2016-07-04 Thread Jason zhao
Dear,all.
I want to obtain wifi beacon information from wifi searched result,who can help 
me.Thx.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/73547913-65AA-4397-A429-2C8DECF2C82F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Published app icon issue [URGENT]

2016-06-24 Thread Jason Flanagan
Did you make sure that the icon image is included in your project? Make 
sure you change the icon to the correct filename of your image in the 
manifest. See 
http://stackoverflow.com/questions/26615889/how-to-change-the-launcher-logo-of-an-app-in-android-studio
 
for clarification.

-JF

On Monday, June 20, 2016 at 10:15:29 PM UTC-4, nely...@gmail.com wrote:
>
> Published an app to Google Play. Everything is fine except that the icon 
> and name of the app thumbnail, once downloaded, isn't what I set it to be. 
> I made an old version of the app code, and thought the APK I uploaded is 
> under the right name, it shows that old name. I haven't used that old name 
> file for weeks. The launch icon picture isn't the one I uploaded, it's just 
> an android picture.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/9ca48a0c-8c46-43db-a29a-33c093517fca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Unexpected Cast To Button

2016-06-16 Thread Jason Flanagan
To reference your button in your MainActivity class as in your original 
post. In your activity_main.xml you should have something like this...



it appears as though this id was under an ImageView tag rather than a 
button tag.

-JF


On Thursday, June 16, 2016 at 7:41:06 AM UTC-4, Rajdeep Roy wrote:
>
> Done ! but no R file and no errors are showing up as well !!
>
> On Thursday, June 16, 2016 at 5:03:40 PM UTC+5:30, sardar khan wrote:
>>
>> Rebuild the Project 
>>
>> On Thu, Jun 16, 2016 at 4:15 PM, Rajdeep Roy  wrote:
>>
>>> Hi, 
>>> I put off the code with Imageview and the Button code is intact and it 
>>> does not error now BUT the R file is missing now from the java folder
>>> What to do with that?
>>>
>>> On Thursday, June 16, 2016 at 4:31:34 PM UTC+5:30, Rajdeep Roy wrote:

 @Sardar - Do u mean check out the "MainActivity.xml" ?? 

 On Thursday, June 16, 2016 at 4:28:58 PM UTC+5:30, sardar khan wrote:
>
> it shows that the in xml layout the id refer to ImageView kindly check 
> the layout 
>
> On Thu, Jun 16, 2016 at 3:45 PM, Rajdeep Roy  
> wrote:
>
>> Hello Everyone, 
>> I am new to Android Programming and I am stuck at a point where it 
>> shows up "Unexpected Cast to the Button" 
>> I am attaching screenshot of my existing codes, kindly have a look at 
>> it. 
>> If required I can provide the sample codes as well. 
>> I look forward with some positive responses. 
>> Thanks & Regards
>>
>> -- 
>>
>>
> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Android Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to android-developers+unsubscr...@googlegroups.com.
>>> To post to this group, send email to android-d...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/android-developers.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/android-developers/0470d742-f7e3-478b-8c2b-194de325bab2%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/337578da-0d25-4250-bca4-d2e644976cf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Screenshort in android studio.

2016-06-11 Thread Jason Flanagan
This, 
http://stackoverflow.com/questions/2661536/how-to-programmatically-take-a-screenshot-in-android,
 
seems to be a good place to start.

-JF

On Thursday, June 9, 2016 at 8:53:10 AM UTC-4, Gulwant gill wrote:
>
> Hi,
>
> Can you guys please tell me how can i take *screenshot of a specific 
> object* in my app by pressing a button and save it.
>
> I have created a image and you can add any text on it.After adding text i 
> have to take screenshot of that object with the text.Please help me with 
> this...!
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/313cef3c-0836-4d91-b375-2c39f18b74b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Launcher / Home Screen Bookmark List

2016-06-01 Thread jason . jaegers
I currently working on a launcher and I am trying to access a list of the 
bookmarks or web shortcuts that a user has clicked "add to home screen" in 
Chrome... there has to be some way to pull up this list so my launcher can 
support those home screen bookmarks as well.  I have search Google to no 
end and I can't find anything in the documentation about this... 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1c977c24-0fd5-4162-a1a0-0596648699d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Home screen shortcut list... similar to packagemanager?

2016-04-11 Thread jason . jaegers
I am working on a launcher and looking to access a list of internet 
shortcuts that the user has added to their home screen using the "Add to 
Home Screen" option in Chrome.  I can't seem to track down any 
documentation on how to access these shortcuts!  Does anyone have any 
samples or links to documentation that describes how to access this 
information?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/f38bdb8c-d78c-442e-a95a-ff3f523011e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] uploading APK

2016-03-29 Thread Jason Garza
I just had my app language translated into 3 languages.  How do I change 
the languages for the store listing in the desired stores?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/8bad3be7-7669-4d5f-9303-6283d6a0b9c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] AN AWESOME APP

2016-02-15 Thread Jason Bakthakumar


Hey guys, I've created a new app called *"Unite - Note Messenger"*. It 
helps you to *create, collect and share *notes and reminders. It also has 
an inbuilt *messenger *so that you can chat with your friends for free. You 
can also *send files *of any kind(eg: .docx, .pdf, .ppt, .xls etc). There 
are many more features of the app.*Please download the app and share it 
with your friends.* Thanks for your support guys. *Please check it out.*

*https://play.google.com/store/apps/details?id=jasonbakthakumar.unite 
*

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/f0f4a704-3e87-41e4-a926-70656fd77f86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: PNG loading that doesn't premultiply alpha?

2013-09-03 Thread Jason
For the benefit of anyone else finding themselves here.

The solution outlined here worked for me:

http://gamedev.stackexchange.com/questions/53638/android-loading-bitmaps-without-premultiplied-alpha-opengl-es-2-0

My actual implementation differs slightly from the description on gamedev 
because I was already multiplying the texture color by two different 
variable color vectors (one for the *sprite* and another global color).

Because of this I ended up passing separate *alpha* value to the shader(s) 
and forcing the alpha value on the variable colors to 1.0f.

In the end, my fragment shader looks like this:

varying float v_Alpha; // Independent alpha value to account for 
premultiplied alpha values in PNG files
...
gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * u_Color * v_Color * 
v_Alpha;

u_Color is a uniform color, v_Color is variable (for the sprite) and 
v_Alpha is the single float value for alpha.

This means I can use:

GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE_MINUS_SRC_ALPHA);

Which accounts for the premultiplied alpha values in the PNG.

The upshot is I can continue to use the BitmapFactory to load the textures.

I can't be sure, but I suspect the artifacts I was seeing were as result of 
NOT using pre-multiplied alpha textures.

Still not sure what the blur on the textures was caused by when using 
GL_CLAMP_TO_EDGE :/

Peace out.

On Monday, September 2, 2013 6:45:23 PM UTC-7, Jason wrote:

 P.S.  It turns out the *blur* is from using GL_CLAMP_TO_EDGE.  Changing 
 to GL_REPEAT removes the blur even though it doesn't really make sense to 
 repeat the texture as I'm just rendering sprites as quads (triangle pairs).

 On Monday, September 2, 2013 6:29:17 PM UTC-7, Jason wrote:


 On Monday, September 2, 2013 6:23:43 PM UTC-7, Jason wrote:

 I realize this is an old thread, but I'm having the same issue and the 
 above solutions haven't worked for me.

 Firstly the link to the PNGDecoder from libgdx is old and no longer 
 exists (libgdx appear to have re-vamped the way they load images and 
 tracking down where exactly the PNG decoding happens is a bit of a 
 nightmare)

 I tried directly calling GLES20.glTexImage2D using the pixels extracted 
 from the Bitmap (as described above), but I still get gray artifacts on the 
 edges of the texture.

 For example:

 The top image is the original PNG, the bottom is after rendering (taken 
 from screenshot)


 https://lh6.googleusercontent.com/-Dyf568n0gD4/UiU4vJP80wI/CsY/ygEOOrLYBao/s1600/cloud_text_problem.png

 The bottom image has gray pixel artifacts around the edge.  It's also 
 sort of *blurry* which I can't work out either.

 I tried manually decoding the PNG using this:

 http://wiki.l33tlabs.org/bin/view/TWL/Using+the+TWL+PNGDecoder

 But got the same result.

 I'm creating the texture with:

 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, 
 GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);
 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, 
 GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);
 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, 
 GLES20.GL_CLAMP_TO_EDGE);
 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, 
 GLES20.GL_CLAMP_TO_EDGE);

 My fragment shader is pretty basic, just multiplies the texture color by 
 a couple of other color values I pass in:

 gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * u_Color * v_Color;

 Does anyone have a clue as to:

 1) How I can render/create the texture without the artifacts
 2) Why the texture is kind of blurry once it's rendered.

 Thanks!


 On Sunday, September 2, 2012 11:43:59 AM UTC-7, arberg wrote:

 Hi,

 I think it would make sense that either Bitmap could be without 
 premultiplied alpha, or GLUtils.texImage2D method could take as parameter 
 whether to load with or without premultiplied alpha. Since you say Bitmaps 
 will never be without premultiplied alpa, I suggest the latter, plus as 
 you 
 suggest a convenience method on the Bitmap, which returns its content in 
 an 
 array without premultiplied alpha.

 It makes sense to me to add the option to GLUtils.texImage2D since the 
 very purpose of the GLUtils class is '... to help bridging OpenGL ES and 
 Android APIs.' (javadoc class reference).

 Cheers Alex

 On Friday, 29 June 2012 21:18:59 UTC+2, Romain Guy (Google) wrote:

 Another big issue similar to alpha-premultiply is that 32Bit ARGB 
 Images are changed
 to 16Bit after scaling (especially if all alpha values are 255), 
 without some dirty tricks.
 This is a big issue to, it's far away from the precission needed for 
 good normal mapping.


 There was a bug in the scaling code that I fixed. a 32 bits image will 
 now always be scaled to another 32 bits image.
  


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

Re: [android-developers] Re: PNG loading that doesn't premultiply alpha?

2013-09-02 Thread Jason
I realize this is an old thread, but I'm having the same issue and the 
above solutions haven't worked for me.

Firstly the link to the PNGDecoder from libgdx is old and no longer exists 
(libgdx appear to have re-vamped the way they load images and tracking down 
where exactly the PNG decoding happens is a bit of a nightmare)

I tried directly calling GLES20.glTexImage2D using the pixels extracted 
from the Bitmap (as described above), but I still get gray artifacts on the 
edges of the texture.

For example:

The top image is the original PNG, the bottom is after rendering (taken 
from screenshot)

https://lh6.googleusercontent.com/-Dyf568n0gD4/UiU4vJP80wI/CsY/ygEOOrLYBao/s1600/cloud_text_problem.png

The bottom image has gray pixel artifacts around the edge.  It's also sort 
of *blurry* which I can't work out either.

I tried manually decoding the PNG using this:

http://wiki.l33tlabs.org/bin/view/TWL/Using+the+TWL+PNGDecoder

But got the same result.

I'm creating the texture with:

GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, 
GLES20.GL_LINEAR);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, 
GLES20.GL_LINEAR);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, 
GLES20.GL_CLAMP_TO_EDGE);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, 
GLES20.GL_CLAMP_TO_EDGE);

My fragment shader is pretty basic, just multiplies the texture color by a 
couple of other color values I pass in:

gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * u_Color * v_Color;

Does anyone have a clue as to:

1) How I can render/create the texture without the artifacts
2) Why the texture is kind of blurry once it's rendered.

Thanks!


On Sunday, September 2, 2012 11:43:59 AM UTC-7, arberg wrote:

 Hi,

 I think it would make sense that either Bitmap could be without 
 premultiplied alpha, or GLUtils.texImage2D method could take as parameter 
 whether to load with or without premultiplied alpha. Since you say Bitmaps 
 will never be without premultiplied alpa, I suggest the latter, plus as you 
 suggest a convenience method on the Bitmap, which returns its content in an 
 array without premultiplied alpha.

 It makes sense to me to add the option to GLUtils.texImage2D since the 
 very purpose of the GLUtils class is '... to help bridging OpenGL ES and 
 Android APIs.' (javadoc class reference).

 Cheers Alex

 On Friday, 29 June 2012 21:18:59 UTC+2, Romain Guy (Google) wrote:

 Another big issue similar to alpha-premultiply is that 32Bit ARGB Images 
 are changed
 to 16Bit after scaling (especially if all alpha values are 255), without 
 some dirty tricks.
 This is a big issue to, it's far away from the precission needed for 
 good normal mapping.


 There was a bug in the scaling code that I fixed. a 32 bits image will 
 now always be scaled to another 32 bits image.
  


 -- 
 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] Re: PNG loading that doesn't premultiply alpha?

2013-09-02 Thread Jason
Here's a zoomed in version of the image showing the artifacts more clearly:
http://cl.ly/image/3z1c2d0i2E3N/Screen%20Shot%202013-09-02%20at%206.27.41%20PM.png


On Monday, September 2, 2013 6:23:43 PM UTC-7, Jason wrote:

 I realize this is an old thread, but I'm having the same issue and the 
 above solutions haven't worked for me.

 Firstly the link to the PNGDecoder from libgdx is old and no longer exists 
 (libgdx appear to have re-vamped the way they load images and tracking down 
 where exactly the PNG decoding happens is a bit of a nightmare)

 I tried directly calling GLES20.glTexImage2D using the pixels extracted 
 from the Bitmap (as described above), but I still get gray artifacts on the 
 edges of the texture.

 For example:

 The top image is the original PNG, the bottom is after rendering (taken 
 from screenshot)


 https://lh6.googleusercontent.com/-Dyf568n0gD4/UiU4vJP80wI/CsY/ygEOOrLYBao/s1600/cloud_text_problem.png

 The bottom image has gray pixel artifacts around the edge.  It's also sort 
 of *blurry* which I can't work out either.

 I tried manually decoding the PNG using this:

 http://wiki.l33tlabs.org/bin/view/TWL/Using+the+TWL+PNGDecoder

 But got the same result.

 I'm creating the texture with:

 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, 
 GLES20.GL_LINEAR);
 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, 
 GLES20.GL_LINEAR);
 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, 
 GLES20.GL_CLAMP_TO_EDGE);
 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, 
 GLES20.GL_CLAMP_TO_EDGE);

 My fragment shader is pretty basic, just multiplies the texture color by a 
 couple of other color values I pass in:

 gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * u_Color * v_Color;

 Does anyone have a clue as to:

 1) How I can render/create the texture without the artifacts
 2) Why the texture is kind of blurry once it's rendered.

 Thanks!


 On Sunday, September 2, 2012 11:43:59 AM UTC-7, arberg wrote:

 Hi,

 I think it would make sense that either Bitmap could be without 
 premultiplied alpha, or GLUtils.texImage2D method could take as parameter 
 whether to load with or without premultiplied alpha. Since you say Bitmaps 
 will never be without premultiplied alpa, I suggest the latter, plus as you 
 suggest a convenience method on the Bitmap, which returns its content in an 
 array without premultiplied alpha.

 It makes sense to me to add the option to GLUtils.texImage2D since the 
 very purpose of the GLUtils class is '... to help bridging OpenGL ES and 
 Android APIs.' (javadoc class reference).

 Cheers Alex

 On Friday, 29 June 2012 21:18:59 UTC+2, Romain Guy (Google) wrote:

 Another big issue similar to alpha-premultiply is that 32Bit ARGB Images 
 are changed
 to 16Bit after scaling (especially if all alpha values are 255), 
 without some dirty tricks.
 This is a big issue to, it's far away from the precission needed for 
 good normal mapping.


 There was a bug in the scaling code that I fixed. a 32 bits image will 
 now always be scaled to another 32 bits image.
  


 -- 
 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] Re: PNG loading that doesn't premultiply alpha?

2013-09-02 Thread Jason
P.S.  It turns out the *blur* is from using GL_CLAMP_TO_EDGE.  Changing to 
GL_REPEAT removes the blur even though it doesn't really make sense to 
repeat the texture as I'm just rendering sprites as quads (triangle pairs).

On Monday, September 2, 2013 6:29:17 PM UTC-7, Jason wrote:


 On Monday, September 2, 2013 6:23:43 PM UTC-7, Jason wrote:

 I realize this is an old thread, but I'm having the same issue and the 
 above solutions haven't worked for me.

 Firstly the link to the PNGDecoder from libgdx is old and no longer 
 exists (libgdx appear to have re-vamped the way they load images and 
 tracking down where exactly the PNG decoding happens is a bit of a 
 nightmare)

 I tried directly calling GLES20.glTexImage2D using the pixels extracted 
 from the Bitmap (as described above), but I still get gray artifacts on the 
 edges of the texture.

 For example:

 The top image is the original PNG, the bottom is after rendering (taken 
 from screenshot)


 https://lh6.googleusercontent.com/-Dyf568n0gD4/UiU4vJP80wI/CsY/ygEOOrLYBao/s1600/cloud_text_problem.png

 The bottom image has gray pixel artifacts around the edge.  It's also 
 sort of *blurry* which I can't work out either.

 I tried manually decoding the PNG using this:

 http://wiki.l33tlabs.org/bin/view/TWL/Using+the+TWL+PNGDecoder

 But got the same result.

 I'm creating the texture with:

 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, 
 GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);
 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, 
 GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);
 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, 
 GLES20.GL_CLAMP_TO_EDGE);
 GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, 
 GLES20.GL_CLAMP_TO_EDGE);

 My fragment shader is pretty basic, just multiplies the texture color by 
 a couple of other color values I pass in:

 gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * u_Color * v_Color;

 Does anyone have a clue as to:

 1) How I can render/create the texture without the artifacts
 2) Why the texture is kind of blurry once it's rendered.

 Thanks!


 On Sunday, September 2, 2012 11:43:59 AM UTC-7, arberg wrote:

 Hi,

 I think it would make sense that either Bitmap could be without 
 premultiplied alpha, or GLUtils.texImage2D method could take as parameter 
 whether to load with or without premultiplied alpha. Since you say Bitmaps 
 will never be without premultiplied alpa, I suggest the latter, plus as you 
 suggest a convenience method on the Bitmap, which returns its content in an 
 array without premultiplied alpha.

 It makes sense to me to add the option to GLUtils.texImage2D since the 
 very purpose of the GLUtils class is '... to help bridging OpenGL ES and 
 Android APIs.' (javadoc class reference).

 Cheers Alex

 On Friday, 29 June 2012 21:18:59 UTC+2, Romain Guy (Google) wrote:

 Another big issue similar to alpha-premultiply is that 32Bit ARGB 
 Images are changed
 to 16Bit after scaling (especially if all alpha values are 255), 
 without some dirty tricks.
 This is a big issue to, it's far away from the precission needed for 
 good normal mapping.


 There was a bug in the scaling code that I fixed. a 32 bits image will 
 now always be scaled to another 32 bits image.
  


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


[android-developers] Re: Cannot get the initial SDK setup working, nightmare

2013-04-29 Thread Jason Painter
I'm trying to do the same thing. I have the device created but it never 
seems to start. How long is a while? I see the device but it just sits 
there with like an Android load screen.
Thanks
 

On Saturday, April 13, 2013 8:13:35 AM UTC-5, Dave Truby wrote:

 Using the AVD tool (inside Eclipse, menu Window - Android Virtual 
 Device Manager), create at least one virtual device. See 
 http://developer.android.com/tools/devices/index.html

 After you have a virtual device created, start it by selecting it in the 
 list (in AVD manager) then click the Start button. Note: depending on 
 your computer, it may take a while for the emulator to start.

 After you see the emulator window and the android virtual device is fully 
 booted, click around to see how it works (it is slightly different than a 
 real device).

 With the emulator running, right click on your android project and select 
 Run as - Android application. You may be asked to select a device 
 (pick the AVD you just created).

 I find it easier to run my android project on my phone (connected via 
 usb). See http://developer.android.com/tools/device.html

  

 On Sunday, March 31, 2013 7:46:15 AM UTC-4, NewToAndroid wrote:

 Hi All,

 I am on a Windows Vista (32 bit) laptop, using Java version 1.6.0_29. I 
 downloaded the Android SDK ADT Bundle from developer.android.com. I am 
 under impression that, I need not do any other setup/installation when I am 
 using the bundle. Using a Windows account which is administrator. Created 
 the basic Hallo World App which is shown here 
 http://developer.android.com/training/basics/firstapp/creating-project.html; 
 . Now trying to run it on emulator, which is proving to be a nightmare (so 
 much so that, I am on the verge of giving up learning Android development).
 1) When I run the application, should the emulator be already running? or 
 Eclipse will start it?
 2) When I click on Run - Run or Run - Run as - Android 
 Application, nothing happens, no prompts, no messages on console, nothing. 
 I am not sure if I should wait for something to happen or there is 
 something missing?
 3) Emulator is already running. Clicked on Run - Run. Nothing happened

 Are there any configurations, parameters, which need to be done before I 
 try to run the project?

 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] GC calls from other processes causing slowdown (?)

2013-03-31 Thread Jason
Hey folks,

So I'm in the midst of creating a game and I'm hitting some occasional slow 
down which seems to be a result of GC calls triggered by other processes 
on the device.  I have profiled *my* app and am 100% certain there are no 
allocations going on while the game is running, but in certain 
circumstances (i.e. most of the time) logcat is spewing out GC_CONCURRENT 
freed...blah blah entries.  Here's a typical output from the console:

03-30 23:58:58.868: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8758K/9224K, paused 5ms+3ms, total 29ms
03-30 23:59:05.970: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 408K, 6% free 
8757K/9228K, paused 4ms+2ms, total 30ms
03-30 23:59:13.063: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9224K, paused 4ms+4ms, total 33ms
03-30 23:59:20.142: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9228K, paused 5ms+3ms, total 30ms
03-30 23:59:27.227: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9224K, paused 6ms+2ms, total 31ms
03-30 23:59:34.306: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9232K, paused 4ms+2ms, total 23ms
03-30 23:59:41.392: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9224K, paused 4ms+2ms, total 27ms
03-30 23:59:48.470: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9232K, paused 5ms+2ms, total 30ms

Now I have no idea which processes are to blame, but I did notice that when 
other events on the device occur it can lead to a spike in (I assume) CPU 
usage which causes a visible drop in frame rate in the game.

For example my wifi connection dropped out one time and the logs went crazy 
with other processes complaining about a lost connection and trying 
desperately to tell me about it.  This caused a fairly severe jolt in the 
game dropping the frame rate from 60fps to around 20fps for about a minute 
while everything settled down and got on with things.

I had noted on a previous 
threadhttps://groups.google.com/forum/?fromgroups=#!searchin/android-developers/Garbage$20collector$20suspend/android-developers/85yj9CZEqH4/YIiElemqiuoJa
 statement from Dianne Hackborn:

*as of 1.6 such GCs in a background process can not together take more 
than ~10% of the CPU from any foreground process that wants to run.*

This sounds good, but I'm wondering if this is still the case as of 4.2.2? 
 I am seeing behavior that appears to indicate this may not the case.

Is there anything I can do to ensure other processes are not using more 
than 10% of CPU (or any number really)?  Or some other 
restrictions/priorities that might help alleviate this external resource 
usage?

Thanks,

Jason.

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: GC calls from other processes causing slowdown (?)

2013-03-31 Thread Jason Polites
I'm 90% sure it wasn't, but I make this claim based on profiling heap
allocations and I don't think I confirmed that the process ID was actually
different. I'll confirm (or otherwise) this and post back.
On Mar 31, 2013 2:52 AM, RichardC richard.crit...@googlemail.com wrote:

 Is/was 2590 your process?

 On Sunday, March 31, 2013 8:07:50 AM UTC+1, Jason wrote:

 Hey folks,

 So I'm in the midst of creating a game and I'm hitting some occasional
 slow down which seems to be a result of GC calls triggered by other
 processes on the device.  I have profiled *my* app and am 100% certain
 there are no allocations going on while the game is running, but in certain
 circumstances (i.e. most of the time) logcat is spewing out GC_CONCURRENT
 freed...blah blah entries.  Here's a typical output from the console:

 03-30 23:58:58.868: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8758K/9224K, paused 5ms+3ms, total 29ms
 03-30 23:59:05.970: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 408K, 6%
 free 8757K/9228K, paused 4ms+2ms, total 30ms
 03-30 23:59:13.063: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9224K, paused 4ms+4ms, total 33ms
 03-30 23:59:20.142: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9228K, paused 5ms+3ms, total 30ms
 03-30 23:59:27.227: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9224K, paused 6ms+2ms, total 31ms
 03-30 23:59:34.306: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9232K, paused 4ms+2ms, total 23ms
 03-30 23:59:41.392: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9224K, paused 4ms+2ms, total 27ms
 03-30 23:59:48.470: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9232K, paused 5ms+2ms, total 30ms

 Now I have no idea which processes are to blame, but I did notice that
 when other events on the device occur it can lead to a spike in (I
 assume) CPU usage which causes a visible drop in frame rate in the game.

 For example my wifi connection dropped out one time and the logs went
 crazy with other processes complaining about a lost connection and trying
 desperately to tell me about it.  This caused a fairly severe jolt in the
 game dropping the frame rate from 60fps to around 20fps for about a minute
 while everything settled down and got on with things.

 I had noted on a previous 
 threadhttps://groups.google.com/forum/?fromgroups=#!searchin/android-developers/Garbage$20collector$20suspend/android-developers/85yj9CZEqH4/YIiElemqiuoJa
  statement from Dianne Hackborn:

 *as of 1.6 such GCs in a background process can not together take more
 than ~10% of the CPU from any foreground process that wants to run.*

 This sounds good, but I'm wondering if this is still the case as of
 4.2.2?  I am seeing behavior that appears to indicate this may not the case.

 Is there anything I can do to ensure other processes are not using more
 than 10% of CPU (or any number really)?  Or some other
 restrictions/priorities that might help alleviate this external resource
 usage?

 Thanks,

 Jason.

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




Re: [android-developers] Re: GC calls from other processes causing slowdown (?)

2013-03-31 Thread Jason Polites
 pages for JIT: 11
03-31 11:46:18.024: INFO/dalvikvm(16714): Total arena pages for JIT: 12
03-31 11:46:18.024: INFO/dalvikvm(16714): Total arena pages for JIT: 13
03-31 11:46:18.024: INFO/dalvikvm(16714): Total arena pages for JIT: 14
03-31 11:46:18.024: INFO/dalvikvm(16714): Total arena pages for JIT: 15
03-31 11:46:18.024: INFO/dalvikvm(16714): Total arena pages for JIT: 16
03-31 11:46:18.024: INFO/dalvikvm(16714): Total arena pages for JIT: 17
03-31 11:46:18.071: DEBUG/dalvikvm(16714): GC_CONCURRENT freed 940K, 11%
free 9232K/10268K, paused 2ms+3ms, total 33ms
03-31 11:46:18.493: INFO/dalvikvm(16714): Total arena pages for JIT: 18
03-31 11:46:20.657: DEBUG/dalvikvm(16758): GC_CONCURRENT freed 432K, 6%
free 8749K/9268K, paused 4ms+7ms, total 33ms
03-31 11:46:27.704: DEBUG/dalvikvm(16758): GC_CONCURRENT freed 383K, 6%
free 8774K/9236K, paused 2ms+1ms, total 23ms
03-31 11:46:29.008: DEBUG/dalvikvm(16714): GC_CONCURRENT freed 354K, 8%
free 9286K/10088K, paused 3ms+3ms, total 31ms

When this was recorded, the process ID for my process was 16810 (
http://cl.ly/image/1X0I3e2W423k).  Most (although interestingly not all) of
the above logs are for process ID 16714 which we can see is actually the
Mint app.  Not only is it hammering the GC but it also seems to be doing
database migrations :/

This is all fine IF it runs in a resource limited space (i.e. limited CPU,
RAM  Disk) but it appears to not be the case as either one or all of these
resources may be blocking causing lag in the game.

Not sure what the 16758 process is.

This is just a small sample (covering about 10 seconds) of an otherwise
much larger log with several GC calls.

Is anyone able to shed some light on whether this is expected/normal
behavior, or if there's anything that can be done to mitigate?

Thanks.

P.S.  I don't see the same behavior on older 2.3 devices, but this is not a
very controlled experiment as the older devices tend not to have many apps
whereas the newer (4.2.2) device (which is a Galaxy Nexus btw) is my every
day device so has more apps.


On Sun, Mar 31, 2013 at 9:42 AM, Anthony Prieur anthony.pri...@gmail.comwrote:

 The frame drop looks huge as since Gingerbread the GC is clamied to work
 concurrently.


 On Sun, Mar 31, 2013 at 4:38 PM, Jason Polites jason.poli...@gmail.comwrote:

 I'm 90% sure it wasn't, but I make this claim based on profiling heap
 allocations and I don't think I confirmed that the process ID was actually
 different. I'll confirm (or otherwise) this and post back.
 On Mar 31, 2013 2:52 AM, RichardC richard.crit...@googlemail.com
 wrote:

 Is/was 2590 your process?

 On Sunday, March 31, 2013 8:07:50 AM UTC+1, Jason wrote:

 Hey folks,

 So I'm in the midst of creating a game and I'm hitting some occasional
 slow down which seems to be a result of GC calls triggered by other
 processes on the device.  I have profiled *my* app and am 100% certain
 there are no allocations going on while the game is running, but in certain
 circumstances (i.e. most of the time) logcat is spewing out GC_CONCURRENT
 freed...blah blah entries.  Here's a typical output from the console:

 03-30 23:58:58.868: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8758K/9224K, paused 5ms+3ms, total 29ms
 03-30 23:59:05.970: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 408K, 6%
 free 8757K/9228K, paused 4ms+2ms, total 30ms
 03-30 23:59:13.063: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9224K, paused 4ms+4ms, total 33ms
 03-30 23:59:20.142: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9228K, paused 5ms+3ms, total 30ms
 03-30 23:59:27.227: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9224K, paused 6ms+2ms, total 31ms
 03-30 23:59:34.306: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9232K, paused 4ms+2ms, total 23ms
 03-30 23:59:41.392: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9224K, paused 4ms+2ms, total 27ms
 03-30 23:59:48.470: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6%
 free 8757K/9232K, paused 5ms+2ms, total 30ms

 Now I have no idea which processes are to blame, but I did notice that
 when other events on the device occur it can lead to a spike in (I
 assume) CPU usage which causes a visible drop in frame rate in the game.

 For example my wifi connection dropped out one time and the logs went
 crazy with other processes complaining about a lost connection and trying
 desperately to tell me about it.  This caused a fairly severe jolt in the
 game dropping the frame rate from 60fps to around 20fps for about a minute
 while everything settled down and got on with things.

 I had noted on a previous 
 threadhttps://groups.google.com/forum/?fromgroups=#!searchin/android-developers/Garbage$20collector$20suspend/android-developers/85yj9CZEqH4/YIiElemqiuoJa
  statement from Dianne Hackborn:

 *as of 1.6 such GCs in a background process can not together take
 more than ~10% of the CPU from any foreground process that wants to run

[android-developers] Re: Optimise drawing speed

2013-03-31 Thread Jason
My first reaction is that if you really want render speed then you need to 
be leveraging the GPU which is going to be most reliable with OpenGL (as I 
understanding it more recent versions of Android will actually hardware 
accelerate for you, but there are many variables that affect whether this 
works, not least of which is the Android version running on the user's 
device).

However, the requirement for fast rendering may be misleading.  Render 
speeds will vary wildly from device to device regardless of what mechanism 
you use, and you don't have any control over this.  Game development faces 
this issue perhaps more than most but the key thing is to effectively 
synchronize and interpolate.

This means two things:

1. Changes in pixel color on screen (any change in the screen image is 
effectively a pixel color change) need to be synchronized with changes in 
the objects they represent.  That is, if there are several objects in the 
scene that are changing position it is important that all the changes for a 
single frame are done without it affecting what's rendered to screen until 
ALL changes are done.  Failure to do this will often result in tearing of 
visuals or jittery movement.

2. If there is a separation between changes in world coordinate objects 
and screen coordinate objects (i.e. the actual objects and their 
on-screen representations) there can sometimes be a case where changes in 
world coordinates are out of sync with screen refreshes.  This is common in 
games where the game thread is using a fixed time step to calculate 
changes in world coordinates but the screen refresh rate is variable.  In 
these cases it's important to keep both coordinate spaces in sync and one 
way to do this is to interpolate the world coordinates where there is an 
uneven number of steps required to synchronize the amount of time that 
has passed between screen render operations.  For example if the fixed time 
step is 16ms, but the last render took 24ms you need 1.5 steps to 
accomodate this.  In a fixed time step environment there is no such thing 
as a half a step so you need to perform 2 full steps then estimate the 
position at 1.5 steps by interpolating back from 2 to 1.5.

Wow.. that was probably way more complicated than it needed to be :/

On Sunday, March 31, 2013 6:59:44 AM UTC-7, Simon Giddings wrote:

 I am writing a music notation app for android tablets.
 As I draw everything (ie. this is not a simple image (jpg, pdf, etc) 
 which needs displaying), I need to ensure that the choice of drawing method 
 is the fastest possible.

 My options, as I see them at present, are

1. Classic on-screen drawing.
2. Draw on a memory based canvas and bitblt the resulting bitmap onto 
the screen

 Will either option give better rendering time results ?

 I have chosen to use classic drawing methods, rather than an OpenGL type 
 surface.
 Is this a mistake ?

 Any help will be appreciated.
 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: Eclipse or Intellij.. what's the verdict?

2013-03-18 Thread Jason Polites
So, the NDK stuff is pretty simply if your project is created in an NDK
Friendly way.  That is, you have a folder called jni and in that folder
you have an Android.mk and an Application.mk file.  Basically the process
documented here (
http://developer.android.com/tools/sdk/ndk/index.html#GetStarted).  If
that's the case then the NDK integration is pretty easy, although it
doesn't have much to do with Intellij as such.

You have two options:

1. Create an ANT script that simply calls the ndk-build executable.  For
example:

project name=ndk default=ndk-build

property file=../local.properties /

target name=ndk-build
exec executable=${ndk.dir}/ndk-build failonerror=true/
/target

target name=ndk-clean
exec executable=${ndk.dir}/ndk-build failonerror=true
arg value=clean/
/exec
/target

/project

(ndk.dir is just the path where the NDK is installed)

2.  Configure an External Tool in intellij.  Here's an example:
http://cl.ly/image/3n020g1S1v1H

In either case you can configure them to run after or before a project
build or before running the project.


As for the OpenCV question (assuming you're referring to the fact that this
is C++) then this is where intellij falls down a little.  I have a similar
issue with Box2D and my solution is to run a separate eclipse for this, but
the eclipse is a pure CDT flavor.  If you ONLY run CDT (and download the
CDT version of eclipse rather than stuffing the CDT plugin into an other
version) then it all runs pretty smoothly and actually doesn't seem to use
much memory.

One of the wonderful things about Intellij is also that it automatically
picks up changes on the file system (something eclipse has never done).  So
if I change a .cpp file and rebuild within CDT but the time a flick back to
intellij it's already updated itself and I'm good to go.

I'll admit it's not ideal having two separate IDE's, but in many ways it
makes more sense.  Not to mention that it (so far) has lead to far fewer
headaches.



On Mon, Mar 18, 2013 at 9:23 PM, Jim Graham spooky1...@gmail.com wrote:

 On Wed, Mar 13, 2013 at 02:32:57PM -0700, bob wrote:
 
 
  I tried intelliJ on Mac yesterday, and it *was* a hassle telling it where
  the JDK and Android SDK were.
 
  I'm not even sure how I got past that part.  A lot of fiddling and
 googling
  were involved.

 I just downloaded it and got started with it---it seemed to find the JDK
 was on its own, so I let it go with that.  As for the SDK, I just
 selected ~/Android/android-sdk-macosx and it figured it out.  Guess I
 got lucky (that, or it's not going to work right).

 What I haven't figured out is how to

A) get it to recognize the NDK
B) get it to use ~/Android/workspace/OpenCV-2.4.1

 If anyone can either help me with these or point me towards the
 appropriate FM so I can RTFM, I'd appreciate it.  I did find some forum
 pages saying it's not supported, but they were all over a year old,
 so

  Anyhow, it is working now, and the fonts are pretty nice on Mac.  I'd
 say I
  prefer them over Eclipse.

 I saw a video on the UI designer, and it looks pretty nice

 Later,
--jim

 --
 THE SCORE:  ME:  2  CANCER:  0
 73 DE N5IAL (/4)MiSTie #49997   Running Mac OS X Lion 
 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W

In light of DHS's recommendation to defend yourself
 against armed intruders with scissors, I'm giving
  my deer rifle a new nickname: Scissors.

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





-- 
Ozzy's Odyssey!  A new game for Android
https://market.android.com/details?id=com.carboncrystal.odyssey
http://www.carboncrystal.com/ http://www.carboncrystal.com/droid-odyssey/

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

Re: [android-developers] Re: Eclipse or Intellij.. what's the verdict?

2013-03-17 Thread Jason Polites
Actually what I really want is code complete (and all the bells
and whistles that go along with a proper editor).  Syntax highlighting
actually works without any plugins but if you want any sort of code
complete (et. al.) then it's going to require some sort of C++ interpreter.
 Running the NDK build is fairly trivial (either via ANT or just command
line configured as an external tool in Intellij).  I tried several times
with the C++ plugin for Intellij but just kept getting all sorts of errors
in the logs generated by the plugin and it just couldn't seem to recognize
any header files.  I assume I did something wrong with the paths etc but
all the errors were just too painful so I removed it.

Aside from that I've now been working in Intellij exclusively for the past
few days and here's my (semi) informed opinion.  I still feel like eclipse
is a better tool from a feature perspective.  The three main things I think
eclipse has over intellij in this regard is:

1. Screen area.  The perspectives concept in eclipse wins hands down over
the somewhat cramped panel approach of Intellij and although eclipse too
has similar panels you can arrange them in whichever way you like in
eclipse whereas intellij lacks some flexibility in this regard.

2. Code complete.  Some aspects of the code complete in Intellij are
actually a lot better than eclipse, but there are a few irritating aspects
in intellij like methods not having their parameters auto completed and the
organize imports equivalent not dealing with classes you haven't imported
yet.

3. Debugging.  The debugger in eclipse just seems better organized and more
intuitive.  This could just be a familiarity thing though.

However, the fact that I have been using Intellij consistently for 3 days
and have not had one single error (aside from some problems with the C++
plugin which is 3rd party) and the fact that it's SO much faster than
eclipse has made the overall experience a breath of fresh air.
 Startup/Shutdown time is much faster, debugging is approximately one
million times faster (I'm talking debugging on an Android device here) and
despite the slight shortfall when it comes to feature breadth there are a
bunch of cool features in Intellij that are not in eclipse, so I guess on
the whole they're probably about even.

Suffice to say I will not be going back to eclipse any time soon unless I
absolutely have to.  Reminds me of the day I switched from PC to Mac..
another one of those never go back moments.


On Sun, Mar 17, 2013 at 12:48 AM, Martin Krischik 
krisc...@users.sourceforge.net wrote:

 Hi,


 On Wednesday, March 13, 2013 11:59:42 PM UTC+1, Jason wrote:

 I initially tried to get the C++ 
 pluginhttp://plugins.jetbrains.com/plugin/?id=1373to work for my NDK 
 related stuff but just couldn't get the paths setup
 correctly (I assume) because none of my includes were resolving so I gave
 up.


 Again: the Android Maven 
 Pluginhttp://code.google.com/p/maven-android-plugin/might be the answer. 
 Then all you need from the C++
 plugin http://plugins.jetbrains.com/plugin/?id=1373 is syntax highlight.

 Martin

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






-- 
Ozzy's Odyssey!  A new game for Android
https://market.android.com/details?id=com.carboncrystal.odyssey
http://www.carboncrystal.com/ http://www.carboncrystal.com/droid-odyssey/

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

2013-03-16 Thread Jason
There are a few things I see here that need some investigation.

First it looks like you're unbinding the buffer before the actual draw?

GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);

Second, in the work I've done recently I found not appreciable performance 
improvement from using VBOs vs. standard vertex arrays, and my memory is a 
little shaky on the details, but aren't you supposed to have transferred 
the buffer data using a call to glBufferData?  (maybe that's elsewhere in 
the code).

There is a good synopsis on VBOs here:

http://www.learnopengles.com/android-lesson-seven-an-introduction-to-vertex-buffer-objects-vbos/

I'll re-iterate though, make your life easier and just use a vertex array. 
 You are already allocating the native buffers needed, and in my experience 
you won't get any more performance from allocating them on VRAM.

Also the previous commenter is correct (from what I can see) unless your 
stuffing color and or texture coordinate data into the buffer (which I 
can't see from the code) then the stride ought to be 0.

Some additional points:

Your rotation appears to rotate the model as well as the camera?  This will 
likely result in no visible rotation on screen as the camera is rotated by 
the same amount as the model.

Matrix.rotateM(ModelMatrix, 0, angleInDegrees, 0.0f, 0.0f, 1.0f);
Matrix.rotateM(ViewMatrix, 0, angleInDegrees, 0.0f, 0.0f, 1.0f);

Also you appear to be allocating memory within your draw call.  This is a 
bad idea as it will cause the garbage collector to thrash which will 
destroy your frame rate

float[] MVPMatrix = new float[16];

I'd also avoid using anything from the Java Collections framework as you'll 
find unexpected memory allocations going on (particularly in Map types). 
 I'd limit yourself to arrays where possible or use some of the in-built 
Android collection types (like SparseArray).

I can't see your vertex/fragment shaders, but I'm assuming their fairly 
basic.  You may be better off doing the matrix transformations in the 
shader too, although depending on the complexity of your model you may or 
may not see performance gains for this.

Simply using vertex buffers is very easy.  Rather than sending the pointer 
to the VBO in the glVertexAttribPointer call you just send the local java 
reference to your FloatBuffer objects.

That is, rather than:

public native void glVertexAttribPointer(int indx, int size, int type, 
boolean normalized, int stride, int ptr);

use this:

public native void glVertexAttribPointer(int indx, int size, int type, 
boolean normalized, int stride, Buffer ptr);

That will basically eliminate all the VBO code which (in my opinion) is 
unneccessary.

On Friday, March 15, 2013 2:05:38 PM UTC-7, Braindrool wrote:

 Like I said, I've tried everything I can think of. Same 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: Google+ integration

2013-03-16 Thread Jason
The documentation for Google+ is here:

https://developers.google.com/+/mobile/android/

Or for a very quick implementation you could just use Socialize:

http://www.getsocialize.com



On Thursday, March 14, 2013 4:55:39 AM UTC-7, srikanth wrote:

 Dear all,
 Please help me How to post image and text through our android application 
 using google+ integration as like face book integration..


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

2013-03-16 Thread Jason
You need a google maps key because access to the google maps API is rate 
limited.

On Friday, March 15, 2013 10:41:25 PM UTC-7, ramesh babu wrote:

 for developing google map application why do we required sha1 key??... 


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

2013-03-16 Thread Jason
First I'm assuming that the URL is accessible on the network, if so you 
need to make sure that:

A) The device is on the same network (e.g. same wifi router)
B) The app has the android.permission.INTERNET permission

 I have seen to use 10.0.2.2 instead of localhost.. not sure what you 
mean by this.. but of course localhost wouldn't work because presumably the 
server is not running on the device :/

On Sunday, November 20, 2011 10:40:50 AM UTC-8, mark kelly wrote:

 Hi
 Im trying to connect to a mysql database which is on localhost. i get
 the error:

  Error in http connection
 org.apache.http.conn.HttpHostConnectException: Connection to 
 http://10.0.2.2
 refused

 The code is:

 package com.test.poll;

 import java.io.BufferedReader;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.ArrayList;

 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.apache.http.NameValuePair;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.entity.UrlEncodedFormEntity;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.impl.client.DefaultHttpClient;
 import org.apache.http.message.BasicNameValuePair;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;

 import android.app.Activity;
 import android.os.Bundle;
 import android.util.Log;
 import android.widget.Toast;

 public class Poll extends Activity {
 InputStream is;
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 String result = ;
 //the year data to send
 ArrayListNameValuePair nameValuePairs = new
 ArrayListNameValuePair();
 nameValuePairs.add(new BasicNameValuePair(year,1990));

 //http post
 try{
 HttpClient httpclient = new DefaultHttpClient();
 HttpPost httppost = new HttpPost(http://10.0.2.2/
 android/getAllPeopleBornAfter.php);
 httppost.setEntity(new
 UrlEncodedFormEntity(nameValuePairs));
 HttpResponse response = httpclient.execute(httppost);
 HttpEntity entity = response.getEntity();
 is = entity.getContent();
 Log.e(log_tag, connection success );
 Toast.makeText(getApplicationContext(), pass,
 Toast.LENGTH_SHORT).show();
 }catch(Exception e){
 Log.e(log_tag, Error in http connection
 +e.toString());
 Toast.makeText(getApplicationContext(),
 failed+e.toString(), Toast.LENGTH_SHORT).show();

 }
 //convert response to string
 try{
 BufferedReader reader = new BufferedReader(new
 InputStreamReader(is,iso-8859-1),8);
 StringBuilder sb = new StringBuilder();
 String line = null;
 while ((line = reader.readLine()) != null) {
 sb.append(line + \n);
 Toast.makeText(getApplicationContext(),
 pass, Toast.LENGTH_SHORT).show();
 }
 is.close();

 result=sb.toString();
 }catch(Exception e){
Log.e(log_tag, Error converting result
 +e.toString());
 Toast.makeText(getApplicationContext(),
 failed+e.toString(), Toast.LENGTH_SHORT).show();

 }

 //parse json data
 try{
 JSONArray jArray = new JSONArray(result);
 for(int i=0;ijArray.length();i++){
JSONObject json_data = jArray.getJSONObject(i);
 Log.i(log_tag,id: +json_data.getInt(id)+
 , name: +json_data.getString(name)
 +
 , sex: +json_data.getInt(sex)+
 , birthyear:
 +json_data.getInt(birthyear)
 );
 Toast.makeText(getApplicationContext(),
 pass, Toast.LENGTH_SHORT).show();
}

 }catch(JSONException e){
 Log.e(log_tag, Error parsing data +e.toString());
 Toast.makeText(getApplicationContext(),
 failed+e.toString(), Toast.LENGTH_SHORT).show();
 }
 }
 }

 I have a php script to connect to the database but the app isn't
 getting that far. Is the url string right? I have seen to use 10.0.2.2
 instead of localhostbut its not working for me...



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

Re: [android-developers] Re: Eclipse or Intellij.. what's the verdict?

2013-03-13 Thread Jason Polites
So I've been working in Intellij all day today, although most of the time
was spent in the setup/config process.  I initially tried to get the C++
plugin http://plugins.jetbrains.com/plugin/?id=1373 to work for my NDK
related stuff but just couldn't get the paths setup correctly (I assume)
because none of my includes were resolving so I gave up.  The config of
Android SDK and JDK were a little unexpected but I wonder if that has more
to do with importing from an eclipse project or not.  Anyway this didn't
take long to setup.  I think most of the confusion is just around different
naming conventions in Intellij (project vs module).  So I now have my
Android project in Intellij building, running and debugging fine.  I
decided to just download a fresh copy of eclipse CDT only for the C/C++
work and with just CDT it seems to be running fine.  So far my experience
in actually using the tool has been good, but I'm not sure it's all that
much better than eclipse.  It's definitely faster and more responsive, but
also seems to use more RAM and I really miss the perspectives in eclipse
(debugging in Intellij can mean you run out of screen real estate really
fast.  Double monitor would probably help here).  Now that I'm running two
IDEs (CDT for C++, Intellij for Java) I'm wondering whether I'd get a
similar level of stability from running two separate eclipse instances.

I'm going to continue to use Intellij for a good amount of time to get over
the initial learning curve on the tool itself.  I'm wary about drawing
conclusions that are more about learning how to use a hammer than whether
the hammer works well.


On Wed, Mar 13, 2013 at 2:32 PM, bob b...@coolfone.comze.com wrote:

 I tried intelliJ on Mac yesterday, and it *was* a hassle telling it where
 the JDK and Android SDK were.

 I'm not even sure how I got past that part.  A lot of fiddling and
 googling were involved.

 Anyhow, it is working now, and the fonts are pretty nice on Mac.  I'd say
 I prefer them over Eclipse.

 Plus, it seems a bit less sluggish than Eclipse.



 On Tuesday, March 12, 2013 5:17:28 PM UTC-5, Kostya Vasilyev wrote:


 On Tuesday, March 12, 2013 10:59:55 PM UTC+4, Martin Krischik wrote:

 Am Dienstag, 12. März 2013 17:51:41 UTC+1 schrieb b0b:

 Each time someone bashes Eclipse, it is generally followed by stating
 how awesome Intellij is.


 Have you ever considered that this is so because is truly Intellij IDEA
 is awesome.

 Consider this: Almost every Java programmer has used eclipse at one
 time. So everybody who bashes Eclipse actually knows what he / she is
 talking about. *Have you tried Intellij IDEA?*


 I tried several times, most recently, as it happens, today.

 First, on Ubuntu.

 Fonts in IDEA are lacking antialising or hinting or both. JetBrains'
 response on an old bug report about this is won't fix, Linux market is too
 small, not worth it. Tried a couple magic tweaks found on the 'net,
 still, no improvement.

 Next, rebooted into Windows 8.

 IDEA could not find the installed JDK when trying to create a new Android
 project, so I could not get past the new Android project stage.

 Will try again when it won't make my eyes bleed and is able to find Java
 :)

 -- 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 a topic in the
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/android-developers/03O6rEVdXCY/unsubscribe?hl=en
 .
 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.






-- 
Ozzy's Odyssey!  A new game for Android
https://market.android.com/details?id=com.carboncrystal.odyssey
http://www.carboncrystal.com/ http://www.carboncrystal.com/droid-odyssey/

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

2013-03-12 Thread Jason Polites
Well that pretty much seals the deal for me.  Intellij it is.

I presume this means using ANT as the build system?  I've had all sorts of
trials and tribulations with the ANT build system for Android, although in
fairness most of this has been caused by trying to push it beyond it's
comfort zone (generating mocks, code coverage etc)

Thanks Romain.. love your work ;)


On Tue, Mar 12, 2013 at 12:33 AM, Romain Guy romain...@android.com wrote:

 I use IntelliJ for all my Android framework development work and I have
 used it to work on apps such as the stock Launcher and a couple of personal
 apps. I can live without ADT since the most critical tools are available as
 standalone apps (DDMS, hierarchyviewer, traceview, etc.) You will probably
 miss some of the niceties of ADT so you should give it a try and see how it
 feels for you.

 IntelliJ is definitely not very good for native code which is why I use
 Eclipse (with only the CDT plugin) at the same time. If you have enough RAM
 it's a pretty good setup overall: Eclipse for C/C++ and IntelliJ for
 everything else.


 On Mon, Mar 11, 2013 at 10:47 PM, Jason jason.poli...@gmail.com wrote:

 OK.. I've just about had enough of eclipse.  I have been using it for 10+
 years (ever since it was WSAD :/) and have put up with it's slowness,
 buggyness, upgrade nightmares, plugins that don't work, plugins that do
 work.. then don't, random crashes etc etc... but I just can't take it
 anymore.

 This latest version of eclipse (Juno Service Release 2 Build id:
 20130225-0426) is so riddled with bugs that I can't get through just a
 few hours with either my delete key not working (
 http://stackoverflow.com/questions/2539672/my-delete-key-wont-work-in-eclipse-in-os-x),
 files not saving, a veritable torrent of NullPointerExceptions in the
 Error Log which manifest as random UI failures mixed in with the occasional
 but predictable complete crash followed by a build the world on restart
 that takes about 3 days.

 I love eclipse, but enough is enough.

 So.. is intellij for Android development a realistic option?  Obviously
 Google make plugins for eclipse so this is always going to be the first
 stop for SDK updates, but if anyone is out there who has made the switch
 from eclipse to intellij *specifically for Android work* please let me
 know your opinion.

 I also do a reasonable amount in C++ using the CDT (which is a whole
 other source of issues) and I understand that this is not a strong point
 for intellij (?)

 I really wish the folks at eclipse (whoever they are) would stop trying
 to build features and just make the darn thing stable... I mean 10 years..
 c'mon guys.

 :/

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

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






-- 
Ozzy's Odyssey!  A new game for Android
https://market.android.com/details?id=com.carboncrystal.odyssey
http://www.carboncrystal.com/ http://www.carboncrystal.com/droid-odyssey/

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

[android-developers] Re: Eclipse or Intellij.. what's the verdict?

2013-03-12 Thread Jason
Bashing eclipse is popular because eclipse is a horrible experience, from 
start to end.  As I said in my original post I've been using eclipse for as 
long as there has been an eclipse and many many of the concepts in how data 
is presented in eclipse make a LOT of sense.  The problem is that it's 
buggy.  And I don't mean a few minor issues here and there, I mean hair 
pulling, vein popping, cat kicking failures that make an average day of 
using eclipse less desirable than a barbed wire sandwich.  If one was to 
use eclipse to endlessly write Hello World apps in a pure java environment 
without any external data sources, or libraries, or version control system, 
or other languages.. then one would likely be quite happy and be completely 
confused why anyone would see a problem with eclipse. 

Like I said in the original post.. I love eclipse, I just can't deal with 
it anymore.

On Tuesday, March 12, 2013 9:51:41 AM UTC-7, b0b wrote:

 Eclipse for life here. 

 I use it for Android, regular Java, C/C++, GWT development.

 Having it all in the same IDE is nice.

 Bashing Eclipse is popular. Each time someone bashes Eclipse, it is 
 generally followed by stating how awesome Intellij is. 
 This pattern is 100% predictable, especially on some developers IRC 
 channels, where bitching about build tools is a recurring activity.

 Note: I have noting against Intellij.



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

2013-03-12 Thread Jason Polites
My issue has never been with the features of eclipse.. they're awesome.  My
issue is that they just don't work.  Running CDT along side regular Java
along side Android ADT is just broken.  I am constantly getting
combinations of:

weird behavior (dialogs not containing default values, false-positive
errors in config dialogs, failure to locate referenced libraries, failure
to index referenced libraries for code complete),

visible errors (Alert dialogs reporting that an error occurred with a
details section that simply says NullPointerException, eclipse Error
Logs with literally hundreds of errors usually NPEs, and UI controls simply
ceasing to work.. that is, panels that fail to load and just display a
blank screen or windows that simply don't display),

and of course complete crashes at LEAST once per day.

I'm not saying it's easy.. quite the opposite.  I'm sure building an IDE to
do all this is immensely difficult but that shouldn't mean we just lower
our expectations to accomodate should it?

I love all the features of eclipse and I too make extensive use or type
hierarchy views, refactoring etc etc but I wonder how much I'd be willing
to give up for the sake of stability.  Actually I know how much... a lot.
 I recently had to disable Build Automatically because it would cause
unrecoverable crashes when ADT tried to create a JAR file.  So I had to
manually build every time I wanted to see a change.  It was a bit of a pain
but FAR less than the pain of having to restart every hour or so.

I've now been using Intellij (Community Edition) for about 3 hours so it's
too early to tell definitively but so far all the features I want are there
(with the exception of C++ support) so we'll see if it lives up to its
reputation from a stability/speed perspective.


On Tue, Mar 12, 2013 at 3:18 PM, a1 arco...@gmail.com wrote:

 W dniu wtorek, 12 marca 2013 18:13:16 UTC+1 użytkownik Jason napisał:

 Bashing eclipse is popular because eclipse is a horrible experience, from
 start to end.


 Exaggerating a bit, don't you think? Sure 4.2 isn't such a great release
 (new UI framework is still buggy, but SR2 helped a lot - at least on linux
 and windows). I work a lot with native (c++) code and I didn't find any IDE
 that can replace eclipse for that, also I use a lot AST based navigation
 (type hierarchy, call hierarchy, override paths, outlines, data flows) and
 I really didn't find any IDE matching eclipse in this regard (and that is
 for single language not to mention for both java and c++).

 So I really think millage may vary and IDEs comparison are extremely
 subjective, so my advice is: try other options and see if they works for
 you.

 --
 Bart

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






-- 
Ozzy's Odyssey!  A new game for Android
https://market.android.com/details?id=com.carboncrystal.odyssey
http://www.carboncrystal.com/ http://www.carboncrystal.com/droid-odyssey/

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

2013-03-12 Thread Jason Polites
Not sure how that helps the discussion, but thanks.


On Tue, Mar 12, 2013 at 4:24 PM, Lew lewbl...@gmail.com wrote:

 Jason wrote:

 My issue has never been with the features of eclipse [sic] .. [sic]
 they're awesome.  My issue is that they just don't work.  Running CDT along
 side [sic] regular Java along side Android ADT is just broken.  I am
 constantly getting combinations of:
  http://www.carboncrystal.com/droid-odyssey/


 http://en.wikipedia.org/wiki/Editor_war

 --
 Lew

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






-- 
Ozzy's Odyssey!  A new game for Android
https://market.android.com/details?id=com.carboncrystal.odyssey
http://www.carboncrystal.com/ http://www.carboncrystal.com/droid-odyssey/

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

2013-03-12 Thread Jason Polites
Sure, but the intention of the thread was to inform as to whether intellij
is a realistic option for Android development.  People are relaying their
personal experience with each, which is all valid, relevant information for
those interested in the answer, which I am since I posted the original
question.  But again, thanks for the contribution.


On Tue, Mar 12, 2013 at 5:42 PM, Lew lewbl...@gmail.com wrote:

 Jason wrote:

 Not sure how that helps the discussion, but thanks.


 It puts it in perspective, that is, it illustrates the value of arguing
 over the best editor as folks have been doing here.

 Does that make it clearer?



  Lew wrote:

 Jason wrote:

 My issue has never been with the features of eclipse [sic] .. [sic]
 they're awesome.  My issue is that they just don't work.  Running CDT along
 side [sic] regular Java along side Android ADT is just broken.  I am
 constantly getting combinations of:
  http://www.carboncrystal.com/droid-odyssey/


 http://en.wikipedia.org/wiki/**Editor_warhttp://en.wikipedia.org/wiki/Editor_war


 --
 Lew


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






-- 
Ozzy's Odyssey!  A new game for Android
https://market.android.com/details?id=com.carboncrystal.odyssey
http://www.carboncrystal.com/ http://www.carboncrystal.com/droid-odyssey/

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

2013-03-11 Thread Jason
OK.. I've just about had enough of eclipse.  I have been using it for 10+ 
years (ever since it was WSAD :/) and have put up with it's slowness, 
buggyness, upgrade nightmares, plugins that don't work, plugins that do 
work.. then don't, random crashes etc etc... but I just can't take it 
anymore.

This latest version of eclipse (Juno Service Release 2 Build id: 
20130225-0426) is so riddled with bugs that I can't get through just a few 
hours with either my delete key not working 
(http://stackoverflow.com/questions/2539672/my-delete-key-wont-work-in-eclipse-in-os-x),
 
files not saving, a veritable torrent of NullPointerExceptions in the 
Error Log which manifest as random UI failures mixed in with the occasional 
but predictable complete crash followed by a build the world on restart 
that takes about 3 days.

I love eclipse, but enough is enough.

So.. is intellij for Android development a realistic option?  Obviously 
Google make plugins for eclipse so this is always going to be the first 
stop for SDK updates, but if anyone is out there who has made the switch 
from eclipse to intellij *specifically for Android work* please let me know 
your opinion.

I also do a reasonable amount in C++ using the CDT (which is a whole other 
source of issues) and I understand that this is not a strong point for 
intellij (?)

I really wish the folks at eclipse (whoever they are) would stop trying to 
build features and just make the darn thing stable... I mean 10 years.. 
c'mon guys.

:/

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: using IP address 10.0.2.2 for android simulator works, but how do I point to localhost when testing on android device?

2013-01-07 Thread Jason Gates
Hi,
I run a small local area network (LAN) for development and testing (a
couple desktops and a laptop).
...
My internet provider complains if I run a http server that is exposed to
the internet. Therefore, I set up a wireless access point that is
restricted to my development lan. I then have my android device connect via
wifi to my internal lan.

In addition, my mobile carrier disabled usb tethering to the internet.
Thus, a local access point gets around all the commercial carrier
restrictions.

Hope that helps.

On Fri, Jan 4, 2013 at 4:34 PM, Robert Greenwalt rgreenw...@google.comwrote:

 I think you can use USB tethering (provided your device/carrier let you)
 and use the local ip assigned to the PC's side of the usb link.  Wifi
 should also work.


 On Fri, Jan 4, 2013 at 2:27 PM, bob b...@coolfone.comze.com wrote:

 Maybe use an Ethernet cable to connect your web server to your Wifi
 router?


 You need to put the web server on the Wifi LAN.



 On Friday, January 4, 2013 3:58:53 PM UTC-6, John Merlino wrote:

 I have ruby on rails web server that my android application talks to.
 When I connect to 10.0.2.2 on android simulator, it successfully makes
 contact to web server. However, it does not when I test it on the
 actual android device using a usb connection and using eclipse. I am
 forced to use the real live ip address, but I dont want to have to
 deploy live for every little change i need to make when testing on
 device. What options are available?

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


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


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

[android-developers] Re: The constructor SimpleExpandableListAdapter(.........) is undefined.

2013-01-07 Thread Jason Villalon
how did you solved it? i have the same problem

On Sunday, March 16, 2008 8:41:54 AM UTC+8, jtaylor wrote:

 Problem solved. Looks like I can't add String, String to map as a 
 parametized type. 


 - Juan 

 On Mar 15, 7:18 pm, jtaylor juan.anthony.tay...@gmail.com wrote: 
  This is my Code below. 
  
  === 
  
  private static final String NAME = NAME; 
  private static final String GO = GO; 
  private ExpandableListAdapter expandAdapter; 
  
  @Override 
  protected void onCreate(Bundle icicle) { 
  super.onCreate(icicle); 
  
  ListMapString, String groupData = new 
 ArrayListMapString, 
  String(); 
  ListListMapString, String childData = new 
  ArrayListListMapString, String(); 
  
   // BEGIN groupData and childData processing 
  for (int i = 0; i  10; i++) { 
  MapString, String basilMap = new 
 HashMapString, String(); 
  basilMap.put(NAME, group + i); 
  basilMap.put(GO, go group + i); 
  groupData.add(basilMap); 
  
  ListMapString, String children = new 
 ArrayListMapString, 
  String(); 
  
  for (int j = 0; j  5; j++) { 
  MapString, String thymeMap = new 
 HashMapString, String(); 
  thymeMap.put(NAME, child + i); 
  thymeMap.put(GO, go child + i); 
  children.add(thymeMap); 
  } 
  childData.add(children); 
  } 
  
  expandAdapter = new SimpleExpandableListAdapter 
 ( 
 this, 
 groupData, 
 android.R.layout.simple_expandable_list_item_2, 
 new String[] {NAME, GO}, 
 new int[] { android.R.id.text1, android.R.id.text2 }, 
 childData, 
 android.R.layout.simple_expandable_list_item_2, 
 new String[] {NAME, GO}, 
 new int[] { android.R.id.text1, android.R.id.text2 } 
 ); 
 setListAdapter(expandAdapter); 
  
  } // end of onCreate 
  
  On Mar 15, 7:11 pm, jtaylor juan.anthony.tay...@gmail.com wrote: 
  
   I'm getting the error below with no suggestions available. Which means 
   I'm at a dead end. 
  
   The constructor SimpleExpandableListAdapter(.) is undefined. 
  
   I am using the constructor with 9 parameters. Which should work like 
   ExpandableList3.java 
  
  http://code.google.com/android/samples/ApiDemos/src/com/google/androi... 

  
   - Juan

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

[android-developers] Getting started with ActionBarSherlock

2012-11-30 Thread Jason Hsu
I'm interested in learning to work with ActionBarSherlock.

What are the best tutorials for getting started?  I need to start off with 
the Hello World of ActionBarSherlock and then work my way up to more 
complex apps.

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

[android-developers] Nexus OTA updates via USB storage

2012-11-19 Thread Jason Berry
The Galaxy Nexus has this awesome feature in stock recovery to apply an OTA 
update via USB storage. I used it successfully the other day to upgrade to 
4.2.
It's a worthy addition to ADB sideload. Any chance of adding this 
capability to the Nexus 7?

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

[android-developers] Simulating a tablet with the AVD

2012-11-09 Thread Jason Hsu
I'm in the process of learning how to work with fragments, but I don't have 
a tablet.

How do I use the AVD to create a virtual tablet so I can see the proper 
operation of fragments?

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

[android-developers] Help! How to listen the enalbe state change of android button without rewriting the source code

2012-11-06 Thread Jason zhao
Help! How to listen the enalbe state change of android button without
rewriting the source code.
One more important thing, I have implemeted the enable state change
listener of my custom button.But the above question means I call
android button of app widget  not mine in the code or xml file.
Thx,very very very much.

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


[android-developers] How do I make an app that allows users to interact with each other?

2012-11-02 Thread Jason Hsu
How do I make an app that allows users to interact with each other?  I 
assume that this requires a central server that interacts with the app.

Examples of such interactive apps:
1.  Message boards
2.  Chat rooms
3.  Multiplayer games

Please point me to the types of tools behind such interactive apps.

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

[android-developers] Making the same API key work for both developing AND publishing

2012-10-24 Thread Jason Hsu
I recently published an app that uses Google Maps.  As you know, you need 
to provide your API key for Google Maps.

When I published the first version of my app, the map display in my Google 
Play app didn't work even though it did work when I ran my app from source 
code.  So I had to change the API key in the source code and republish my 
app, and Google Maps did work in my second version.  However, Google Maps 
didn't work when I ran my app from source code.

Given this conundrum, is there a way I can use the same API key for both 
developing AND publishing apps?

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

[android-developers] Multi-Language Support for Android Softkeyboard

2012-10-04 Thread jason austin
 
  
Currently, I am developing a softkeyboard for Android using SoftKeyboard 
source code which is available in the SDK.

But I want to add in multi-language support for the keyboard (similar to 
what is available in the native keyboard). But this portion is not 
available in the SoftKeyboard source code.

Any idea how could I implement this?

Thanks In Advance.

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

[android-developers] Re: Android and JMX

2012-09-29 Thread Jason van Dyk
G'day,

I've been looking at doing a similar thing Brian, did you ever come up with 
a solution? I haven't seen anything on the Internet on how to achieve this.

Cheers,

Jason

On Wednesday, 11 May 2011 00:24:14 UTC+10, brian lee wrote:

 I am trying to write a simple app to monitor some mbeans of another 
 java application running.  How can I get android to import 
 javax.management so I can create a connection to the jmx? 

 Thanks

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

[android-developers] Displaying nearby places with the Google API

2012-09-24 Thread Jason Hsu
If you copy the source code at 
http://codezone4.wordpress.com/2012/05/17/display-near-by-places-with-google-places-api/
 
into an HTML file and then view that HTML file as a web page, you get a 
Google Map showing the locations of stores in a certain part of Sydney, 
Australia.  As you can see, the source code specifies the 
latitude/longitude coordinates (-33.8665433, 151.1956316), the size of the 
area to search, and the type of place to search (stores).  Yes, this 
actually works out-of-the-box.

Is there a tutorial that shows how to do a similar task in Android?  The 
tutorials I've seen show bits and pieces, but I have yet to find one that 
shows EVERYTHING I need to show such a map.

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

[android-developers] Re: Help: My app has violated the spam provisions of the Content Policy

2012-08-31 Thread Jason Sesso
I would take them out. that's completely wrong to do that IMO. It takes time to 
search millions of apps. I'm sure theirs will get reported. 

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


[android-developers] how to show the database(ListView) from another activity

2012-08-30 Thread Jason Sesso
Did you bundle the data from A to send it to  B?

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


[android-developers] Re: JellyBean problem on Long click when context menu and android:autolink= all

2012-08-29 Thread Jason Sesso
listView.setOnItemLongClickListener(new 
AdapterView.OnItemLongClickListener() {
 public boolean onItemLongClick(AdapterView? arg0, final View arg1,
int arg2, long arg3) {
IN here you would put something to do on 
long click
}
}



On Tuesday, August 28, 2012 9:05:58 PM UTC-7, Sandy wrote:


 Hi Please let me know asap, I am stuck. 
 On Aug 28, 1:32 pm, Jason Sesso djse...@gmail.com wrote: 
  It seems that you. Need to add the onlongclick method. I just did this 
 recently.  Ill get you an example in awhile. 


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

[android-developers] Re: New to developing

2012-08-29 Thread Jason Sesso
look for the values folder and in there is strings.xml

There should be an entry named edit_message in there.

On Tuesday, August 28, 2012 3:22:14 PM UTC-7, Lee wrote:

 As such I took your advice and started with the Hello World tutorial, and 
 surprise! Errors errors and an error.

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
 xmlns:tools=http://schemas.android.com/tools;
 android:layout_width=match_parent
 android:layout_height=match_parent
 android:orientation=horizontal 
 EditText android:id=@+id/edit_message
 android:layout_weight=1
 android:layout_width=0dp
 android:layout_height=wrap_content
 android:hint=@string/edit_message/ //error: Error: No resource 
 found that matches the given name (at 'hint' with value '@string/
  edit_message').

 Button
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=@string/button_Send/ //error: Error: No resource 
 found that matches the given name (at 'text' with value '@string/
  button_Send').

 /LinearLayout




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

[android-developers] Re: JellyBean problem on Long click when context menu and android:autolink= all

2012-08-29 Thread Jason Sesso
Change your  to actual text. :P I bet its because it thinks 
its a phone number.

On Wednesday, August 29, 2012 2:08:22 AM UTC-7, Sandy wrote:

 I tried this also .. but the dialer coming in this case also , I think 
 its platform bug, what u say?? 

 On Aug 29, 12:48 pm, Jason Sesso djse...@gmail.com wrote: 
  listView.setOnItemLongClickListener(new 
  AdapterView.OnItemLongClickListener() { 
   public boolean onItemLongClick(AdapterView? arg0, final View arg1, 
  int arg2, long arg3) { 
  IN here you would put something to do on 
  long click 
  } 
  
  
  
  
  
  
  
  } 
  On Tuesday, August 28, 2012 9:05:58 PM UTC-7, Sandy wrote: 
  
   Hi Please let me know asap, I am stuck. 
   On Aug 28, 1:32 pm, Jason Sesso djse...@gmail.com wrote: 
It seems that you. Need to add the onlongclick method. I just did 
 this 
   recently.  Ill get you an example in awhile. 


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

[android-developers] Re: how to exit from app

2012-08-29 Thread Jason Sesso
Do you need all of the other activities? You can put finish() on the ones 
that you are leaving when you go to the next one.

On Wednesday, August 29, 2012 2:15:02 AM UTC-7, Sadhna Upadhyay wrote:

 Hi everybody,
 can some one tell me that how to exit from whole application when user 
 click on exit button, there are many activities so finish() method is 
 calling previous activity.so just tell me how to exit from app.


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

[android-developers] Implementing ScheduledExecutorService (or an alternative)

2012-08-29 Thread Jason Hsu
What is the best way to make an Android app AUTOMATICALLY execute a series 
of certain commands periodically?

I just published an app called the Battery Saver Flashlight.  The source 
code is on GitHub at https://github.com/jhsu-android/BatterySaverFlashlight 
.

This app has a settings page, and I want it to AUTOMATICALLY update the 
status of the WiFi, Bluetooth, and GPS functions (on or off).  The 
Bluetooth status and the GPS status lag the action of clicking the 
Enable/Disable buttons and thus don't get updated.  I tried to use 
ScheduledExecutorService to implement automatic status updating, but the 
app kept quitting on me.  The messages in Eclipse said that I needed to use 
static functions to avoid a memory leak.  Unfortunately, it looked like I'd 
have to make everything in the script a static function.  So I decided to 
leave this feature out until I can get it to work properly.  The user has 
to hit the back button (returns to the introduction page) and then click on 
the Continue button in order to update the status.

What's the best way to make my app automatically execute a series of 
commands periodically?

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

[android-developers] JellyBean problem on Long click when context menu and android:autolink= all

2012-08-28 Thread Jason Sesso
It seems that you. Need to add the onlongclick method. I just did this 
recently.  Ill get you an example in awhile. 

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


[android-developers] Iam new to developing a android app ( stuck in mainactivity class)

2012-08-28 Thread Jason Sesso
Put it below.

OnCreate(blah blah) {



}

sendMessage() {


}

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


[android-developers] Writing to External SD

2012-08-28 Thread Jason Sesso
Create a dialog. For them to choose and then save the preference.

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


[android-developers] Re: Android maven plugin: Adding android support jar to test project ~ Cannot load class 'android.support.v4.os.ParcelableCompatCreatorHoneycombMR2'

2012-08-28 Thread Jason Sesso
I'm trying to understand mavens purpose

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


[android-developers] NEW APP: Battery Saver Flashlight

2012-08-28 Thread Jason Hsu
Check out my latest Android app, the Battery Saver Flashlight.  It's 
available for free on Google Play at 
https://play.google.com/store/apps/details?id=com.jasonhsu.batterysaverflashlightfeature=search_result#?t=W251bGwsMSwxLDEsImNvbS5qYXNvbmhzdS5iYXR0ZXJ5c2F2ZXJmbGFzaGxpZ2h0Il0
 
.

This flashlight app lets you conserve battery power with convenient in-app 
options to disable your power-hungry WiFi, Bluetooth, and GPS features.  At 
only 163 kB, the Battery Saver Flashlight is easy on your smartphone's 
memory as well.

The Battery Saver Flashlight offers 16 different brightness settings and 4 
different colors (red, green, yellow, and white).

The source code is available at 
https://github.com/jhsu-android/BatterySaverFlashlight .

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

[android-developers] New app: Battery Saver Flashlight

2012-08-28 Thread Jason Hsu
Check out my latest Android app, the Battery Saver Flashlight.  It's 
available for free on Google Play at 
https://play.google.com/store/apps/details?id=com.jasonhsu.batterysaverflashlight
 
.

This flashlight app lets you conserve battery power with convenient in-app 
options to disable your power-hungry WiFi, Bluetooth, and GPS features.  At 
only 163 kB, the Battery Saver Flashlight is easy on your smartphone's 
memory as well.

The Battery Saver Flashlight offers 16 different brightness settings and 4 
different colors (red, green, yellow, and white).

The source code is available at 
https://github.com/jhsu-android/BatterySaverFlashlight .

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

[android-developers] Google Play registeration payment fail

2012-08-28 Thread Mr Jason
Hello guys,

I'm trying to register Google Play developer by using google wallet payment 
but it keeps fail. I have entered in my credit card number correctly (i.e. 
512X    [without spaces]), the CVS number (3 digit numbers at 
the back of your card), and expiry date as well. I don't understand what 
have I entered incorrectly, or perhaps, is it possible to make payment 
using paypal?

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

[android-developers] Re: NullPointerException ... arrrggghhh ... newbie LOST!

2012-08-27 Thread Jason Sesso
does R.id.btnRetrieveDoc event exist?

On Saturday, August 25, 2012 12:45:20 PM UTC-7, KinnMirr wrote:

 When I run below activity, I get an exception. I've wrapped the exception 
 in an AlertDialog. Here's what the dialog shows.
 *  null
   null
   null
   java.lang.NullPointerException
 *
 Where do I even START looking for a problem?
 I've commented-out everything I can think of and the exception still 
 happens.
 ar! 
 I'm a newbie and I'm stumped!
 Here's the Activity
 AlertDialog marked with  

 import android.os.Bundle;
 import android.app.Activity;
 import android.app.AlertDialog;
 import android.content.Intent;
 import android.view.Menu;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.Button;
 public class EncDocRetrieve extends Activity {
   Button retrieveDoc;
   //EditText DocName;
   @Override
   public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 try {
   setContentView(R.layout.activity_enc_doc_retrieve);
   retrieveDoc = (Button) findViewById(R.id.btnRetrieveDoc);
   retrieveDoc.setOnClickListener(new OnClickListener() {
 @Override
 public void onClick(View v) {
   //DocName = (EditText) 
 findViewById(R.id.edtextDocUserName);
   Intent intent = new 
 Intent(EncDocRetrieve.this,
   DecryptKeyGet.class);
   
 //intent.putExtra(android.content.Intent.EXTRA_TEXT, DocName
   //.getText().toString());
   startActivity(intent);
 }
   });
   } catch (Exception e) {
 AlertDialog.Builder dialog = new 
 AlertDialog.Builder(this);
 dialog.setTitle(Opps Exception);
 String err = e.getLocalizedMessage() + \n + 
 e.getCause() + \n  + e.getMessage() + \n + e.toString();
 dialog.setMessage(err);
 dialog.setNeutralButton(Cool, null);
 dialog.create().show();
 }
   }
   @Override
   public boolean onCreateOptionsMenu(Menu menu) {
 getMenuInflater().inflate(R.menu.activity_enc_doc_retrieve, 
 menu);
 return true;
   }
 }


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

[android-developers] Re: Check This one , this is my first Application in google play

2012-08-27 Thread Jason Sesso
I thought he was the guy LOL

On Monday, August 27, 2012 12:18:21 AM UTC-7, Ali Chousein wrote:

 Just my 2 cents: If your app is not an official app for the celebrity 
 person you're referring to, it might be worth stating this clearly in your 
 app. Otherwise Google might think you're violating the  Developer 
 Distribution Agreement and Content Policy by pretending to be someone else. 
 I hope you won't have this problem but I know people in the past had to 
 deal with it. Unless you developed an official app for the celebrity person 
 under discussion, it's worth stating this clearly in your app. 

 P.S. I'm *NOT* from the Google team, neither a legal adviser. My 2 cents 
 are based on what I observed happening in the past. Please don't ask for 
 further clarification because I don't know more than what I wrote above. 

 - 
 Ali Chousein 
 https://play.google.com/store/apps/details?id=com.apps.besocial 
 https://play.google.com/store/apps/details?id=com.apps.weather_buddy


 On Sunday, August 26, 2012 12:17:11 PM UTC+2, surya pavan wrote:


 https://play.google.com/store/apps/details?id=com.pawan.comfeatur
 e=more_from_developer#?t=W251bGwsMSwyLDEwMiwiY29tLnBhd2FuLmNvbSJd

 -- 
 Regards
 SuryaPavan Tanniru.



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

[android-developers] Re: Best Source for Ads?

2012-08-26 Thread Jason Sesso
I use admob. its alright but am sure others are better.

On Sunday, August 26, 2012 9:02:45 PM UTC-7, Jungle Jim wrote:

 I am developing a free Android app that is almost ready to publish. I want 
 to put a teeny weeny space for ads on it.
  
 What have been your experiences with the various ad servers? Should I just 
 use Google Adsense, or have any of you had better results with other ad 
 servers?


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

[android-developers] Re: Eclipse Indigo or Juno?

2012-08-24 Thread Jason Sesso
I am using Juno also on Linux. Its just that if you are watching videos or 
whatever, you create projects a little differently but its no biggie.

On Friday, August 24, 2012 6:30:51 AM UTC-7, Daz wrote:

 Thats good to know :-)  Its just I don't want to start practising my app 
 development then someone later down the line says I should of used Indigo

 Thanks


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

[android-developers] Re: Need some help with MyFirstApp tutorial.

2012-08-24 Thread Jason Sesso
He still hasnt created DisplayMessageActivity.java so it will still error 
until then. :)

On Friday, August 24, 2012 10:28:43 PM UTC-7, Juned Khan wrote:

 Hi 

 Use this code

 Intent intent = new Intent(your_current_class.this, 
 DisplayMessageActivity.class);

 startActivity(intent);



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

[android-developers] Re: Help with application

2012-08-23 Thread Jason Sesso
You should probably look on developer.android.com and do the hello world 
app. There you can understand views and activities. 

On Wednesday, August 22, 2012 9:33:42 PM UTC-7, laila hafsiani wrote:

 hello, my name is laila hafsiani putri.
 i'm from indonesian and i'm new in android developer.
 i'm going to make application introduction to the Arabic alphabet. what 
 first i do?
 may i have template application or project source in eclipse.
 sorry for my bad english :D thanks anyway.


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

[android-developers] How do I show the wifi status programatically in Android?

2012-08-23 Thread Jason Hsu


I'm just trying to write a simple Android app that programatically shows 
whether the WiFi is enabled or disabled. I'm unable to get it to print the 
Wifi status. I'm pretty sure that my code is 99% correct, but that's no 
better than being 0% correct.

My code is below:
package com.jasonhsu.wifitest;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;

public class MainActivity extends Activity {

private LinearLayout ShowWifiStatus;
TextView TextWifiStatus;

@Override
public void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ShowWifiStatus = new LinearLayout (this);
TextView TextWifiStatus = new TextView (this);
TextWifiStatus.setText(Sorry, your Wifi status program isn't 
working.);
this.registerReceiver(this.WifiStateChangedReceiver, new 
IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION));
ShowWifiStatus.addView(TextWifiStatus);
setContentView(ShowWifiStatus);
}

private BroadcastReceiver WifiStateChangedReceiver
= new BroadcastReceiver(){

@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub

int extraWifiState = 
intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE , 
WifiManager.WIFI_STATE_UNKNOWN);

switch(extraWifiState){
case WifiManager.WIFI_STATE_DISABLED:
TextWifiStatus.setText(WIFI STATE DISABLED);
break;
case WifiManager.WIFI_STATE_DISABLING:
TextWifiStatus.setText(WIFI STATE DISABLING);
break;
case WifiManager.WIFI_STATE_ENABLED:
TextWifiStatus.setText(WIFI STATE ENABLED);
break;
case WifiManager.WIFI_STATE_ENABLING:
TextWifiStatus.setText(WIFI STATE ENABLING);
break;
case WifiManager.WIFI_STATE_UNKNOWN:
TextWifiStatus.setText(WIFI STATE UNKNOWN);
break;
}

}};

}

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

[android-developers] Re: How to access an external database ??

2012-08-22 Thread Jason Sesso
 Kinda scary in the security area. You wouldnt be able to setup the 
database to only accept queries from 1 IP address.


On Tuesday, August 21, 2012 2:47:48 AM UTC-7, Mrdison wrote:

 Hi friends... 

 I need a little help. I need to link my Sqlite database on android with an 
 existing database present on LAN ... 
 I know how to create a database and on how to link with a database on 
 internet.. 

 Any ideas ?? 

 Anshuman


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

[android-developers] Re: First android app

2012-08-22 Thread Jason Sesso
I just finished my first Android app and found that the developer site 
and google search helped me a lot. You can also use IRC. 

On Tuesday, August 21, 2012 1:59:20 AM UTC-7, cham herbias wrote:

 I am a computer engineering student. Can you help me with some suggestions 
 about basic android app? . I have a very basic background of android 
 programming and i want to learn more.


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

Re: [android-developers] Disabling wifi, GPS, Bluetooth, and celluar in an app

2012-08-16 Thread Jason Hsu
I know I can go into airplane mode, but I want to give the user the option 
of conserving the battery AFTER starting the app by providing in-app 
buttons.

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

[android-developers] Disabling wifi, GPS, Bluetooth, and celluar in an app

2012-08-15 Thread Jason Hsu
I have an idea for an app.  In the interest of helping the user conserve 
battery power, I want to provide the OPTION of disabling battery-draining 
services like wifi, GPS, Bluetooth, and cellular.

How do I implement this?  Are there good tutorials/examples that implement 
such functionality?

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

[android-developers] MapView search for nearest grocery stores, gas stations, restaurants, etc.

2012-08-13 Thread Jason Hsu
I've gone through the basic MapView tutorials that display a map and even 
overlays.

Is there a way I can create an Android app that not only pulls up a map but 
ALSO does an AUTOMATIC search for the grocery stores, gas stations, or 
restaurants in my area?  Where can I find a good tutorial that actually 
works?

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

[android-developers] Re: MapView search for nearest grocery stores, gas stations, restaurants, etc.

2012-08-13 Thread Jason Hsu
Thanks for the quick responses.

If there isn't a function that pulls up Google maps and automatically does 
a search, then how do apps like Meijer 
Find-ithttps://play.google.com/store/apps/details?id=com.meijer.finditfeature=search_resultand
 Liquor 
Run 
Mobilehttps://play.google.com/store/apps/details?id=com.kansassoftware.liquorrunfeature=search_resultwork?
TreKing: Is there a good example of a tutorial that creates an app that 
uses APIs and Google Places as you suggested?

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

[android-developers] Re: MapView search for nearest grocery stores, gas stations, restaurants, etc.

2012-08-13 Thread Jason Hsu
Would a script in HTML5 be able to provide the automatic Google Map search 
capability that I'm seeking?  Or is having an in-app database the only way?

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

[android-developers] Automatically doing a map search

2012-08-12 Thread Jason Hsu
I've figured out how to get the map exercises from _The Busy Coder's Guide 
To Android Development_ to work.  (This  requires right-clicking on the 
project, going to Properties - Android and selecting a Google API as the 
target.  It's also necessary to use the keytool command on the 
debug.keystore file to get the MD5 certificate fingerprint, paste this 
fingerprint into the appropriate field at 
http://code.google.com/android/maps-api-signup.html, and pasting the apiKey 
into the *.xml file.)

How do I pull up an automatically executed search of my area in Google 
maps?  Suppose I want the program to automatically search my local area for 
gas stations, restaurants, grocery stores, etc.  Is there a good 
example/tutorial that covers 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

[android-developers] Re: Problems With The Use Of Java Native Libraries in Android !!

2012-07-23 Thread Jason Goemaat
How do you run a java app as root?  Calling SU only works for that shell...

On Monday, July 16, 2012 9:35:31 PM UTC-5, Melissa Silverio wrote:


 I'm trying to implement the use of a Java native library called JNetpCap 
 which 
 works with the handling of network packets.

 I installed the libjnetpcap.so and the jnetpcap.jar in my application. 
 Also I ran the application as root.


 After making the capturing of the packets with tcpdump and saving it to a 
 output.pcap file, i tried to use to manipulate the packets jnetpcap ..
 This is the code i used:

 end = new ArrayList packets ArrayList ();
 Pcap.openOffline pcap packet = (/ sdcard / output.pcap, errbuf);

 JPacketHandler handler = new JPacketHandler () {

 / / Defining the action That Will Be Performed Each time a packet is
 / / Read for the file.
 / / @ Override
 public void nextPacket (JPacket packet, String user) {
 packets.add (packet);
 }
 packet.dispatch (-1, handler, null);
 packet.close ();

 and here are the errors it returns:

 android.os.Looper.loop (Looper.java: 123)
 android.os.Handler.dispatchMessage (Handler.java: 99)
 jnetpcap.Pcap.dispatch (Unknown Source)
 

 What are the steps for using Java native libraries in Android?

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

[android-developers] Re: Best books for learning Android

2012-07-14 Thread Jason Hsu
Thanks so much for your suggestions.  As a result, I have subscribed to 
Mark Murphy's books.

Mark, your books provide great examples of Android apps that actually 
work.  And you weren't fooling about being up-to-date, because the new 
edition you just released INCLUDES the changes in the latest version of 
Eclipse.  (I'm referring to the procedure for starting a project, which is 
somewhat different from that in the earlier version of Eclipse/ADT.)

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

[android-developers] Best books for learning Android

2012-07-01 Thread Jason Hsu
I'm considering purchasing an Android development book.  The fact that I 
have published my first Android app (Upgrade Your Cereal, available at 
https://play.google.com/store/apps/details?id=com.jasonhsu.upgradeyourcereal) 
certifies that I understand the very basics.  At the same time, I have just 
barely scratched the surface.

I've been finding that most of the tutorials out there miss critical 
details needed to make the apps work properly.  I need to move well beyond 
the Hello World stage.

What Android development books would you recommend?  I'm considering the 
purchase of _Android in Practice_.  It has great reviews on Amazon, and it 
sounds very practical.

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

[android-developers] Re: How do I set up the project in the Android site's “Managing the Activity Lifecycle” training exercise?

2012-06-30 Thread Jason Hsu
I just need the step-by-step procedure for getting from the *.zip file to a 
proper implementation in Eclipse.

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

[android-developers] Renderscript Deprecated

2012-06-29 Thread Jason
The latest reference documentation for Renderscript shows half of the API 
now being deprecated. It appears to be directed toward the graphics 
functionality. I just built an entire 3D rendering engine on this API and 
am concerned that it is deprecated so soon after being released. What is it 
being replaced with?! The developer guides and release notes don't say 
anything about this change. The graphics section was removed from the 
developer guide, which now only describes the compute functionality. I only 
see it in the reference docs.

http://developer.android.com/reference/android/renderscript/package-summary.html

Thanks,
Jason

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

[android-developers] Is AUG meeting next Tuesday?

2012-06-29 Thread Jason Hsu
Next Tuesday is July 3rd.  Will this group be meeting?

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

[android-developers] How do I set up the project in the Android site's “Managing the Activity Lifecycle” training exercise?

2012-06-29 Thread Jason Hsu
 

I'm trying to implement the project in the Android site's Managing the 
Activity Lifecycle training exercise at 
http://developer.android.com/training/basics/activity-lifecycle/index.html .

The instructions don't say how to set it up. A *.zip file is provided, but 
I can't figure out how to get it to work. No matter what I do, there are 
errors that keep the project from running.

What is the proper procedure for getting this project to work?

Yes, I have not only completed the Building Your First App tutorial but 
also published an app on Google Play. (It's a fun little app called Upgrade 
Your Cereal.)  So I have experience in starting and completing projects, 
but this is the first time I've tried to start a project SOLELY from a 
*.zip file.

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

[android-developers] Re: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-26 Thread Jason Meyer
As Dianne already guessed, my intentions are semi-misguided. I am a
researcher in the field of mobile malware, which is why I asked (and
nope, this ain't my real name ;) ). Just to be sure I wanted some
confirmation for my guesses.

If all goes well, the result of my current work will be some change
proposals for future Android releases. Something in between the
current state and SEAndroid - but less intrusive to the existing
code base and the user experience as compared to SEAndroid. The
primary objective is some hardening of the Android platform against
malware which is capable of acquiring root privileges.

Still, this is going to take a while and the results are still not
100% certain.

Anyways, thanks a mountain for clearing things up for me!

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


[android-developers] Re: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-25 Thread Jason Meyer


On 25 Jun., 02:26, Dianne Hackborn hack...@android.com wrote:
 Why do you care if there is a perms tag?
Because I figured that is what controls which Permissions can be used
by apps. At least for apps stored in user space (/data/app/) this
seems to be true. As stated here, you can revoke permissions granted
at installation by editing the packages.xml file:
http://elinux.org/Android_Security#Changing_application_security_permissions_after_installation

 applications in the system image must still explicitly request the
 permissions they need, and they have to follow the rules as anyone else:
What do you mean by explicitely request? List them in their
AndroidManifest.xml?

 The only  exception is the signatureOrSystem permission type, which
 means the  permission can be granted to an app signed with the same
 cert (whether it is in the system image or a third party app), *or* to any
 app installed on the system image.  There are a handful of such
 permissions, but it isn't the common case.
Does this only apply for all permissions protected by
signatureOrSystem, or does this also apply to permissions with a
lower protection level such as dangerous?
I.e., is there a relation regarding protection level strictness like:
signature  signatureOrSystem  dangerous  normal?
So that apps in /system/app/ will be granted permissions with a
protection level equal to or below signatureOrSystem?

If the above does not hold, will system apps just not be granted
dangerous protection level permissions? Because as far as I can
judge from my packages.xml, many system apps there make use of
dangerous permissions.

 As for why there are no permissions stored in packages.xml: there is no
 need, because they can just be re-evaluated each boot when scanning the
 packages.
Then why are they stored for user apps (stored in /data/app/)?

 If you use the package manager APIs to find out the permissions that are
 held by each app, you will see that the system applications are granted the
 permissions they request as per the rules.
Again: What dou you mean by request? Putting them in your
AndroidManifest.xml? Because for all apps I wrote, I never explicitely
requested any permission in my code. Only through the Manifest file.

Chris Stratton:
 Yes, but wanting to understand how things work is an endemic amongst 
 engineers.
Exactly :D

Sorry if this is the wrong group, I was referred here by someone else.

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


[android-developers] Re: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-24 Thread Jason Meyer
Hey everyone,

I checked back all the details you gave me. However, my findings are
still not satisfactory.

The shared UID bit turned out to be true - for some of the packages
stored in /system/app/, but unfortunately not for all. System apps
with a shared user ID usually get their permissions defined in a
section distinct for every shared user ID. There one can also find the
perms block related to that specific shared user ID. One example
would be android.uid.shared, which is used by many Android OS apps.


However, there are apps which do not have a shared user ID, but a user
ID of their own - and still come without a perms block. One example
is the /system/app/FileManager.apk package, which is preinstalled on
my testing device. Every single system app not making use of a shared
user ID lacks a perms block.

... so for those, I'm back to square one ;)

I still don't know where their permissions are stored, and it's
definitely not in the packages.xml file. Are permissions for those
just granted at will, without checking the packages.xml file?

Could maybe an Android dev from Google provide a statement on this
matter?

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


[android-developers] Re: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-24 Thread Jason Meyer
I am not sure if it's a standard Android component, and indeed I guess
it's not. Still, the possibility exists. However, other system apps
show the same behavior regarding their packages.xml entries.

Anyway, here's the whole block:

package name=com.android.filemanager codePath=/system/app/
FileManager.apk flags=1 ts=1314087422000 version=1
userId=10036
  sigs count=1
cert index=1/
  /sigs
/package

I would guess that a file manager would typically at least have
WRITE_EXTERNAL_STORAGE permission.


Another example: The Google-provided Youtube app, also a system app as
it's installed in /system/app/:

package name=com.google.android.youtube codePath=/system/app/
YouTube.apk flags=1 ts=1314087422000 version=2106
userId=10031
  sigs count=1
cert index=9/
  /sigs
/package

No shared user ID, no perms block. Still, I would guess it would need
INTERNET permission.


One last example, which would usually require RECORD_AUDIO permission:

package name=com.android.soundrecorder codePath=/system/app/
SoundRecorder.apk flags=1 ts=1314087422000 version=8
userId=10043
  sigs count=1
cert index=1 key=30.../
  /sigs
/package

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


[android-developers] Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-18 Thread Jason Meyer
Hi everyone,

after doing a bit of research I've gotten very curious:
Where are the permissions stored which were granted to apps installed
in /system/app?

I checked out my phone's packages.xml file (located in /data/system/
packages.xml). User apps stored in /data/app/ have perms, but none
of the APK files stored in /system/app has a perms block.

How come? Where are their permissions stored? Or are permissions just
granted to apps with APK files in /system/app/ on demand?

Regards,

Jason


PS: For those w/o prior knowledge: Android has two directories for
storing app APK files: 1) /data/app/ and /system/app/. The latter is
on a read-only partition and stores system apps such as the Phone
app. /data/app/ is where apps from Google Play Store are saved. On
installation from the Play Store through the Market app, permissions
are inserted in /data/system/packages.xml. However, for apps in /
system/app/, this does not seem to be the case. Thus, I am wondering
if they are granted any permissions at will.

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


[android-developers] Re: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-18 Thread Jason Meyer
Thanks for your quick reply, Mark.

Nonetheless, I am still wondering: Does that mean that an app stored
as APK in /system/app/ can use any permission which is =
signatureOrSystem? Or can only permissions == signatureOrSystem be
made use of? (the latter is definitely not the case, see below)

As I already mentioned, every app in /data/system/packages.xml which
was stored in /system/app/ had NO perms-Block. Not a single one. And
I highly doubt that preinstalled apps such as the Phone App only
utilize signatureOrSystem-Permissions. For example, the
android.permission.CALL_PHONE has a protectionLevel of dangerous and
is used by the preinstalled Phone app. However, this permission is not
denoted in /data/system/packages.xml for the Phone app.

Hence, I suspect that any app stored in /system/app/ is granted any
permission equal to or below signatureOrSystem level.

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


[android-developers] Re: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-18 Thread Jason Meyer
  Nonetheless, I am still wondering: Does that mean that an app stored
  as APK in /system/app/ can use any permission which is =
  signatureOrSystem?

 Well, sure, if they request it, just like any other SDK app.
I am not quite sure what you mean by request it. As far as I know,
there is no API request call or method to grant a certain
permission.
If by request you mean the requesting done on installation: nope, this
does not apply, as apps in /system/app/ are usually preinstalled.
Hence, no market app requesting permissions to be granted by the user.


 I have no idea what the perms block is. That sounds like a firmware
 detail, which is out of scope for this list.
Nope, it's not a firmware detail. Every app which is installed via the
Market app (e.g., from the Google Play Store) is processed in the
three following steps:
1) Download of the APK file
2) Placing of APK file in /data/app/
3) Insertion of the app's permissions in /data/system/packages.xml
inside a perms-block

The perms-block in packages.xml specifies which permissions were
granted to an app installed from an app market.

However, no perms-blocks exist for apps stored in /system/app/,
which is exactly what I'm curious about ;)


 Only if they ask for them, like any other SDK application.
What exactly do you mean by asking? AFAIK API calls under protection
by certain permissions are controlled automatically and implicitly for
clearance. There is not explicit/expressed request. At least I
haven't carried out one in any of my apps programmed thus far, and it
worked.
Or do you mean by asking the Manifest file? It isn't checked on every
app's start up, to my knowledge. That's what the packages.xml file is
for.


 I haven't checked exhaustively, but it would appear that they are
 using the sharedUserID mechanism (even if only one app package is
 doing the sharing).
I'm going to check into this and report back, thanks.

However, every system app sharing the same user ID and thus getting
extensive permissions seems a bit... risky.

 Permissions defined by system apps (for use by other apps) seem to be
 in individual files under /etc/permissions
Going to check that out too.

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


[android-developers] Your favorite tutorials

2012-06-12 Thread Jason Hsu
What are your favorite Android development tutorial apps?  I don't like 
most of the Android tutorials I see.  All too often, they don't work or are 
explained poorly.  Please post in this thread your favorite tutorials.  
There are only a few that I've tried that I would recommend.

The first is Android web site's Hello World app at 
http://developer.android.com/resources/tutorials/hello-world.html : works 
without a hitch in Android 2.1

The second is the temperature converter app at 
http://androidword.blogspot.com/2010/08/simple-temperature-converter.html 
.  It works with Android 2.1.  The only things missing from this tutorial:
1.  The Package Name you enter at the beginning MUST be de.vogella.android.
tempconvertor.  If it isn't, you get error messages.  (Note that the 
Convert.java file has the line package de.vogella.android.tempconvertor;)
2.  The Activity Name you enter at the beginning MUST be  Convert.  If it 
isn't, you get error messages.  (Note that the Convert.java file has the 
line public class Convert extends Activity {)

The third tutorial I recommend is a simple two-button app at 
http://blog.idleworx.com/2011/06/build-simple-android-app-2-button.html .

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

Re: [android-developers] Re: I am getting an error uses-feature

2012-05-30 Thread Jason Teagle
Missing closing quotes ( before the / ) on the following 2 lines: 

 uses-feature android:name=android.hardware.sensors/ 
   uses-feature android:name=android.hardware.camera/  


(and 


uses-feature android:name=android.hardware.touchscreen/

above those two.) 



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


[android-developers] notifyDataSetChanged() Timing of Events on UI Thread

2012-05-30 Thread Jason Teagle
I'm subclassing BaseAdapter to simply serve up images for a GridView based 
on internal data.


The main UI allows the user to drag these images 'off' the grid. The drag 
image is a separate ImageView vying for Z order with the grid in their 
parent layout. Whenever I reposition the drag image using layout(), it 
automatically comes to the top and looks as you'd expect.


When the user first clicks the grid and I've worked out which list position 
is under the pointer, I am calling a method on the adapter to change the 
underlying data to reflect the image having 'gone' from that position. I 
thus use notifyDataSetChanged() to flag to the UI that it needs to refresh 
from the adapter.


All of this and the dragging mechanism works absolutely fine, with just one 
tiny glitch - it seems that notifyDataSetChanged() (or the GridView, which I 
assume is an observer) waits for the UI thread to become free before it 
actually refreshes the grid - which makes perfect sense. The problem is, 
that seems to bring the grid back to the top of the Z order, popping my drag 
image to the back. If you click the grid and leave the pointer in that 
position for a moment, the image appears to completely disappear until you 
move the pointer and the correct Z order is re-established with the drag 
image on top.


What is the best way to either

* Be notified that the grid was actually refreshed so that I can manually 
re-establish the Z order without waiting for pointer movement,


* Or schedule a call to bringToFront() so that it also goes on the end of 
the UI's queue, thus happening after the grid has been refreshed


I.e.,

m_overlayImage.setVisibility(View.VISIBLE); // Drag image first becomes 
visible.
m_adapter.setData(gridRowIndex, gridColIndex, 0);  == Calls 
notifyDataSetChanged().


m_overlayImage.bringToFront(); == Can I delay this until the UI thread is 
free?




* Or a third option? Is there such a thing as stay-on-top semantics for a 
view, or some sort of overlay view with transparency such as desktop Java's 
GlassPane that I could add the drag image view to instead? I can't find 
anything that looks promising in the docs... so far.


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


Re: [android-developers] what if package is uninstalled while another package holds its Context?

2012-05-29 Thread Jason Teagle

(To the OP)

I may be missing something here, but why do you use a cached reference to 
package B's context?


I believe you said that trying to grab the context after B has been 
uninstalled fails, as expected - so why not use this as a test to see 
whether A should be allowed to go ahead and use those assets? Why not try 
and grab B's context afresh each time you want to access the files, and 
avoid trying to do so if the grab fails?


If it's for performance reasons, you could at least try and re-grab it every 
15 minutes - that wouldn't be such a bad hit.


Presumably if A is already using those assets while B is being uninstalled, 
you wouldn't want the code to just die - package A should at least be 
allowed to finish what it was doing; and if it is hogging those assets for a 
long period of time... that sounds like an area that could do with a little 
reconsideration as well.



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


Re: [android-developers] back arrow

2012-05-23 Thread Jason Teagle

In my app a make button which is function to open item which has been open
before that-back button...but i whant to implement that function in button 
on

android phone...button looks like arrow...


In your the activity you launch from your first button:

@Override
public void onBackPressed()
{
   // Close this activity...
}

(requires API level 5 or higher)

or

@Override
public boolean onKeyDown(int keyCode, KeyEvent event)
{
   if (keyCode == KeyEvent.KEYCODE_BACK)
   {
   // Close this activity...
   return true;
   }
   return super.onKeyDown(keyCode, event);
}



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


Re: [android-developers] Create an object class but error

2012-05-23 Thread Jason Teagle

I've create an object class but it cannot work. any mistake of my code?



private void setName() {
// TODO Auto-generated method stub
getNameText();
for (int i=0; iNUM_PLAYER; i++){
player.setPlayerName(name); // name is a String get from EditText by some 
code before

}
}



when I run the programme, it have the following error code:



05-23 09:24:35.115: E/AndroidRuntime(438): java.lang.NullPointerException
05-23 09:24:35.115: E/AndroidRuntime(438):  at hktsang56.android.mjhelper
.name_input.setName(name_input.java:81)


Which of the lines in your source code is line 81? Is it the line that says 
getNameText()? We need to see that method's definition, if that is the case, 
since I can't see any other problem (if 'name' were coming out null, then 
the error would be in setPlayerName() rather than in setName() - in fact it 
probably wouldn't generate an error in such a case).


Show us the code for getNameText(). You are possibly trying to access a 
control that you have not filled out correctly.





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


Re: [android-developers] How to develop the screen like applications menu screen in android

2012-05-22 Thread Jason Teagle

means if more than 9 icon images the the other should include to the
next page like in applications list as grid.
can anybody suggest me to implement this


Take a look at the ViewPager class. 



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


Re: [android-developers] Re: How can I send an image from an sql database to an android client?

2012-05-22 Thread Jason Teagle
It does seem to decode the string into bytes(ie: not null), but the image 
that is
made from thos bytes by the bitmapfactory is null. -- 


You need to confirm that the decoded bytes at the client end match the 
original bytes at the server end. Can you manually download the image in 
question and look at its byte contents with a hex editor or something, and 
dump out the contents of the image bytes as you receive them at the client 
from the call to Base64.decode() as hex byte strings to LogCat or similar so 
you can do an ASCII / byte comparison? Not an easy thing to do, but if it's 
working up until that point you need to confirm the bytes are the same. If 
the image header has been corrupted, lost or has had an extra bit tacked 
onto the front for some strange reason then that could explain the failure 
at the BitmapFactory point.


Can you confirm you are not accidentally leaving any CRLF pairs in the 
string when decoding to bytes? Not sure if they would come from simply 
streaming the data back via HTTP (wouldn't expect it) but couldn't hurt to 
check.



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


Re: [android-developers] Button is not actionable when i set to button background color

2012-05-21 Thread Jason Teagle

issue is in single alert box we display 16 buttons with different back
ground colors and we handling the listener for getting the  result
which button is clicked(setonclick listener) but button is not
actionable(requirement is Color selector box).


It seems unlikely that just changing its colour would make any difference. 
Try temporarily *not* changing the background colour of the buttons - do 
they now become 'actionable'?


When you say 'not actionable', what exactly do you mean? Do you mean that 
you are not going through your listener's onClick() method? How do you know 
this - have you tried using a quick Toast to prove (or disprove) you are at 
least getting *into* that method? (It may be getting into the method, but 
something goes wrong later in the method and it doesn't complete all the 
actions you are expecting).


Anything unexpected in the LogCat?

If neither of the above quick things help for testing purposes, try 
temporarily creating a new project with one activity and two buttons, set 
one's background colour to yellow and leave the other one with its normal 
colour. Add the listener to both and put a little Toast in the onClick() to 
show it gets that far. If *that* doesn't work, then post the code for that 
*test* project so we can see how you're doing things (one activity + two 
buttons should be a nice, short piece of code).


If the test project works, then it suggests something else in your main 
project is interfering and you'll have to start commenting bits out until 
you find the culprit.



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


Re: [android-developers] Re: Import Contacts from .vcf file in Android 2.1

2012-05-20 Thread Jason Teagle

I don't know how to use this .vcf file to import all these contacts
using code. The .vcf file contains all the details of all contacts
including photos etc.


Please try to use search engines to find what you need before asking. A 
Google search took 5 seconds:


http://en.wikipedia.org/wiki/VCard

It lists the applicable RFC files.


And the same question asked by the OP at the same time on StackOverflow:

http://stackoverflow.com/questions/4144193/import-contacts-from-vcf-file-in-android-2-1


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


Re: [android-developers] protected static boolean

2012-05-19 Thread Jason Teagle
And that will throw me a NullPointerException.
I guess that its something simple, but maybe somebody could point me
in the right direction here?

This is the variable you have declared as the parameter: 

protected static boolean isProInstalled(Context __context__) {


This is what you then try to do with it: 

PackageManager manager = __context__.getPackageManager();
if (manager.checkSignatures(__context__.getPackageName(),


This is the value you are passing for that parameter: 

if (isProInstalled(__null__) {



What did you *expect* to happen if you try to call a method on a variable that 
now contains null? 

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

  1   2   3   4   5   6   7   8   9   10   >