[android-developers] Does WiFiDirect Service Discovery work using SERVICE_TYPE_ALL protocol type?

2014-11-18 Thread Nate B
Does WiFiDirect Service Discovery work using SERVICE_TYPE_ALL protocol type?

I have modified the WifiDirect service discovery sample application to 
discover all wifiDirect services. When I run the sample I don't discover 
any of the WifiDirect services that I know are running in my area. The code 
never makes it to the onServiceAvailable() override method. Is 
SERVICE_TYPE_ALL feature supported? Snippet of my code:

manager.setServiceResponseListener(channel, new 
WifiP2pManager.ServiceResponseListener() {...});

serviceRequestForAll = 
WifiP2pServiceRequest.newInstance(WifiP2pServiceInfo.SERVICE_TYPE_ALL, 
null);

manager.addServiceRequest(channel, serviceRequestForAll, new 
ActionListener() { ...});

manager.discoverServices(channel, new ActionListener() { ... });

Is there some other way that I can do a WiFiDirect Service Discovery and 
retrieve all of the WiFiDirect Services that are being advertised?

-Nate

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


[android-developers] How to change Bluetooth Visibility timeout to always discoverable for ICS?

2012-06-29 Thread Nate B
Can anyone help me? I need know how to programmatically set the
Bluetooth visibility timeout to always discoverable for android
devices running ICS. I'm using the the snippet of code that you can
find on the android dev sit for Bluetooth. When the code runs the
enabling discoverability dialog will say always discoverable but
discoverability will still timeout. One thing of note, if I manually
change the Bluetooth visibility timeout to Never time out things
work as expected. But I can't expect a user to manually make this
change for my software to work. Any help would be appreciated.

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


[android-developers] What coding languages do I need to know to develop an android app?

2011-10-31 Thread nate
Hi I was wondering what the main programming languages used in andriod
app development are. I know a little c++ and javascript. I'd like to
make an app that uses data from AdGenesis. The app would reward people
for watching targeted ads with points redeemable for ipods and such.
How much would it cost to have an Android developer make the app 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: Reading from CERT.RSA from META-INF directory

2011-06-21 Thread Nate Totura

Ahh, I see what you are saying now, I have never used those (JarFile/
JarEntry) APIs before.

Thank you!

On Jun 15, 6:25 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Thu, Jun 16, 2011 at 3:18 AM, Nate Totura ntot...@gmail.com wrote:
  To clarify, I would like to do this at runtime. Access to the
  certificate information at runtime is really what I want.

 That doesn't clarify much... If  want to read it from an apk,
 use JarFile.

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

2011-06-15 Thread Nate Totura
To clarify, I would like to do this at runtime. Access to the
certificate information at runtime is really what I want.
-Nate

On Jun 14, 7:39 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Wed, Jun 15, 2011 at 2:57 AM, Nate Totura ntot...@gmail.com wrote:
  Is it possible to read files in the META-INF directory such as the
  CERT.RSA file?

 Sure. What exactly are you trying to do? Read from jar file?
 Read from exploded jar file? What do you need those file for?
 You really need to provide more details to get a useful answer.



  I have tried the following:

   AssetFileDescriptor afd = am.openNonAssetFd(META-INF/CERT.RSA);

  but I get the exception:

   java.io.FileNotFoundException: This file can not be opened as a file
  descriptor; it is probably compressed

 Why are you using the AssetManager for this? If this is a jar/apk,
 look at JarFile/JarEntry for ideas.

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


[android-developers] Reading from CERT.RSA from META-INF directory

2011-06-14 Thread Nate Totura
Is it possible to read files in the META-INF directory such as the
CERT.RSA file?

I have tried the following:

 AssetFileDescriptor afd = am.openNonAssetFd(META-INF/CERT.RSA);

but I get the exception:

 java.io.FileNotFoundException: This file can not be opened as a file
descriptor; it is probably compressed


If that file is really compressed, is there a way to still open it for
read access?

Thanks,
Nate

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


[android-developers] Re: In-app purchase signature verification with PHP openssl

2011-04-25 Thread Nate Totura
Thanks for the help, you were correct, the data I was using to test
everything was in a file an had an extra newline appended to the end.

On Apr 20, 7:37 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Thu, Apr 21, 2011 at 6:24 AM, Nate Totura ntot...@gmail.com wrote:

  Still no luck, I am pretty confident I am sending the PHP routines
  correctly formatted data.

  A followup question:
  How can I verify the signature and data using only openssl, here is
  what I am currently doing:

    openssl dgst -sha1 -verify public.key.ssl -signature signature.bin
  data

 What you are doing is correct. Just make sure that the data file has
 no trailing newlines (use a binary editor to remove them, or save as
 binary from your Java or PHP program). I just tried it with a response from
 Market, it verifies OK.

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


[android-developers] Re: In-app purchase signature verification with PHP openssl

2011-04-20 Thread Nate Totura

Still no luck, I am pretty confident I am sending the PHP routines
correctly formatted data.

A followup question:
How can I verify the signature and data using only openssl, here is
what I am currently doing:

   openssl dgst -sha1 -verify public.key.ssl -signature signature.bin
data

