Re: [android-developers] newbie needs help - play a sound when app opens

2016-12-01 Thread chicago chuck
Thanks for the reply Steve.

I have the following in my MainActivity.java:

MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.mysound);
mediaPlayer.start();

But Studio doesn't like context for some reason (cannot resolve symbol).  I do 
have 
import android.media.MediaPlayer;



On Wednesday, November 30, 2016 at 6:10:31 PM UTC-6, Steve Gabrilowitz 
wrote:
>
> I suggest that you do a web search for "android life cycle".  The 
> information you find there will not only answer your question but provide 
> you with some basic knowledge that any android developer must know!
>
>

-- 
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/4ac16e38-ab12-4899-8234-c3b2e00c9ee3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] newbie needs help - play a sound when app opens

2016-11-30 Thread chicago chuck
Hello,

I'm a newbie with Android Studio.

I've created a very basic app with various TextViews and ImageViews. I want 
to take the next step and have my app play a sound when it opens.

I've googled around and found a lot of info about playing a sound when a 
button is clicked, but I didn't want to start getting into buttons yet. I 
just want it to play my mp3 when it first opens.

I figured out how to create the raw folder and paste my mp3 file into it.

Is there a way to play a sound when my app first opens?

Note that this is my first attempt at doing anything with 
MainActivity.java, so if you have a code example, please let me know where 
it goes.

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/2f6d3649-ca7e-4e0d-8f3f-6c7853b690e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Undocumented screen tags needed in Android Manifest to ensure app does not get filtered by default on Google Play Store for LG G3 (Clash of Clans affected too)?!

2016-04-14 Thread Chuck Moyes


I have a user with an LG G3 running Android 5 Lollipop whose Google Play 
store claims that my app is not compatible with his device, and so he 
cannot download the app from the Google Play Store.

As you can see here, the LG G3 family of devices are and were all 
compatible with my APK:



I did some digging, apparently LG G3 users are also having 
compatibility/filtering issues with Clash of Clans.

It turns out (and I kid you not) the device has an unorthodox screen 
resolution and undocumented screen density "640" that ostensibly is causing 
it to get filtered even though the Google Play Store UI has it listed as 
compatible:
http://stackoverflow.com/questions/25221643/app-not-visible-on-google-play-for-qhd-lg-g3

It's not in the documented list, and it's "blacklisted by default":
http://developer.android.com/guide/practices/screens_support.html

>From the aforementioned SO post, you have to manually add the screen 
density to the AndroidManifest using the compatible-screens tag 
(previously, my "vanilla" AndroidManifest did not have supports-screens 
tags and it also did not have compatible-screens tags).

What IS this crap?!

So I came up with what should be the most "permissive" screen resolution 
configuration possible (because my app is a 3D game that is actually 
resolution-independent, and so it should be able to run on any 
size/density/resolution screen):






















































I did this, going against Google's recommendation (I actually agree with 
Google's recommendation) because I really need my app to run on LG G3 
devices:

*Caution:* Normally, *you should not use this manifest element*. Using this 
> element can dramatically reduce the potential user base for your 
> application, by not allowing users to install your application if they have 
> a device with a screen configuration that you have not listed. You should 
> use it only as a last resort, when the application absolutely does not work 
> with specific screen configurations. Instead of using this element, you 
> should follow the guide to Supporting Multiple Screens 
>  to 
> provide scalable support for multiple screens using alternative layouts and 
> bitmaps for different screen sizes and densities.
>

However, when I upload the new APK to the Google Play Store, I now see that 
some (by some, I mean hundreds) devices are getting filtered (with no 
specified DPI):



I even tried adding screen tags for each screenSize without any 
screenDensity (e.g. ) to 
compatible-screens, despite my Android Studio IDE complaining that these 
tags needed to have screenDensity, but it did not work.

How can I distribute my app to LG G3 users using Google Play Store -- 
without filtering _other_ devices without specific screen densities?

In my opinion, there should not be undocumented screenDensity tags that are 
required -- and a permissive configuration shouldn't blacklist devices by 
default -- in other words, I should be able to distribute my app with a 
vanilla manifest that does not contain any special screen-related tags, and 
my app should run on all screen resolutions/sizes by default. Moreover, 
when Google Play Store says a device is compatible in the UI, it should not 
get filtered. These behaviors are creating real headaches for developers 
like Clash of Clans and myself.

-- 
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/cc4b5741-b2ef-4bdd-aa1e-d557b9729c6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Urgent req for PROJECT MANAGER @ Minneapolis, MN

2016-03-24 Thread Chuck Crisler
I have blocked all of these spammers. So I won't get their emails unless
others respond. In other words, block them and don't respond.
On Mar 24, 2016 8:41 AM, "Trevor Page"  wrote:

> Shove your spam where the sun doesn't shine.
> On 24 Mar 2016 12:40, "Shaik Sadiq"  wrote:
>
>> Hi,
>>
>> Hope you are doing well !!!
>>
>> I have an urgent requirement for an *PROJECT MANAGER. *Please let me
>> know if you Interested and get back to me with their updated resume in .doc
>> format immediately. Given below is the job description.
>>
>>
>>
>> *Job Title: PROJECT MANAGER*
>>
>> *Location: Minneapolis, MN*
>>
>> *Duration: 8+ Months *
>>
>> *Experience: 9+ years*
>>
>>
>>
>> *Skills :* *Teradata, and BI tools*
>>
>>
>>
>> *JD:*
>>
>> · Project Manager for Best Buy Reporting team, managing data
>> warehouse projects in Teradata, and BI tools.
>>
>> · 3 years of Project Management experience.
>>
>>
>>
>>
>>
>> *Sadiq Shaik*
>>
>> ASAP Solutions Group LLC,
>>
>> 678-221-4992 (ext) 217
>>
>> ssh...@myasap.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/CAMy78avpKpxJYcfawmdmS0h1U_dusuT6-1udXyOHdDD1r3ycoA%40mail.gmail.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/CAG8Y82oc_nuygdKCS8fA45W%2BKKZ1ciUz2WM421BVooeQLTc-HA%40mail.gmail.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/CAO_ovOJXH8zDEd%3Dv%3D9hw3wbmnA6qpJMr1uiiOevC7HG%3D6wZsFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Why can't i access android developers website from my country?