where public.key.ssl is the public key string (publickey.raw) from the
developer profile converted to PEM with:
   openssl enc -base64 -d -in publickey.raw -A | openssl rsa -inform
DER -pubin  public.key.ssl
signature.bin is the signature value decoded from base64 with:
   openssl enc -base64 -d -in signature -A  signature.bin

the openssl dgst ... command returns: Verification Failure

Thanks,
Nate








On Apr 13, 7:48 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Thu, Apr 14, 2011 at 2:05 AM, Nate Totura ntot...@gmail.com wrote:

  Thanks, the openssl_sign() php function is just being used to verify
  that if I sign something myself, instead of using the Google returned
  version, that it works in my php verification code. The openssl_sign()
  does return binary and I am encoding it to base64 before using it
  elsewhere.

 I don't use PHP, but my point is that if openssl_sign() returns binary,
 it stands to reason that openssl_verify() expects binary as well. So
 you need to Base64-decode what you got from Google before you
 feed it to openssl_verify() if you are not already doing so. If you are,
 make sure you are not changing the format (new lines, etc):
  depending on how forgiving the Base64 decoder is you might get
 a slightly different binary blob. You can try this to check:

 1. Base64 decode, then hex dump in Java (your app)
 2. Do the same in PHP
 3. Compare the two hex strings

 Also make sure the signature algorithm is the same as in Java
 SHA1withRSA (this is probably the default though).

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


[android-developers] In-app purchase signature verification with PHP openssl

2011-04-13 Thread Nate Totura

In an attempt to follow some of the security guidelines for in-app
purchase here:
http://developer.android.com/guide/market/billing/billing_best_practices.html

I am trying to do signature validation on a server instead of in the
app iteself. I would ideally like to use the php openssl libraries and
it looks like code such as the following should work:

?php
// $data and $signature are assumed to contain the data and the
signature

// fetch public key from certificate and ready it
$fp = fopen(/src/openssl-0.9.6/demos/sign/cert.pem, r);
$cert = fread($fp, 8192);
fclose($fp);
$pubkeyid = openssl_get_publickey($cert);

// state whether signature is okay or not
$ok = openssl_verify($data, $signature, $pubkeyid);
if ($ok == 1) {
echo good;
} elseif ($ok == 0) {
echo bad;
} else {
echo ugly, error checking signature;
}
// free the key from memory
openssl_free_key($pubkeyid);
?

I replace signature with the base64 decoded signature string in the
app purchase bundle and the use the data from the same bundle. The
public key needs to be in PEM format and I added the BEGIN and END
tokens and some line breaks.

My problem is that I can not get this PHP code to successfully verify
the data/signature and I do not know what needs to change to get it to
work correctly.

If I use openssl, create a private and public key, create a signature
for the same data using sha1 and run it through the above php code, it
works fine and validate successfully.

Here is how I use OpenSSL:

  openssl genrsa -out private.pem
  openssl rsa -in private.pem -pubout -out public.pem
then i use the private.pem and some php code to generate a signature:
...
openssl_sign($data, $signature, $pkeyid);
...

Does anyone have any working sample php code with server side
validation of in-app signatures?

I could just run the equivalent java code that is in the sample
application, and that seems to work ok, but I would like to use php
directly if possible.

Thanks,
Nate



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


[android-developers] Re: In-app purchase signature verification with PHP openssl

2011-04-13 Thread Nate Totura

On Apr 13, 12:27 am, Nikolay Elenkov nikolay.elen...@gmail.com
wrote:
 On Wed, Apr 13, 2011 at 3:44 PM, Nate Totura ntot...@gmail.com wrote:

  I am trying to do signature validation on a server instead of in the
  app iteself. I would ideally like to use the php openssl libraries and
  it looks like code such as the following should work:
 ...

  My problem is that I can not get this PHP code to successfully verify
  the data/signature and I do not know what needs to change to get it to
  work correctly.

  If I use openssl, create a private and public key, create a signature
  for the same data using sha1 and run it through the above php code, it
  works fine and validate successfully.

 What format is the $signature openssl_sign() outputs? Try to print it.
 My guess is that it's binary, whereas the signature you get from
 Market is Base64-encoded. If so, you need to decode the Base64
 and it should work.

Thanks, the openssl_sign() php function is just being used to verify
that if I sign something myself, instead of using the Google returned
version, that it works in my php verification code. The openssl_sign()
does return binary and I am encoding it to base64 before using it
elsewhere.

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

2011-02-08 Thread nate
Thanks for the response.  The assets that I needed for the test
project were specifically built for testing and we could not
distribute them in the assets of our app (we are keeping the app
footprint small), but the workaround I posted above worked fine to get
the assets from the test project.