2016-02-26 Thread Chuck Crisler
Is it possible that your country is blocking your access?
On Feb 26, 2016 3:44 PM, "Mostafa Nasiri"  wrote:

> Hi
> I live in Iran and when i try to access developers.android.com i get this
> message: "We're sorry, but this service is not available in your country."
> and not only android developers website but also some other google services
> like Google Code.
> This can't be due to US sanctions against Iran because the US lifted all
> sanctions against because of the nuclear deal. So why can't i access these
> services?
> I would very much appreciate a good answer to my question.
> 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/f3de51b2-d188-4f7f-9c9a-93b8218fde1d%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/CAO_ovOL2YJvKr%3DAds554KWkCC-c01%3DqXTwSdoNkY4hog2RSieQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] How Are Content Providers To Interpret Section 5.3 of Google Play Developer Distribution Agreement?

2016-02-22 Thread Chuck Crisler
The section sounds like they want to provide support to their current/your
former customers. I doubt that Google would sell copies of your app without
compensating you. They have too much to lose. However, for an authoritative
legal opinion you need to hire an attorney to contact the Google legal
department.
On Feb 22, 2016 1:04 PM, "Movie Master"  wrote:

> We are considering using Google Play to sell movies. The Google Play
> Developer Distribution Agreement available at
> https://play.google.com/about/developer-distribution-agreement.html says
> in article 5.3: “…After termination of this Agreement, Google will not
> distribute your Product, but may retain and use copies of the Product for
> support of the Store and the Android platform.” We do not understand
> Google’s intent by this sentence. In simpler and clearer terms, what is
> Google’s intended meaning in this sentence and subsequent actions it can
> take, specifically “…but may retain and use copies of the Product for
> support of the Store and the Android platform.”? This sentence appears
> deliberately ambiguous in order to give Google huge latitude to do just
> about anything it wants to with our content, and without promise of
> compensation to us the rightful copyright holder, after we cease doing
> business with it. People use their jobs and businesses to generate income
> to "support" their family. Is Google leaving the door open to use our
> proprietary content to "support" its store after we're gone through means
> other than direct distribution?  It's not unusual for video hosting sites
> to clench ungodly amounts of intellectual property rights simply because it
> sits upon their servers. Maybe a rewrite of this Agreement is in order.
>
>
>
> I'm assuming that only a representative from Google Play can give an
> authoritative answer that's not just an opinion unless somebody elsewhere
> has dealt with this same issue themselves. Google appears to have gone out
> of its way to make it difficult to reach anybody who is authorized to
> answer this question.  If you know how to reach their legal department
> directly so that we can receive their WRITTEN clarification, let me know.
> We will short circuit any legal disputes with Google before they arise.
>
> --
> 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/662cfb20-06a4-486e-bff0-9ecbb97191a7%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/CAO_ovO%2BegBUYAXrjkSAoSfZETKy856w3UzmfmzEM2eP9i-z8FA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Help me get this code working!!

2016-01-31 Thread Chuck Crisler
The error says it all and is clear. The class ProcessRegister *MUST*
contain a method doinBackground. This is simple Java. Read about abstract
classes/interfaces and you will understand.

On Sat, Jan 30, 2016 at 4:11 PM, Jetlabb Service  wrote:

> I am still new to android development, as well as Java. I was following a
> tutorial on how to make a login, and I am using some of their code right
> now, but I can't get this to work at all. I am getting a lot of errors.
>
> The errors I am getting are:
>
> Method does not override method from its superclass
> Class "ProcessRegister" must either be declared abstract or implement
> abstract method 'doInBackground(params) in AsycTask
>  NOTE: THE SAME GOES FOR class NetCheck
>
> Hopefully someone can help me, because I have no clue what I am doing
> wrong here...
>
> import android.app.Activity;
> import android.app.PendingIntent;
> import android.app.ProgressDialog;
> import android.content.Context;
> import android.content.Intent;
> import android.drm.ProcessedData;
> import android.net.ConnectivityManager;
> import android.net.NetworkInfo;
> import android.os.AsyncTask;
> import android.os.Bundle;
> import android.view.View;
> import android.widget.Button;
> import android.widget.EditText;
> import android.widget.TextView;
>
> import wishlist.com.gimme.library.UserFunctions;
>
> import org.json.JSONException;
> import org.json.JSONObject;
>
> import java.io.IOException;
> import java.net.HttpURLConnection;
> import java.net.MalformedURLException;
> import java.net.URL;
>
>
> public class PasswordReset extends Activity {
>
> private static String KEY_SUCCESS = "success";
> private static String KEY_ERROR = "error";
>
> EditText email;
> TextView alert;
> Button resetpass;
>
> /**
>  * Called when the activity is first created.
>  */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
>
> setContentView(R.layout.passwordreset);
>
> Button login = (Button) findViewById(R.id.bktolog);
> login.setOnClickListener(new View.OnClickListener() {
> public void onClick(View view) {
> Intent myIntent = new Intent(view.getContext(), Login.class);
> startActivityForResult(myIntent, 0);
> finish();
> }
>
> });
>
> email = (EditText) findViewById(R.id.forpas);
> alert = (TextView) findViewById(R.id.alert);
> resetpass = (Button) findViewById(R.id.respass);
> resetpass.setOnClickListener(new View.OnClickListener() {
> @Override
> public void onClick(View view) {
>
> NetAsync(view);
>
> }
>
> });}
>
> private class NetCheck extends AsyncTask
>
> {
> private ProgressDialog nDialog;
>
> @Override
> protected void onPreExecute(){
> super.onPreExecute();
> nDialog = new ProgressDialog(PasswordReset.this);
> nDialog.setMessage("Loading..");
> nDialog.setTitle("Checking Network");
> nDialog.setIndeterminate(false);
> nDialog.setCancelable(true);
> nDialog.show();
> }
>
> @Override
> protected Boolean doInBackground(String... args){
>
> ConnectivityManager cm = (ConnectivityManager) 
> getSystemService(Context.CONNECTIVITY_SERVICE);
> NetworkInfo netInfo = cm.getActiveNetworkInfo();
> if (netInfo != null && netInfo.isConnected()) {
> try {
> URL url = new URL("http://www.google.com;);
> HttpURLConnection urlc = (HttpURLConnection) 
> url.openConnection();
> urlc.setConnectTimeout(3000);
> urlc.connect();
> if (urlc.getResponseCode() == 200) {
> return true;
> }
> } catch (MalformedURLException e1) {
> // TODO Auto-generated catch block
> e1.printStackTrace();
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> }
> return false;
>
> }
> @Override
> protected void onPostExecute(Boolean th){
>
> if(th == true){
> nDialog.dismiss();
> new ProcessRegister().execute();
> }
> else{
> nDialog.dismiss();
> alert.setText("Error in Network Connection");
> }
> }
> }
>
> private class ProcessRegister extends AsyncTask {
>
> private ProgressDialog pDialog;
>
> String forgotpassword;
> @Override
> protected void onPreExecute() {
> super.onPreExecute();
> forgotpassword 

Re: [android-developers] Re: Can't buy my own app

2016-01-10 Thread Chuck Crisler
One obvious reason to buy your own app is simply to checkout the entire
process that your customers will experience, including installation, and
insure that it goes smoothly. That is a normal part of SQA.

On Sun, Jan 10, 2016 at 1:17 PM, niks  wrote:

> Because as a developer you are not allowed to buy your own app (consider
> also this: why would you want to buy your own app when you can have it for
> free from your OWN computer?).
>
> For more details see this:
> https://support.google.com/googleplay/android-developer/answer/141659?hl=en
>
> Τη Σάββατο, 2 Ιανουαρίου 2016 - 12:23:02 π.μ. UTC+2, ο χρήστης Rustam
> Eynaliyev έγραψε:
>>
>> Just made a quick VR experience
>> https://play.google.com/store/apps/details?id=com.banginggames.spacewalk -
>> but I'm having a problem - this is my first paid app and when i try to
>> purchase it it says "an error occured while getting the status of your
>> payment google" - I can buy other apps from the same device though
>>
> --
> 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/49d4d8b7-078e-48ea-a0a4-0dd453290724%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/CAO_ovO%2BqGXJWx-iEEsMyLVWhrVm0N1pvvfrN4WJ7NqbFXJ_5FQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] thanks to all

2016-01-04 Thread Chuck Crisler
Start by reading the online Google documentation. Read/build/execute the
samples. Work to understand how they work. If you already know how to
program, it isn't hard. When you have a specific problem, after trying to
solve it yourself and looking here and in Stack Overflow, post a specific
question. Good luck.

On Sat, Jan 2, 2016 at 12:42 PM, Sharad Paghadal 
wrote:

> Hello everyone I'm new to here and an android developing too.
> please suggest me tips for a beginner, so that i can also be like as you
> people.
> 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/6c8b93dc-a25b-47b0-94d1-918bd1e80ec3%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/CAO_ovO%2BsYmeOKcONdP9SiFSujotwG7V%3Dd%3DoBsBVC_u%2BLcY%3D7Cg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Access to Music Player App Source Code possible?

2015-12-08 Thread Chuck Crisler
GStreamer is another option. It is an open source framework that is used to
construct pipelines that do things, like read audio files, decode them and
play the result. You could construct your transform as a GStreamer element
that receives buffers of audio data, transforms it and then passes the
buffers onto a sink, either to save (file), transmit to another system
(udp) or render locally over speakers.

http://gstreamer.freedesktop.org/

There is a lot of documentation, examples and support forums. Yes, it also
runs on Android.

On Thu, Dec 3, 2015 at 9:47 PM, TreKing  wrote:

> On Thu, Nov 26, 2015 at 7:23 PM, Richard Krämer  wrote:
>
>> So my question would be if such an access would be possible?
>
>
> To the Google Music app? No, that's not open source. But they released
> this sample app some time ago. Maybe it's of use to you:
> https://github.com/googlesamples/android-UniversalMusicPlayer
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To 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 http://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/CANCScghTfg8Dyqf6ZRMsdH8Rdx9eC2ZanduAfa2Wsi7t%3DsWFGw%40mail.gmail.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 http://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAO_ovOJQ5Xg3EgiSLqraD9wCqtBcyt02LFTtbx9Fj%3DTEtq0Kmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Is anyway to make apps support 'app streaming' right now?

2015-12-08 Thread Chuck Crisler
I haven't looked at your link and I am not sure exactly what you mean by
'app streaming', but you should look at GStreamer. It is an open source
media framework that works on many platforms, including Android.
http://gstreamer.freedesktop.org/

On Fri, Dec 4, 2015 at 2:22 PM, Evan Lin  wrote:

> Google announced a demo for app streaming technology,
> http://bit.ly/1NMddIz
> Is anyway we can do to make apps support 'app streaming' right now?
>
> --
> 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 http://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/668a30b6-c489-4b39-83e5-e6dd7fb7f269%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 http://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAO_ovOL8r2V6A1Z7B3eQhnSWi6%2Bce-ucydCCGTOr__KO%2BK8n7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] gesture driver

2012-11-06 Thread Chuck Han
Is there a way to create gesture drivers for the Android environment. 
 For example, I want to implement a new gesture that all apps can use.

Thanks in advance, Chuck

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 handle dismiss of DialogFragment (support lib) while app is in background

2012-05-30 Thread Chuck Krutsinger
I already have a solid way to handle if the activity is stopped.  What I'm 
struggling with is how to handle if the activity is paused due to being in 
the background.  If the Activity is paused, then calling Android 
Compatibility Package's (ACP) DialogFragment.dismiss() triggers an 
InvalidStateException.  In that same paused state, if I call 
Activity.dismissDialog(int), the framework correctly handles the dismissal 
without causing an exception.  If I were using true DialogFragments (not 
from the ACP), I could use dismissAllowingStateLoss() and I believe it 
would be fine.  However, since I'm using ACP, there is no 
dismissAllowingStateLoss().  There is more detail on the Stack Exchange 
post for this issue, which remains open:  stack 
exchangehttp://stackoverflow.com/questions/10760809/how-can-you-handle-dismissing-a-dialogfragment-compatibility-lib-upon-completi/10761170#10761170
. 

On Sunday, May 27, 2012 8:20:39 PM UTC-6, G. Blake Meike wrote:

 I think this problem may be more complex than you imply.  In general, the 
 Activity may be in a pretty inconsistent state (Stopped, OS thinks it is 
 dead) when your AsyncTask returns.  I can't imagine anything that you could 
 do, in that circumstance, that would work.

 Is there a way to attach the lifecycle of the DialogFragment to the 
 lifecycle of the Activity?

 G. Blake Meike
 Marakana

 The second edition of Programming Android is now on-line:
 http://shop.oreilly.com/product/0636920023005.do


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

[android-developers] Re: How to handle dismiss of DialogFragment (support lib) while app is in background

2012-05-30 Thread Chuck Krutsinger
By the way, I'm using your Programming Android book as I develop.

On Sunday, May 27, 2012 8:20:39 PM UTC-6, G. Blake Meike wrote:

 I think this problem may be more complex than you imply.  In general, the 
 Activity may be in a pretty inconsistent state (Stopped, OS thinks it is 
 dead) when your AsyncTask returns.  I can't imagine anything that you could 
 do, in that circumstance, that would work.

 Is there a way to attach the lifecycle of the DialogFragment to the 
 lifecycle of the Activity?

 G. Blake Meike
 Marakana

 The second edition of Programming Android is now on-line:
 http://shop.oreilly.com/product/0636920023005.do


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

[android-developers] How to handle dismiss of DialogFragment (support lib) while app is in background

2012-05-25 Thread Chuck Krutsinger
I have an AsyncTask that may need to dismiss a FragmentDialog upon 
successful completion.  In a regular Activity, the dismissDialog() method 
correctly handled removing a dialog even if the app was in the background. 
 However, using a FragmentActivity and a FragmentDialog, there is no 
equivalent approach that I can find.  The compatibility library does not 
have dismissAllowingStateLoss() like the real DialogFragment class does. 
 If someFragmentDialog.dismiss() is called while the app is in the 
background, I get a crash with an IllegalStateException.

What is the correct way to dismiss a FragmentDialog upon completion of an 
AsyncTask so that I don't get this exception?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can I use a junit.extensions.TestSetup in an android junit test so I can have a one-time setup and teardown fixture for the entire TestCase?

2012-05-23 Thread Chuck Krutsinger
Since android.jar does not include junit.extensions package, how can I
create a fixture that only runs setup and teardown once per TestCase,
similar to how @BeforeClass and @AfterClass works in junit 4?  As you
know, android supports junit 3.8.2, not junit 4.x.  On StackOverflow
I've described my attempts to accomplish this and the issues I've
encountered (see
http://stackoverflow.com/questions/10691737/is-there-a-way-to-use-junit-extensions-testsetup-for-tests-on-android).
I would appreciate any suggestions.

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

2012-05-21 Thread Chuck Krutsinger
The source for android-sdk 10 includes junit.extensions under
android-10/external/junit/src/junit/extensions/, but android.jar for
sdk 10 does not have that package in it.  Anyone know why?  Have I
installed something incorrectly?  I want to use TestSetup class from
junit.extensions.

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

2012-04-04 Thread Chuck Krutsinger
Here is the code for Android's SAXParserFactoryImpl.java:


@Override
public SAXParser newSAXParser() throws
ParserConfigurationException {
if (isValidating()) {
throw new ParserConfigurationException(
No validating SAXParser implementation
available);
}

try {
return new SAXParserImpl(features);
} catch (Exception ex) {
throw new ParserConfigurationException(ex.toString());
}
}

The Android DOM parser DocumentBuilderFactory has something very
similar.  Neither supports validation.  You have to find a 3rd party
parser of you want to validate.

On Apr 4, 8:36 am, RedBullet scottedchap...@gmail.com wrote:
 That's sort of what I am doing now. Seems kind of unsatisfying ;-)

 Just wanted to know what my options were...

 It is confusing because the docs seem to imply that one can do validation...







 On Wednesday, April 4, 2012 9:39:07 AM UTC-4, Streets Of Boston wrote:

  What about not validating the incoming XML?
  Since i don't know what type of app you need the validating SAX parser
  for, but if your app just needs to read bits and pieces of incoming XML,
  you really don't need a validating XML. Just read the data and present it
  to the user. If the incoming data is not what you expect, i.e. after
  reading the XML you are still missing pieces of data and such, let your app
  handle this situation by itself.

  On Wednesday, April 4, 2012 9:10:37 AM UTC-4, RedBullet wrote:

  Any more ideas on this? I must be doing something obviously wrong, but
  perhaps there just isn't a validating SAX parser for Android? (though I
  would have expected someone on this list to say so)...

  On Monday, April 2, 2012 12:40:13 PM UTC-4, RedBullet wrote:

  I just tried that and got the same error. No validaing SAX parser
  implementaion available.

  On Monday, April 2, 2012 12:14:33 PM UTC-4, Daniel Drozdzewski wrote:

  ...so did you tell your parser the following:

  static final String GARMIN_SCHEMA_LANGUAGE =
      http://www.w3.org/2001/XMLSchema-instance;;

  static final String W3C_XML_SCHEMA =
      http://www.w3.org/2001/XMLSchema;;

    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setValidating(true);
    saxParser.setProperty(GARMIN_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);

  ??

  On 2 April 2012 17:10, RedBullet  wrote:
   Yea, I read that. My XML contains the following so I thought that
  would be
   sifficient:
   ?xml version=1.0 encoding=UTF-8?
   TrainingCenterDatabase
   xmlns=http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=
 http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2
  http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd;

   Isn't that how it is supposed to work??

   On Monday, April 2, 2012 12:01:42 PM UTC-4, Daniel Drozdzewski wrote:

   Did you tell your parser which schema will it be validating against?
   Setting validation flag to true is not enough...

   Have a look here at a quick validating example using SAXParser:
  http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX9.html

   Daniel

   On 2 April 2012 16:34, RedBullet  wrote:
I am parsing some XML with SAX, and I noticed that there was some
  XSD in
the
files I am parsing.

So, I figured to would turn validation on the factory before I get
  the
parse, but when I do I get an error saying there is no validating
  parser
available.

So... How does one validate XML on the Android??

--

   --
   Daniel Drozdzewski

   --

  --
  Daniel Drozdzewski

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

2012-03-14 Thread Chuck Krutsinger
Do something like this:

InputMethodManager inputManager =
getSystemService(INPUT_METHOD_SERVICE);
 
inputManager.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);

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

2012-03-14 Thread Chuck Krutsinger
I think the problem may be with this line:

                 java.text.DateFormat dateFormat
 =android.text.format.DateFormat.getDateFormat(context);

This will get the format according to the current locale, which may
not be mm/dd/ and from what I see here doesn't even seem to
contain any '/' characters.  That is why you are getting an array
length of 1 from the .split(/) call.

Here is the warning from Android web site on this exact issue:
http://developer.android.com/reference/java/util/Locale.html#default_locale

Instead, construct the date format you were expecting to parse using
SimpleDateFormat.  For example:

java.text.DateFormat dateFormat = new
SimpleDateFormat(MM/dd/);

This should work better if you force the format to be what you were
expecting to parse.

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

2012-03-14 Thread Chuck Krutsinger
Are you trying to capture the back key which normally would act like
cancel?   Or are you trying to capture the backspace key, which
deletes the previous character?  If it is the latter, you should use
KeyEvent.KEYCODE_DEL.  If it is the former, you might try changing
your code as follows to get more diagnostic info:

 @Override
 public View onCreateView(LayoutInflater inflater, ViewGroup container,
 Bundle savedInstanceState) {

          View myView = inflater.inflate(R.layout.note, null);

         myView.setOnKeyListener(
                 new OnKeyListener(){
                         @Override
                         public boolean onKey( View v, int keyCode, KeyEvent 
 event ){
 Log.V(keyCode= + keyCode);
                                         if( keyCode == KeyEvent.KEYCODE_BACK 
 ){
                                                 Log.v(CALL ME, I am 
 called);
                                                 return true;
                                          }
                                         return false;
                          }
         });

       return myView;

 }


This will confirm whether or not your onKey() is even being called and
what keyCode value is being received.

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

2012-03-11 Thread Chuck Krutsinger
This is a good book, Beginning Android 3:
http://www.amazon.com/Beginning-Android-3-Mark-Murphy/dp/1430232978

There is also a Beginning Android 4 and Advanced Android 3 and 4 from
the same author.

On Mar 9, 11:48 pm, pandey praveen@gmail.com wrote:
 Hi ,
     I am new to android and I have been working as android developer
 from 4 months . I was looking for some good book on android
 application development and I am confused about which one to buy .
 Help please ..

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

2012-03-11 Thread Chuck Krutsinger
This tutorial is very helpful and takes you step by step through
putting things onto a Google Map.  a href=http://
developer.android.com/guide/tutorials/views/hello-
mapview.htmlHelloMapView/a.

Enjoy!

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

2012-03-11 Thread Chuck Krutsinger
You need to launch adb using sudo:

adb kill-server
sudo /full/path/goes/here/adb devices

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


[android-developers] Re: finding the java sdk

2012-03-11 Thread Chuck Krutsinger
Download the Java JDK at 
http://www.oracle.com/technetwork/java/javase/downloads/index.html.

Follow the instructions posted there to install it.

On Mar 11, 10:24 am, firebreather michaelirvingbr...@gmail.com
wrote:
 i'm trying to download the android and java sdks so i can develop
 apps. besides the error i get in trying to download the android sdk
 mentioned previously. i dont seem to have a java sdk.exe file.

 in my oracle folder i have two other folders:

 javafx 2.0 runtime which contains a bin and lib file.
 javafx 2.0 sdk which contains bin, docs, rt, and tools, files.

 i dont see an application file to run the java 2.0 sdk anywhere.

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

2012-03-11 Thread Chuck Krutsinger
Start at http://developer.android.com/guide/basics/what-is-android.html.
There are many, many documents that explain concepts, give sample
programs, go through tutorials, etc.

On Mar 10, 10:14 pm, rayhan rayha...@gmail.com wrote:
 Now i am learning android developing.I want to know that where i can
 get tutorial from basic to advance level to learn android.

 Thanks

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


[android-developers] Re: Android compatibility clarification

2012-03-11 Thread Chuck Krutsinger
If you want your program to run on your phone, you will have to stick
to the 2.2 version of Android.  If you want to develop to later
versions, you can, but you will have to use an emulator to run and
test the application and you won't be able to deploy to your phone
until you upgrade to those versions.  If you write to the 2.2 version,
it should still run on the later releases, but not the other way
around.

On Mar 9, 4:13 am, Vikram Bhuskute vikram...@gmail.com wrote:
 Hi All,

 I have an Andriod 2.2 phone . I have to write an app for my phone, which is
 about a book with index and navigation.
 I don't want to upgrade the phone as of now .

 My question is do I have to use 2.2 platform ? Or I can use any latest ones
 ?
 I guess if APIs are upgraded then I can not use newer version right ?
 But is there any known compatibility.

 Another point is if I develop app with 2.2 can it work on latest Android
 phone ?

 Thanks in advance for your help.

 Regards,
 Vikram

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

2012-01-16 Thread Chuck Kasek
Can anyone tell me if there is something specific you have to do to
use the screenOrientation attribute in a style?  If i put it directly
on the activity tag in my manifest, it works fine, but if I try to use
it as part of a style it doesn't work.

This works:
activity android:name=.MyActivity android:label=@string/app_name
android:screenOrientation=landscape

This does not work
activity android:name=.MyActivity android:label=@string/app_name
android:theme=@style/Landscape

in styles.xml:
style name=Landscape
item name=android:screenOrientationlandscape/item
/style

Thanks
Chuck

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Does anyone know if the Zoosh (naratte.com) application can do bluetooth paing?

2011-07-18 Thread Chuck
Hi,

Has anyone gotten their hands on the Zoosh (www.naratte.com) application, 
its looks like it's similar to Bump (www.bu.mp) but it used Ultrasound to 
replace NFC? Can it be used as a front end to pair Bluetooth communications 
or is it a payment pathway only? Naratte isn't saying much other than an 
announcement and a video...

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] More fixes for NFCDemo sample in 2.3.3...

2011-07-16 Thread Chuck
Hi,

I have looked at previous post and I fixed two major issues in the NFCDemo 
(The library issue and the Manifest problem). The automatically generated 
files still do not generate inside of eclipse. Is there a guide somewhere on 
all of the fixes needed to get this fixed. Also does anyone know if the 
Netcom MicroSD NFC card will work with this demo if I modify the technology 
profile in the Manifest file??

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] WebView and Response Processing