On Feb 4, 5:04 pm, A. Elk lancaster.dambust...@gmail.com wrote:
 Hmmm.

 ServiceTestCase.getSystemContext() returns the context of the test
 package. ServiceTestCase.getApplication() gets the Application
 instance in use by the service under test. It's probably better to use
 that Application object to look at the assets you want.

 When you wrote getContext(), I didn't understand which class you were
 talking about. In a test case class, calling getContext() will usually
 default to AndroidTestCase.getContext(), which will give you the
 context of the test package. In an instrumented test case like
 ActivityInstrumentationTestCase2, you have an Instrumentation object,
 so you can call getTargetContext() on that object to get the context
 of the instrumented component under test.

 To come back to the original problem, which assets do you need to use?
 Could you build them into your test package as well as the application
 under test, instead of trying to get them from the app on the fly?

 On Feb 4, 11:20 am, nate nat...@cisco.com wrote:







  OK, I found a solution:

  I created a context to our test package and was able to access the
  assets:

  mTestAppContext = getContext().createPackageContext(com.blah.test,
  Context.CONTEXT_IGNORE_SECURITY);

  Just in case anyone else needs a workaround.

  On Feb 4, 10:36 am, nate nat...@cisco.com wrote:

   Also, i put the test assets in the target project's directory and was
   able to access them with:

   getSystemContext().getAssets().list(.)

   On Feb 4, 10:31 am, nate nroy...@gmail.com wrote:

I checked my setUp() method and I do call super.setUp() as the first
line.  The reason I believe the contexts are the same are two-fold:

I tried both:

getSystemContext().getAssets().list(.)
getContext().getAssets().open(.);

and neither of them listed any files.  The second reason is that I
read the code for ServiceTestCase and saw that the getSystemContext()
is just the
same context retrieved by getContext(), but it's grabbed before any
tests have a chance to mess with it(according to the comment in the
code):

@Override
    protected void setUp() throws Exception {
        super.setUp();

        // get the real context, before the individual tests have a
chance to muck with it
        mSystemContext = getContext();

    }

So it would seem that getting the context to the app the testcase is
in is not possible with the ServiceTestCase, unless I am missing
something.

On Feb 3, 9:15 pm, A. Elk lancaster.dambust...@gmail.com wrote:

 What leads you to believe that both Context objects contain the same
 information? If you do a getSystemContext() you should get the context
 that's stored during setUp(). The only thing that might screw this up
 is if you overrode setUp() but forgot to call super.setUp() first.

 On Feb 2, 2:08 pm, nate nroy...@gmail.com wrote:

  Hey Everyone,
     I don't know if I am doing something wrong here, but when I am
  trying to use the ServiceTestCase class to test my Service, I cannot
  get a context which points to the test project.  getContext() and
  getSystemContext() both seem to point to the target project's
  context.  The reason I need the context of my test app is that i 
  have
  some assets which i need to be able to use in order to test the
  service in question.  Does anyone know of a workaround or could 
  point
  me at a way of resolving this?  (i looked through the source of
  ServiceTestCase and didn't see another way)

  Something similar to instrumentationtestcase's
  getInstrumentation.getContext() is what I am looking for.

  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: ServiceTestCase and Contexts

2011-02-04 Thread nate
I checked my setUp() method and I do call super.setUp() as the first
line.  The reason I believe the contexts are the same are two-fold:

I tried both:

getSystemContext().getAssets().list(.)
getContext().getAssets().open(.);

and neither of them listed any files.  The second reason is that I
read the code for ServiceTestCase and saw that the getSystemContext()
is just the
same context retrieved by getContext(), but it's grabbed before any
tests have a chance to mess with it(according to the comment in the
code):

@Override
protected void setUp() throws Exception {
super.setUp();

// get the real context, before the individual tests have a
chance to muck with it
mSystemContext = getContext();

}

So it would seem that getting the context to the app the testcase is
in is not possible with the ServiceTestCase, unless I am missing
something.



On Feb 3, 9:15 pm, A. Elk lancaster.dambust...@gmail.com wrote:
 What leads you to believe that both Context objects contain the same
 information? If you do a getSystemContext() you should get the context
 that's stored during setUp(). The only thing that might screw this up
 is if you overrode setUp() but forgot to call super.setUp() first.

 On Feb 2, 2:08 pm, nate nroy...@gmail.com wrote:







  Hey Everyone,
     I don't know if I am doing something wrong here, but when I am
  trying to use the ServiceTestCase class to test my Service, I cannot
  get a context which points to the test project.  getContext() and
  getSystemContext() both seem to point to the target project's
  context.  The reason I need the context of my test app is that i have
  some assets which i need to be able to use in order to test the
  service in question.  Does anyone know of a workaround or could point
  me at a way of resolving this?  (i looked through the source of
  ServiceTestCase and didn't see another way)

  Something similar to instrumentationtestcase's
  getInstrumentation.getContext() is what I am looking for.

  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: ServiceTestCase and Contexts

2011-02-04 Thread nate
Also, i put the test assets in the target project's directory and was
able to access them with:

getSystemContext().getAssets().list(.)

On Feb 4, 10:31 am, nate nroy...@gmail.com wrote:
 I checked my setUp() method and I do call super.setUp() as the first
 line.  The reason I believe the contexts are the same are two-fold:

 I tried both:

 getSystemContext().getAssets().list(.)
 getContext().getAssets().open(.);

 and neither of them listed any files.  The second reason is that I
 read the code for ServiceTestCase and saw that the getSystemContext()
 is just the
 same context retrieved by getContext(), but it's grabbed before any
 tests have a chance to mess with it(according to the comment in the
 code):

 @Override
     protected void setUp() throws Exception {
         super.setUp();

         // get the real context, before the individual tests have a
 chance to muck with it
         mSystemContext = getContext();

     }

 So it would seem that getting the context to the app the testcase is
 in is not possible with the ServiceTestCase, unless I am missing
 something.

 On Feb 3, 9:15 pm, A. Elk lancaster.dambust...@gmail.com wrote:







  What leads you to believe that both Context objects contain the same
  information? If you do a getSystemContext() you should get the context
  that's stored during setUp(). The only thing that might screw this up
  is if you overrode setUp() but forgot to call super.setUp() first.

  On Feb 2, 2:08 pm, nate nroy...@gmail.com wrote:

   Hey Everyone,
      I don't know if I am doing something wrong here, but when I am
   trying to use the ServiceTestCase class to test my Service, I cannot
   get a context which points to the test project.  getContext() and
   getSystemContext() both seem to point to the target project's
   context.  The reason I need the context of my test app is that i have
   some assets which i need to be able to use in order to test the
   service in question.  Does anyone know of a workaround or could point
   me at a way of resolving this?  (i looked through the source of
   ServiceTestCase and didn't see another way)

   Something similar to instrumentationtestcase's
   getInstrumentation.getContext() is what I am looking for.

   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: ServiceTestCase and Contexts

2011-02-04 Thread nate
OK, I found a solution:

I created a context to our test package and was able to access the
assets:

mTestAppContext = getContext().createPackageContext(com.blah.test,
Context.CONTEXT_IGNORE_SECURITY);

Just in case anyone else needs a workaround.

On Feb 4, 10:36 am, nate nat...@cisco.com wrote:
 Also, i put the test assets in the target project's directory and was
 able to access them with:

 getSystemContext().getAssets().list(.)

 On Feb 4, 10:31 am, nate nroy...@gmail.com wrote:







  I checked my setUp() method and I do call super.setUp() as the first
  line.  The reason I believe the contexts are the same are two-fold:

  I tried both:

  getSystemContext().getAssets().list(.)
  getContext().getAssets().open(.);

  and neither of them listed any files.  The second reason is that I
  read the code for ServiceTestCase and saw that the getSystemContext()
  is just the
  same context retrieved by getContext(), but it's grabbed before any
  tests have a chance to mess with it(according to the comment in the
  code):

  @Override
      protected void setUp() throws Exception {
          super.setUp();

          // get the real context, before the individual tests have a
  chance to muck with it
          mSystemContext = getContext();

      }

  So it would seem that getting the context to the app the testcase is
  in is not possible with the ServiceTestCase, unless I am missing
  something.

  On Feb 3, 9:15 pm, A. Elk lancaster.dambust...@gmail.com wrote:

   What leads you to believe that both Context objects contain the same
   information? If you do a getSystemContext() you should get the context
   that's stored during setUp(). The only thing that might screw this up
   is if you overrode setUp() but forgot to call super.setUp() first.

   On Feb 2, 2:08 pm, nate nroy...@gmail.com wrote:

Hey Everyone,
   I don't know if I am doing something wrong here, but when I am
trying to use the ServiceTestCase class to test my Service, I cannot
get a context which points to the test project.  getContext() and
getSystemContext() both seem to point to the target project's
context.  The reason I need the context of my test app is that i have
some assets which i need to be able to use in order to test the
service in question.  Does anyone know of a workaround or could point
me at a way of resolving this?  (i looked through the source of
ServiceTestCase and didn't see another way)

Something similar to instrumentationtestcase's
getInstrumentation.getContext() is what I am looking for.

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] ServiceTestCase and Contexts

2011-02-03 Thread nate
Hey Everyone,
   I don't know if I am doing something wrong here, but when I am
trying to use the ServiceTestCase class to test my Service, I cannot
get a context which points to the test project.  getContext() and
getSystemContext() both seem to point to the target project's
context.  The reason I need the context of my test app is that i have
some assets which i need to be able to use in order to test the
service in question.  Does anyone know of a workaround or could point
me at a way of resolving this?  (i looked through the source of
ServiceTestCase and didn't see another way)

Something similar to instrumentationtestcase's
getInstrumentation.getContext() is what I am looking for.

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] Proguard configuration question

2010-12-27 Thread Nate Totura
 
I have a version of file android.webkit.WebViewClient in my application 
source directory in order to handle onReceivedSslError in my own extended 
version of WebViewClient. When I use the new ProGuard integration in sdk-9 I 
get the following warning which breaks the build:
 
 [proguard] Warning: library class android.webkit.WebView depends on program 
class android.webkit.WebViewClient
...
 [proguard] Warning: there were 1 instances of library classes depending on 
program classes.
 [proguard]  You must avoid such dependencies, since the program 
classes will
 [proguard]  be processed, while the library classes will remain 
unchanged.
 
 
My question is, what do I need to put in the ProGuard.cfg file in order to 
get rid of this warning? 
 
Thanks,
Nate
 
 
 

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

2010-12-06 Thread Nate
Is the fix ready yet? :D

-Nate


On Dec 6, 5:00 pm, Mario Zechner badlogicga...@gmail.com wrote:
 Awesome thanks a bunch :)

 On 7 Dez., 01:54, Xavier Ducrohet x...@android.com wrote:

  hey all, we found the issue. It's related to referencing java project.

  We're looking at pushing a fix to ADT asap. In the meantime you can
  temporarily change to including your java project as a jar file.

  On Mon, Dec 6, 2010 at 4:42 PM, Mario Zechner badlogicga...@gmail.com 
  wrote:
   I have the exact same issue. I went the exact same route as the
   original poster. The verbose output of all the Android tools in
   Eclipse is not all that verbose it turns out. However, digging up
   the .log file in $workspace/.metadata/.log brought this up:

   !ENTRY com.android.ide.eclipse.adt 4 0 2010-12-07 01:40:29.576
   !MESSAGE Unable to execute dex: null
   !STACK 0
   java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at 
   com.android.ide.eclipse.adt.internal.build.DexWrapper.run(Unknown
   Source)
          at
   com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(Unknown
   Source)
          at
   com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.bui
ld(Unknown
   Source)
          at org.eclipse.core.internal.events.BuildManager
   $2.run(BuildManager.java:629)
          at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
          at
   org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
   172)
          at
   org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
   203)
          at org.eclipse.core.internal.events.BuildManager
   $1.run(BuildManager.java:255)
          at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
          at
   org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
   258)
          at
   org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j