2010-11-09 Thread Chuck Kasek
Currently, I use a regular activity with some EditText fields as a
registration screen in my application.  The inputs are used to
construct a soap message which is posted to the registration server,
with the response being parsed to do some configuration of the
application.

I'd like to change this to have the registration page load in a
WebView instance, so that the registration process takes place on an
external web page.  This would make it easier to make changes to the
registration process without having to deploy a new build, as it would
just be a matter of changing the web page that is loaded in the
WebView.

The question is - would there be any way for me to get the response
that is sent back from my registration server to the client?  From
what I can tell, if I went this route, there wouldn't be a way for me
to parse the response like I currently do to initialize the
application settings.  Any help is appreciated!

-Chuck

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

2010-10-13 Thread Chuck Lega
Well put, as always. Thanks Dianne!
/Chuck

On 13 Okt, 00:56, Dianne Hackborn hack...@android.com wrote:
 If you are loading resources, you should strongly consider making this a
 singleton per context.  The resources you get for different contexts can
 vary due to themes and such.

 If your singleton is doing things you know are global to the app -- for
 example loading concrete resources that can't be changed by theme or
 configuration, and loading shared preferences under an explicit name -- then
 truly making it a singleton is fine.  Just have the call to get the
 singleton take a Context, and when called the first time and constructing
 the singleton use getApplicationContext() on that to keep the context you
 will be holding in your singleton.  This is essentially the context for your
 package, which is also your class loader, which you are singleton of.  There
 is nothing funky or wrong with putting things together like that.

 So doing a singleton this way is in my mind the simplest, and as long as you
 know what you are doing and these are the semantics you want there is
 nothing incorrect or not robust about it.





 On Tue, Oct 12, 2010 at 12:15 PM, Chuck Lega chuck.l...@gmail.com wrote:
  Ok, I may be a bit vague, but say I want an utility class to do some
  common stuff, including resources and shared prefs. Then I need a
  context. If I put a SharedPreferenceListener into the class, I am lost
  if I want to do something using a context when receiving the
  callbacks.

  This is how I think about it now: singleton object with init(ctx).
  Init is called from App, i.e. with appctx.
  What would typically this (app)context not be suitable for?

  Sorry for deviating...

  /Chuck

  On 12 Okt, 21:03, TreKing treking...@gmail.com wrote:
   On Tue, Oct 12, 2010 at 1:37 PM, Chuck Lega chuck.l...@gmail.com
  wrote:
For instance, say I register a listener in the singleton. The callbacks
  to
the listener does not contain a context, and I am back at square one
again...So, I guess init-ing the singleton with a context is the
  simplest
way,
and making it a service the most robust/correct(?).

   What listeners and callbacks are we talking about? You may want to
  provide
   more, um, context (har har) about how you're using a singleton,
  callbacks,
   listeners, and the Context. There's probably a better way than
  initializing
   the singleton with the Context object.

   And making your singleton a Service may not necessarily be the most
  robust
   /correct - it depends on what you're trying to achieve with this
  singleton.

  ---­­--
   TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
   transit tracking app for Android-powered devices

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

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

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

 - Visa citerad 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: Singleton object with context?

2010-10-12 Thread Chuck Lega
Thanks for great input!
I guess the Application object may be a simple way to store some
common data, but when implementing an Util/Mgr-like class with state
and context I think a separate class is to prefer.
Passing context with each call may be clean, but does not cover all
cases. For instance, say I register a listener in the singleton. The
callbacks to the listener does not contain a context, and I am back at
square one again...

So, I guess init-ing the singleton with a context is the simplest way,
and making it a service the most robust/correct(?).

/Chuck

On 12 Okt, 03:01, Dianne Hackborn hack...@android.com wrote:
 On Mon, Oct 11, 2010 at 2:29 PM, Al alcapw...@googlemail.com wrote:
  Consider extending the Application class and using that to store
  objects which are required throughout activities. As Dianne said, you
  are less likely to leak a context if you use that.

 The Context you have from extending Application is the same context you get
 with Context.getApplicationContext().  I generally recommend that people use
 singletons instead of extending Application, and the semantics of Context
 here isn't different between the two

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

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

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