ava:
   311)
          at
   org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
   343)
          at
   org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
   144)
          at
   org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
   242)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
   Caused by: java.lang.NullPointerException
          at java.io.File.init(Unknown Source)
          at
   com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:
   106)
          at com.android.dx.command.dexer.Main.processOne(Main.java:284)
          at com.android.dx.command.dexer.Main.processAllFiles(Main.java:220)
          at com.android.dx.command.dexer.Main.run(Main.java:176)
          ... 19 more
   Root exception:
   java.lang.NullPointerException
          at java.io.File.init(Unknown Source)
          at
   com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:
   106)
          at com.android.dx.command.dexer.Main.processOne(Main.java:284)
          at com.android.dx.command.dexer.Main.processAllFiles(Main.java:220)
          at com.android.dx.command.dexer.Main.run(Main.java:176)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at 
   com.android.ide.eclipse.adt.internal.build.DexWrapper.run(Unknown
   Source)
          at
   com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(Unknown
   Source)
          at
   com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.bui
ld(Unknown
   Source)
          at org.eclipse.core.internal.events.BuildManager
   $2.run(BuildManager.java:629)
          at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
          at
   org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
   172)
          at
   org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
   203)
          at org.eclipse.core.internal.events.BuildManager
   $1.run(BuildManager.java:255)
          at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
          at
   org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
   258)
          at
   org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j
ava:
   311)
          at
   org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
   343)
          at
   org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
   144

[android-developers] Numeric soft keyboard in webviews

2010-07-23 Thread Nate Totura
I am having a tough time finding an official answer to the question,
Is there a way to automatically show a numeric soft keyboard when the
user clicks on an html input box in a webview?

So I understand that Android 2.1 and earlier does not support the
Input type=number html tags, but there has got to be a
workaround.

Does anyone have any suggestions on how to get a numeric keyboard show
up in a webview?

Thanks,
Nate

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

2010-06-01 Thread Nate
I need to run a service each night at midnight. I would like to use
the AlarmManager to do this.

Can you give me some guidance of how to make it work correctly?


alarmManager =
(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME,
System.currentTimeMillis(), AlarmManager.INTERNAL_DAY, serviceIntent);


Perhaps I need to use a Calendar object to specify the time?  Thanks
for any help!

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


[android-developers] Android Dev for Military Applications

2010-04-02 Thread Nate
There are a few opportunities out there for Android development in the
military. We'd really like to pull in a developer to help our efforts
out on some of these projects - the bulk of the work would go to you.
If you're interested, please let me know. nchenenko at winvale dot com
or 202 296 5505.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: cannot install radio update

2010-03-28 Thread Nate
*bump* Without 2G my phone is not very useful!


On Mar 27, 2:59 am, Nate nathan.sw...@gmail.com wrote:
 Maybe there is somewhere else I can ask?

 On Mar 25, 12:57 am, Nate nathan.sw...@gmail.com wrote:

  No one can offer any suggestions?

  On Mar 24, 12:32 am, Nate nathan.sw...@gmail.com wrote:

   I have a G1 Dev Phone. I am unable to install the 1.6 radio update
   from this page:http://developer.htc.com/adp.html
   The file name is:
   ota-radio-2_22_19_26I.zip
   I push it to the phone as update.zip, do a shell sync, wait 5 minutes,
   reboot into recovery mode, press alt+L, then alt+S. I get:

   -- Install from sdcard...
   Finding update package...
   Opening update package...
   Verifying update package...
   Installing update...
   Installation aborted.

   While it says Verifying update package... a progress bar slowly
   grows in the background. When it gets to about 50%, the next 2
   messages appear and then I'm back to the system recovery menu.

   Why are there no error message? What am I supposed to do now?

   I have tried a factory reset. I have tried redownloading the package
   and doing all the steps again. My phone still works, but I no longer
   get 2G (I'm on an ATT carrier with a SIM from an iPhone, so I have
   never gotten 3G). WIFI and making/receiving calls still works, just no
   2G (which is extremely frustrating).

   I have Googled my eyes and fingertips off. Others are having this
   problem, some exactly the same symptoms, some with error messages. No
   one has had any solutions. I can't imagine I broke my phone by
   following the standard instructions. I want my 2G back!

   I'm already pissed that I paid extra for a Dev Phone when a regular
   phone would have been fine for me. I'll accept that as being my fault
   for lack of research, but I certainly wasn't told that I can't
   download paid apps with a Dev Phone. On top of that, now my phone is
   apparently broken and I have no one to turn to because it is a Dev
   Phone!



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

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