[android-developers] Re: Singleton object with context?

2010-10-12 Thread Chuck Lega
Ok, I may be a bit vague, but say I want an utility class to do some
common stuff, including resources and shared prefs. Then I need a
context. If I put a SharedPreferenceListener into the class, I am lost
if I want to do something using a context when receiving the
callbacks.

This is how I think about it now: singleton object with init(ctx).
Init is called from App, i.e. with appctx.
What would typically this (app)context not be suitable for?

Sorry for deviating...

/Chuck

On 12 Okt, 21:03, TreKing treking...@gmail.com wrote:
 On Tue, Oct 12, 2010 at 1:37 PM, Chuck Lega chuck.l...@gmail.com wrote:
  For instance, say I register a listener in the singleton. The callbacks to
  the listener does not contain a context, and I am back at square one
  again...So, I guess init-ing the singleton with a context is the simplest
  way,
  and making it a service the most robust/correct(?).

 What listeners and callbacks are we talking about? You may want to provide
 more, um, context (har har) about how you're using a singleton, callbacks,
 listeners, and the Context. There's probably a better way than initializing
 the singleton with the Context object.

 And making your singleton a Service may not necessarily be the most robust
 /correct - it depends on what you're trying to achieve with this singleton.

 ---­--
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


[android-developers] Singleton object with context?

2010-10-10 Thread Chuck Lega
Hi,

I often run into the following dilemma: I need some singleton-like
object in my app (typically some central manager-like thing) and this
object needs a context for various things. This means that I either
have to pass a context to all methods needing one or have some sort of
init-pattern to the object. Neither is pretty I think. What is the
correct way of doing this? Or is this simply (even the definition of)
a Service?

Anyone have any thoughts on this?

/Chuck

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

2010-07-02 Thread Chuck Tilbury


I am thinking of joining the android developers network.  However, I 
cannot seem to find out how much the hardware development tools cost.  
Can someone please tell me how much an Android dev phone costs?


Thanks,
Chuck

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

2010-07-01 Thread Chuck Tilbury
 Can someone please tell me what an unlocked Android Dev Phone or a 
Google Nexus One costs through the developer network?


Thanks,
Chuck

On 7/1/2010 9:36 AM, Mark Murphy wrote:

On Thu, Jul 1, 2010 at 10:28 AM, Ralph Bergmannra...@dasralph.de  wrote:

how can i access a content provider from a pojo?
all ways i found depends on that my class extends Activity :-(

Pass the Activity to the POJO.



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

2010-06-29 Thread Chuck Tilbury
 Outstanding!  I have been lurking for a while and this is just what I 
need.  Thanks.


On 6/27/2010 4:12 PM, Maps.Huge.Info (Maps API Guru) wrote:

You might want to review the other apps that have a similar theme,
check out http://www.androlib.com or http://cyrket.com for a web based
app search tool, then try them on your Android device to see if your
idea is anything unique. After that, I suggest looking at this site:
http://commonsware.com/ - Mark has some great books and tutorials on
Android. Also, the SDK contains a lot of interesting and detailed
examples, try the hello world one and see if you're up to the task.

-John Coryat



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

2010-06-29 Thread Chuck Tilbury
 As I understand it (and I disclaim any responsibility for your 
actions, whatsoever) is that if your thing adds to a GPL'ed thing, 
then you have to GPL your work as well.  However, if your thingy simply 
uses something that is GPL'ed, then your do not have to place your work 
under the GPL.  The basic intent of GPL is to make sure that the 
software remains available as source code to anyone that wants it.  A 
good example of this is the standard C++ libraries for the GNU compiler 
set.  There is also the LGPL, that allows you to add to the software 
that is under that license without open-sourcing it.  If you use a 
GPL'ed software to create your own (separate) software, then you have to 
supply at least a pointer to the GPL'ed source code.  You do not have to 
supply your own source code if it is not GPL'ed.  Take a look at how 
they do it on transgaming.com.


I think that many corporations buy licenses for open sourced software 
for a number of reasons that do not involve open-sourcing their 
applications.  For example, if a corporation creates an application and 
then only uses it internally, it does not have to be open sourced AT 
ALL.  PERIOD.  To open source or not to open source is only a question 
for situations where you plan to make money by selling the actual 
software.  Corporations buy support and development services from 
companies such as MySQL.


Assuming your software is released under the GPL: The GPL license does 
not deprive you of ownership of your software.  There are many instances 
of people changing the license that they release software under.  GPL 
does not deprive you of the ability to sell your software.  It only 
stipulates that you cannot deprive anyone who asks for the source code.


Regards,
Chuck T.
(Note that I am not an attorney, or even really all that bright.)


On 6/27/2010 8:47 PM, Andy Savage wrote:
From a technical standpoint presuming the GPL licence allows it (I'm 
not a lawyer and I don't pretend to be one) you might want to consider 
something like OpenIntents.


http://code.google.com/p/openintents/

This could allow you to link two unrelated packages together in theory 
(I think).


On Sun, Jun 27, 2010 at 2:29 AM, Fabrizio Giudici 
fabrizio.giud...@tidalwave.it mailto:fabrizio.giud...@tidalwave.it 
wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/25/10 22:53 , Anton Persson wrote:
 Well, to connect to a MySQL database you need a connector, and the
 connector library shipped with MySQL is under GPL. Which is what I
 meant. And, hence, corporations buy licenses from MySQL to avoid
 having to release their applications under the GPL. (If you still
 don't believe me, try explaining the reason why they HAVE a dual
 license model... If they only wanted to sell support and
 indemnification, a separate paid-for license would NOT be needed...
 See Red Hat for an example of how that works..)

But I was referring to MySQL, not the connector. Also, sure there will
be also corporates who pay for not using the GPL, but my point was
that one is not forced to pay to use it. Now I think we are made clear
our points, and MySQL was only an example.

 And; the INTENT of MySQL is that if you use the GPL version of the
 MySQL database, your application should also be GPL. But, of
 course, there are loopholes. However, using these loopholes in a
 way that is obviously a circumvention is against this INTENT.

 If you want people to respect YOUR intellectual property, you
 should respect others as well, and not exploit their software in an
 unintended manner.

Licenses arbitrate how much land each entity has the right to own, in
other words they establish borders in a objective way that everybody
agrees on, not a subjective or moralistic one. So while I personally
might have some interest in what other people are willing to do
(subjective and moral position), not everybody is compelled to do
that, but only respect the law. Everybody uses licenses to try to
place that border in the most convenient possible way. An author of
FLOSS software tries to place the border in the best possible position
in his perspective, and a user of a FLOSS software has the same right,
in his perspective.

PS MySQL intent was to make money, and GPL is one of the best way to
do that, because of the double licensing thing. In fact, they made a
lot of money. Note that the owner of MySQL has changed many times and
the intents of the original founders, of Sun Microsystems and Oracle
might have been changed. Frankly, if I used MySQL I wouldn't be
interested in what their intents are, only in what I can do.


- --
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - We make Java work. Everywhere.
java.net/blog/fabriziogiudici
http://java.net/blog/fabriziogiudici - www.tidalwave.it/people
http

[android-developers] Disabling intent-filter in runtime

2010-06-01 Thread Chuck Lega
Hi,

Is it possible to disable or even remove an intent filter for an
activity in runtime when the filter initially was set in the manifest?
Example:
activity
android:name=com.bla.bla
...
intent-filter
action android:name=android.intent.action.SEND /
category
android:name=android.intent.category.DEFAULT /
data android:mimeType=image/* /
/intent-filter
 /activity

...and then sometimes don't want my app to turn up in list of apps
being able to send images.

Possible? Permanently remove?
I was thinking PacketManager, but cannot find anything suitable there.

/Chuck

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

2010-06-01 Thread Chuck Lega
Hi,

Is there a way to turn off or remove an intent filter of an activity
that is set in the manifest? This would typically be usable if the app/
activity for some reason don't want to show up in the CHOOSER list for
say images/SEND.

/Chuck

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

2009-12-13 Thread Chuck
Just a quick query and suggestion from a NON-DEVELOPER -- but a
consumer, sorry for the non-technical intrusion.

I HOPE someone is developing some language flexibility with the new
phone.  I finally ditched my Palm Treo 650 and ONLY because it offered
no way to adapt Vietnamese language tones, and switched to a Nokia E71
mainly because it DOES allow me to use the Vietnamese language tone
marks -- sometimes critical to accurate spellings and meanings, even
for a foreigner like me, not particularly literate in Vietnamese.  But
sometimes that option for accuracy is important.

I hope developers are thinking about that feature, which likely
applies for other languages as well, with words that are dependent on
an acute or grave accent, a cedilla or tilde or other diacritical
marks.

Thanks.

CHUCK SEARCY
Hanoi

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


[android-developers] Re: Google wave invitations...?

2009-10-18 Thread Chuck Wagner

I'd love 1

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: How to build android source code and SDK by cygwin?

2009-10-13 Thread chuck

Hi ITWizard:
I deeply appreciated your kindness. But I do not really know what
you mean. Where do
I find the make file you meant?
I try to copy the tools.jar from JDK to cygwin and the previous
problem has disappeared.
But the other problem occurred.

   The error messages are listed in the following:
$ make

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=Donut

build/core/main.mk:359: sdk-only: javac available.
make: *** No rule to make target `out/host/windows-x86/framework/
droiddoc.jar',
needed by `out/target/common/docs/offline-sdk-timestamp'.  Stop.


Please help me.

Chuck



On 10月13日, 下午4時51分, ITWizard appw...@gmail.com wrote:
 HiChuck
 first take a look in the make files you have in there.
 It seems that you added a rule that for compilation you need
 'tools.jar', while you are trying to build the rule 'out/target/com'
 Do you need this jar? If yes, put it in the path. If not, remove it
 from the rule.
 Regards
 ITWizard

 On Oct 12, 9:32 am,chucku2160...@yahoo.com.tw wrote:



 The source was downloaded successfully by cygwin. But when I
  make the source code, the error was occurred:

  $ make
  
  PLATFORM_VERSION_CODENAME=REL
  PLATFORM_VERSION=1.6
  TARGET_PRODUCT=generic
  TARGET_BUILD_VARIANT=eng
  TARGET_SIMULATOR=
  TARGET_BUILD_TYPE=release
  TARGET_ARCH=arm
  HOST_ARCH=x86
  HOST_OS=windows
  HOST_BUILD_TYPE=release
  BUILD_ID=Donut
  
  build/core/main.mk:359: sdk-only: javac available.
  make: *** No rule to make target `/usr/lib/tools.jar', needed by `out/
  target/com
  mon/docs/offline-sdk-timestamp'.  Stop.

   I can make the NDK by cygwin and the tool chains are as follows:
  1. GNU Make 3.81
  2. gcc version 3.4.4
  3. java version 1.6.0_16

  Does anyone help me?
 Thanks a lot!!

 chuck- 隱藏被引用文字 -

 - 顯示被引用文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 build android source code and SDK by cygwin?

2009-10-12 Thread chuck

   The source was downloaded successfully by cygwin. But when I
make the source code, the error was occurred:


$ make

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=Donut

build/core/main.mk:359: sdk-only: javac available.
make: *** No rule to make target `/usr/lib/tools.jar', needed by `out/
target/com
mon/docs/offline-sdk-timestamp'.  Stop.


 I can make the NDK by cygwin and the tool chains are as follows:
1. GNU Make 3.81
2. gcc version 3.4.4
3. java version 1.6.0_16


Does anyone help me?
   Thanks a lot!!

chuck

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 build android source code and SDK correctly by cygwin?

2009-10-12 Thread chuck

Hi all:

The code was downloaded successfully by cygwin. But when I make
it, the errors were as follows:

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=Donut

build/core/main.mk:359: sdk-only: javac available.
make: *** No rule to make target `/usr/lib/tools.jar', needed by `out/
target/com
mon/docs/offline-sdk-timestamp'.  Stop.


I can make the NDK successfully by cygwin and my tool chains are
listed in the
following:
1. gcc version 3.4.4
2. GNU Make 3.81
3. java version 1.6.0_16

Dose anyone help me?
Thanks a lot!!

Chuck

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 make the android source code and SDK successfully by cygwin?

2009-10-12 Thread chuck

Hi all:

 The code was downloaded successfully by cygwin. But when I make
it, the errors were as follows:

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=Donut

build/core/main.mk:359: sdk-only: javac available.
make: *** No rule to make target `/usr/lib/tools.jar', needed by `out/
target/com
mon/docs/offline-sdk-timestamp'.  Stop.


I can make the NDK by cygwin and my tool chains are listed in the
following:
1. gcc version 3.4.4
2. GNU Make 3.81
3. java version 1.6.0_16

Dose anyone help me?
Thanks a lot!!

Chuck

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