[android-developers] Re: cannot install radio update

2010-03-28 Thread Nate
Fantastic, thank you! It appears the behavior I see happens because
the radio image for 1.5 is the same as 1.6:
http://groups.google.com/group/Android-DevPhone-Updating/browse_thread/thread/38526696b1559b28/d8033d69f8374dbc

Further digging finds that my phone lost its APN settings. Restored
those and it is working again.

My apologies for posting to the wrong group! A series of unfortunate
events had me repeatedly just missing the solution. Thanks for
pointing me the right direction!

-Nate


On Mar 28, 6:27 am, Mark Murphy mmur...@commonsware.com wrote:
 Nate wrote:
  *bump* Without 2G my phone is not very useful!

 The instructions (http://developer.htc.com/adp.html) tell you:

 For discussions and support about updating your Android Dev Phone,
 please head over to the Android-DevPhone-Updating group.

 with a link to:

 http://groups.google.com/group/Android-DevPhone-Updating

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

 Android App Developer Books:http://commonsware.com/books

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

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


[android-developers] Re: cannot install radio update

2010-03-27 Thread Nate
Maybe there is somewhere else I can ask?


On Mar 25, 12:57 am, Nate nathan.sw...@gmail.com wrote:
 No one can offer any suggestions?

 On Mar 24, 12:32 am, Nate nathan.sw...@gmail.com wrote:

  I have a G1 Dev Phone. I am unable to install the 1.6 radio update
  from this page:http://developer.htc.com/adp.html
  The file name is:
  ota-radio-2_22_19_26I.zip
  I push it to the phone as update.zip, do a shell sync, wait 5 minutes,
  reboot into recovery mode, press alt+L, then alt+S. I get:

  -- Install from sdcard...
  Finding update package...
  Opening update package...
  Verifying update package...
  Installing update...
  Installation aborted.

  While it says Verifying update package... a progress bar slowly
  grows in the background. When it gets to about 50%, the next 2
  messages appear and then I'm back to the system recovery menu.

  Why are there no error message? What am I supposed to do now?

  I have tried a factory reset. I have tried redownloading the package
  and doing all the steps again. My phone still works, but I no longer
  get 2G (I'm on an ATT carrier with a SIM from an iPhone, so I have
  never gotten 3G). WIFI and making/receiving calls still works, just no
  2G (which is extremely frustrating).

  I have Googled my eyes and fingertips off. Others are having this
  problem, some exactly the same symptoms, some with error messages. No
  one has had any solutions. I can't imagine I broke my phone by
  following the standard instructions. I want my 2G back!

  I'm already pissed that I paid extra for a Dev Phone when a regular
  phone would have been fine for me. I'll accept that as being my fault
  for lack of research, but I certainly wasn't told that I can't
  download paid apps with a Dev Phone. On top of that, now my phone is
  apparently broken and I have no one to turn to because it is a Dev
  Phone!



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

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


[android-developers] Re: cannot install radio update

2010-03-25 Thread Nate
No one can offer any suggestions?


On Mar 24, 12:32 am, Nate nathan.sw...@gmail.com wrote:
 I have a G1 Dev Phone. I am unable to install the 1.6 radio update
 from this page:http://developer.htc.com/adp.html
 The file name is:
 ota-radio-2_22_19_26I.zip
 I push it to the phone as update.zip, do a shell sync, wait 5 minutes,
 reboot into recovery mode, press alt+L, then alt+S. I get:

 -- Install from sdcard...
 Finding update package...
 Opening update package...
 Verifying update package...
 Installing update...
 Installation aborted.

 While it says Verifying update package... a progress bar slowly
 grows in the background. When it gets to about 50%, the next 2
 messages appear and then I'm back to the system recovery menu.

 Why are there no error message? What am I supposed to do now?

 I have tried a factory reset. I have tried redownloading the package
 and doing all the steps again. My phone still works, but I no longer
 get 2G (I'm on an ATT carrier with a SIM from an iPhone, so I have
 never gotten 3G). WIFI and making/receiving calls still works, just no
 2G (which is extremely frustrating).

 I have Googled my eyes and fingertips off. Others are having this
 problem, some exactly the same symptoms, some with error messages. No
 one has had any solutions. I can't imagine I broke my phone by
 following the standard instructions. I want my 2G back!

 I'm already pissed that I paid extra for a Dev Phone when a regular
 phone would have been fine for me. I'll accept that as being my fault
 for lack of research, but I certainly wasn't told that I can't
 download paid apps with a Dev Phone. On top of that, now my phone is
 apparently broken and I have no one to turn to because it is a Dev
 Phone!

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

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


[android-developers] cannot install radio update

2010-03-24 Thread Nate
I have a G1 Dev Phone. I am unable to install the 1.6 radio update
from this page:
http://developer.htc.com/adp.html
The file name is:
ota-radio-2_22_19_26I.zip
I push it to the phone as update.zip, do a shell sync, wait 5 minutes,
reboot into recovery mode, press alt+L, then alt+S. I get:

-- Install from sdcard...
Finding update package...
Opening update package...
Verifying update package...
Installing update...
Installation aborted.

While it says Verifying update package... a progress bar slowly
grows in the background. When it gets to about 50%, the next 2
messages appear and then I'm back to the system recovery menu.

Why are there no error message? What am I supposed to do now?

I have tried a factory reset. I have tried redownloading the package
and doing all the steps again. My phone still works, but I no longer
get 2G (I'm on an ATT carrier with a SIM from an iPhone, so I have
never gotten 3G). WIFI and making/receiving calls still works, just no
2G (which is extremely frustrating).

I have Googled my eyes and fingertips off. Others are having this
problem, some exactly the same symptoms, some with error messages. No
one has had any solutions. I can't imagine I broke my phone by
following the standard instructions. I want my 2G back!

I'm already pissed that I paid extra for a Dev Phone when a regular
phone would have been fine for me. I'll accept that as being my fault
for lack of research, but I certainly wasn't told that I can't
download paid apps with a Dev Phone. On top of that, now my phone is
apparently broken and I have no one to turn to because it is a Dev
Phone!

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

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


[android-developers] Re: 1.6 VPN Certificate Store

2009-12-13 Thread Nate
Anybody ever find the answer to this?

On Nov 9, 7:37 pm, itsluy its...@gmail.com wrote:
 Same problem here but I'm using 2.0 (droid).

 The documentation doesn't mention this and I don't see what folder i
 should place the certificates in.

 On Oct 10, 12:20 pm, Dida dieter.roth.bay...@googlemail.com wrote:



  I like to setup aVPN/IPSEC connection using the new feature on
  Android 1.6 (Emulator).
  When I try to load usercertificate or cacertificate the list
  doesn't contain anycertificate.
  The certificates are placed on the SD-card in PEM and DER format.

  Any suggestions to import acertificate?- Hide quoted text -

 - Show quoted text -

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


[android-developers] Re: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-04 Thread Nate

My ADC2 submission is called SingSong. It is a competitive singing
game:
http://singthegame.com/
I think it will be a lot of fun! I stressed over it really bad, many
sleepless nights coding, but I think it was worth it in the end.

-Nate


On Sep 2, 7:03 am, Alex iiiypu...@gmail.com wrote:
 Now there are more replies, but I think there are some with apps
 descriptions that were not allowed by moderators, like it was the case
 with mine. So I've re-sent you the post privately using reply to
 author option. Writing this just to see if something will get to the
 group from me or will disappear like a short description of our entry
 I've made few hours ago.

 Alex

 On Sep 2, 12:50 pm, Lout lout.r...@googlemail.com wrote:

  Thanks a lot for the replies. Though many on this thread expect more
  (thousands of) submissions this year, only eight of you have given
  feedback. Would love to hear from many more out there before formally
  publishing anything. Of the 20 thousand developers on this group, less
  than 20 have replied but am sure there are hundreds if not thousands
  who submitted for ADC2.


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

2009-08-29 Thread Nate

How should I be escaping strings for SQLite? I found I was inserting a
string with single quote and this broke. I am now replacing single
quote with two single quotes, but I am wondering what else I should be
escaping, if anything? The SQLite documentation is especially
unhelpful.

I realize this isn't an Android question, but Android uses SQLite and
you should be escaping if you do anything with that part of the
Android API.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] detect headphones plugged in

2009-08-27 Thread Nate

Is it possible to detect if the headphones are plugged in? I couldn't
find anything in the API.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] detect headphones plugged in

2009-08-26 Thread Nate

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



[android-developers] using the music picker

2009-06-29 Thread Nate

I need to allow users of my app to select a song from their music
library. I also need to only show a subset of the songs, based on
artist and title. I implemented this with a ListView and tried to make
it look like the Music app. However, I was wondering if it is possible
to use the MusicPicker activity from the Music app? I found the code:

http://android.git.kernel.org/?p=platform/packages/apps/Music.git;a=blob;f=src/com/android/music/MusicPicker.java

I notice the com.android.music package is not part of the android JAR.
Do I need an additional JAR? I'm guessing not, and that I need to use
an Intent. What intent do I use? How do I filter the songs displayed
based on the artist and title?

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

2009-06-01 Thread Nate

I am using OpenGL ES and drawing a triangle strip with 4 vertices. The
texture I'm drawing was loaded from a PNG using
BitmapFactory.decodeStream. I'm confused as to why my images look so
bad. I took a screenshot and made the following image, which shows the
on-device rendering on top and the actual image on bottom:

http://n4te.com/temp/imgDiff.png

Any idea why there is a difference? I have tried a bunch of different
settings but I can't keep it from looking bad.

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

2009-06-01 Thread Nate

Figured it out: Don't use interlaced PNGs! Silly little checkbox was
checked. ;)

-Nate


On May 31, 11:28 pm, Nate nathan.sw...@gmail.com wrote:
 I am using OpenGL ES and drawing a triangle strip with 4 vertices. The
 texture I'm drawing was loaded from a PNG using
 BitmapFactory.decodeStream. I'm confused as to why my images look so
 bad. I took a screenshot and made the following image, which shows the
 on-device rendering on top and the actual image on bottom:

 http://n4te.com/temp/imgDiff.png

 Any idea why there is a difference? I have tried a bunch of different
 settings but I can't keep it from looking bad.

 Thanks!
 -Nate
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: no package identifier when getting value for resource

2009-06-01 Thread Nate

Chris,
I'm also having the same problem while trying to use the StatFs object
(for file system statistics). From what it looks like to me, they
(Google) have removed that package from the Android platform for some
reason. So instead of your app crashing when it get's to that line, it
logs an error and does nothing. Frustrating to say the least. I spent
about a day reviewing and rewriting my code before I realized they
simply removed the object itself.

Hope that helps,
~~ Nate

On May 19, 9:35 am, guruk ilovesi...@gmail.com wrote:
 When I start my program I get this for 3 from 35 entries in the R.Java

 no package identifier when getting value for resource xxx

 I checked what could be wrong but the enries looks fine like similar
 where it does not come to a message like that?

 What could that be?

 greets
 chris

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

2009-05-29 Thread Nate

Thank you both for the solution (images must be power of two
dimensions) and the additional helpful information!

Cheers!
-Nate


On May 28, 12:56 pm, Anton socialhac...@gmail.com wrote:
     The ball.png that you reference above is 30x30 pixels.  As MrChaz
 said, you must use power of two sized bitmaps.  Otherwise the
 texImage2D function will not accept your texture.  It seems likely
 that that is what is going on here.  Also, this works in the 16 bits
 per pixel modes as well.  You don't need a separate alpha channel in
 your frame buffer to do alpha compositing, so a simple RGB454 frame
 buffer works, which is what you get if you use a SimpleEGLConfigChooser
 (false) to select your pixel format.  16bpp formats are twice as fast
 when it comes to rendering as 32bpp formats (if your fill rate
 limited, and if you're rendering a 2D game with sprites then you
 probably are).

     Another word of caution, PNG files are supposed to (if you follow
 the spec) have non-premultiplied alpha channels.  But it seems that
 not many people actually follow the standard, and so you can find PNG
 files that do it either way.  If your PNG files are in fact using non-
 premultiplied alpha then the glBlendFunction should be
 (GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA).  If they use
 premultiplied alpha then it should be as MrChaz said (GL10.GL_ONE,
 GL10.GL_ONE_MINUS_SRC_ALPHA).  If you use the first and see dark halos
 around all of your sprites then you probably have premultiplied alpha
 PNGs.

     As a side note, premultiplied alpha is better for a number of
 reasons.  It simplifies a number of compositing operations and treats
 all of the color and alpha channels in a uniform way.  It also allows
 for super-luminous pixels.

     -Anton

 On May 27, 7:00 pm, Nate nathan.sw...@gmail.com wrote:

  I am rendering this PNG with no transparency just 
  fine:http://n4te.com/temp/test.png
  However if I try to render this PNG (with transparency) with the exact
  same code, I just get a white box:http://n4te.com/temp/ball.png

  I am loading the PNG into a texture like this:
  Bitmap bitmap = BitmapFactory.decodeStream(input);
  int[] temp = new int[1];
  gl.glGenTextures(1, temp, 0);
  textureID = temp[0];
  gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID);
  gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,
  GL10.GL_NEAREST);
  gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER,
  GL10.GL_NEAREST); // GL_LINEAR for quality.
  gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
  GL10.GL_CLAMP_TO_EDGE);
  gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
  GL10.GL_CLAMP_TO_EDGE);
  GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
  bitmap.recycle();

  I am using this blending:
  gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);

  How is it possible to render a PNG with transparency in OpenGL ES?

  Thanks!
  -Nate
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] PNG transparency and OpenGL ES

2009-05-28 Thread Nate

I am rendering this PNG with no transparency just fine:
http://n4te.com/temp/test.png
However if I try to render this PNG (with transparency) with the exact
same code, I just get a white box:
http://n4te.com/temp/ball.png

I am loading the PNG into a texture like this:
Bitmap bitmap = BitmapFactory.decodeStream(input);
int[] temp = new int[1];
gl.glGenTextures(1, temp, 0);
textureID = temp[0];
gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_NEAREST); // GL_LINEAR for quality.
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_CLAMP_TO_EDGE);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_CLAMP_TO_EDGE);
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
bitmap.recycle();

I am using this blending:
gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);

How is it possible to render a PNG with transparency in OpenGL ES?

Thanks!
-Nate

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

2008-10-27 Thread Nate Sanden
Anyone mind testing this on a real phone for me (before the marketplace
launch tomorrow)? It's a basic tip calculator.

The main thing I'm not sure will work are the blue arrow buttons to the
right of the text fields. You should be able to touch them to modify values
in the calculator. Appreciate it!

http://satipcalculator.googlecode.com/files/sa_tip_calculator.apk

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