Re: [android-developers] bind/unbind service

2012-10-05 Thread Sat
Thanks for the reply guys.

So the best way is in onCreate() bind and then in onDestroy() unbind.

I had another question that is . The flag BIND_AUTO_CREATE says that it 
will create a service as long as the binding exist,
so if I bind multiple times in the same Activity, lets say in onCreate() and 
in onResume() i fire bindservice() then what should happen?
I think multiple binds is not a problem right. But confusing is that flag.

Are these things same for remote and local service.?
thanks,
satish

On Friday, October 5, 2012 8:23:28 PM UTC+5:30, MagouyaWare wrote:
>
> http://lmgtfy.com/?q=android+bind+service+memory+leak
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Fri, Oct 5, 2012 at 8:42 AM, lokesh gupta 
> > wrote:
>
>> Doesnt it get disconnect  by its own
>> On Oct 5, 2012 8:00 PM, "Justin Anderson" > 
>> wrote:
>>
>>> A memory leak
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/magouyaware
>>>
>>>
>>> On Fri, Oct 5, 2012 at 8:24 AM, satish bhoyar 
>>> 
>>> > wrote:
>>>
 Hi All,

 I am just confused in Bindservice and unbind.

 I want to know If I am binding to service then is it necessary to 
 unbind it?
 If I won't do it what impact will do onmy application.?

 thanks,
 saitsh

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

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

[android-developers] Android Game : Pause Resume Issue

2012-10-05 Thread Abhi
Hi,

I am coding for my first game.
I am facing problem while pausing my game and resuming it.
I have posted for this issue on StackOveflow 
but
 
I am unable to find the root cause of my issue.

Issue I face is, when I click Home button or Back button or leave my Game 
Screen (surfaceview with thread) and again click on my Game Icon
I see a deadlock and in 5-6 sec see "Force Close" and "Wait" dialog coming.

I have put SOPs on onCreate, onResume and onPause of my game screen 
activity, but they are not getting printed in LogCat when I try to resume 
my game.

Please help me to get out of this issue.

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

Re: [android-developers] Android Admob Integeration

2012-10-05 Thread Anirudh Loya
All devices from Froyo 2.2 !

On Fri, Oct 5, 2012 at 11:59 AM, TreKing  wrote:

> On Fri, Oct 5, 2012 at 1:06 AM, Vivek Malavade 
> wrote:
>
>> Then Google Play will allow to application to download on device that
>> below 4.0.3(ICS) ?.
>
>
> Any device compatible with what you've set in your manifest. In this case,
> minimum level 8.
>
>
> -
> 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
>



-- 

Thank you

Anirudh Loya | Android Developer**

Desk: +9140-30681824 | Mobile: +91*9246561265*

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Webview shows white blank page in Ice Cream Sandwitch

2012-10-05 Thread MathieuB
Strangely, the exact same problem happened to me today. Was testing my map 
embedded in a webview on android 4.0.4...and around 3 times out of 4, it 
was showing a blank page...don't really understand why.

I'll try to call the destroy() method on the onDestroy() and see if it 
helps...

What is strange (and bad) is that everything works well in 2.3.x and 4.1

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

[android-developers] Download file - google docs android

2012-10-05 Thread NickL


I have read Yaniv Inbar's Picasa (xml-based) android client, and the 
similar google Docs client, and both work well for me to both upload and 
view files.  I want to know how to download.  I am trying to download via 
the authorized url, like this, but instead of the file expect, it returns 
me a "Welcome to Google Docs" page when I download it via HTTP connect and 
reads.  If I paste that url, however, into a browser, it properly downloads 
the file I wanted.  Help?
 
https://docs.google.com/document/d/<>/export?format=txt
URL url = 
new URL(preUrl); 
URLConnection connection = url.openConnection(); 
connection.connect(); 
// this will be useful so that you can show a typical 0-100% progress bar 
int fileLength = connection.getContentLength(); 
dialog.setMax(100); 
// download the file InputStream input = 
new BufferedInputStream(url.openStream()); 
String tempFileName = 
mFileName + ImportRequest.mTempFileNameExtension + ".txt"; 
OutputStream output = 
new FileOutputStream("/sdcard/downloads/" + tempFileName); 
byte data[] = new byte[1024]; 
long total = 0; 
int count; 
while ((count = input.read(data)) != -1) { 
total += count; 
... and so on

 

 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] KeyChain.getPrivateKey(Context,String) on Android 4.1?

2012-10-05 Thread Nikolay Elenkov
On Sat, Oct 6, 2012 at 5:40 AM, James Yonan  wrote:

>
> Well, there's essentially two problems here...
>
> 1. KeyChain.getPrivateKey(this, alias) returns an object that segfaults when
> collected by the GC.  The segfault occurs in RSA_free in libcrypto.  This is
> 100% reproducible for me on Nexus 7.  This behavior has been documented in
> other posts, e.g. http://code.google.com/p/android/issues/detail?id=36545
>

If it is indeed reproducible, it should be easy to fix. Have you tried building
latest AOSP source, there have been a number of fixes/changes in this
area? I fail to see how this is documented in the bug report though (no
steps to reproduce).

> 2. You say that the new OpenSSL engine supports only signing, verifying and
> key import.  That's fine, but keep in mind that the RSA signature used for
> verification of an SSL session is typically generated by the cipher object
> javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1PADDING") acting as an
> encryptor.  Can java.security.Signature replicate this behavior?  This issue
> is also documented here:
> http://stackoverflow.com/questions/11261774/using-android-4-1-keychain
>

Again, are there any reasons you are using the Cipher class for signing?
I don't think this is typical at all, but if you have a particular reason
for wanting to use 'raw' RSA encryption, please say why. And, again,
this is probably more suitable for andorid-security.

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

2012-10-05 Thread Sergei Okhotnyi
Let's assume that I have pre-installed some version of my program on 
Android device (/system/app/MyApp.apk)
It has predefined some strings (e.g. my_preinstalled_application_name)
At some point user updates this application with newer version from market 
without this custom string.
I want my application in cases it is update to system one extract 
this my_preinstalled_application_name and use it.
I've created some code, but stuck how to extract resource from apk:

final PackageManager pm = context.getPackageManager();
> ApplicationInfo appInfo = 
> pm.getApplicationInfo(context.getPackageName(), 
> PackageManager.GET_DISABLED_COMPONENTS);
> if ((appInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) 
> != 0) {
> try {
> File sysApps = new File("/system/app");
> String[] preInstalls = sysApps.list(new 
> FilenameFilter() {
> public boolean accept(File dir, String name) {
> if (name.endsWith(".apk")) {
> PackageInfo packageArchiveInfo = 
> pm.getPackageArchiveInfo(new File(dir, name).getAbsolutePath(), 0);
> if (packageArchiveInfo != null) {
> if 
> (packageArchiveInfo.packageName.equals(context.getPackageName())) {
> // extract string somehow ??
> return true;
> }
> }
> }
> return false;
> }
> });
> } catch (Exception e) {
> Log.w(TAG, "Error accessing saved affiliation", e);
> }
> }


pm.getResourcesForApplication throws NullPointerException.

Any thoughts?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] It is possible to stop a thread that is connecting to URL with httpConnection.connect()?

2012-10-05 Thread saex
 

i have a thread that is connecting to a url to obtaining some data.

Sometimes the method httpConnection.connect(); taked too munch time to get 
the response, and i want to limit the loading dialog of this connection 
thread to 5 seg.

I tryed adding timeouts into the code, *but it doesn't work*!!

URL formattedUrl = new URL(url); 
URLConnection connection = formattedUrl.openConnection(); 
connection.setConnectTimeout(5000);
connection.setReadTimeout(5000);
HttpURLConnection httpConnection = (HttpURLConnection) connection;
httpConnection.setAllowUserInteraction(false);
httpConnection.setInstanceFollowRedirects(true);
httpConnection.setRequestMethod("GET");
httpConnection.setConnectTimeout(5000);
httpConnection.setReadTimeout(5000);
httpConnection.connect();

So, i must stop the connect method and the thread when 5000 seconds have 
passed or when the used has pressed the back key on the phone.

How can this be achieved? i can't find info about doing this work in 
android with a url connection thread.

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] waking up an activity

2012-10-05 Thread Stefano Bodini
I'm little bit lost, I hope somebody can give me some advice.
I have an application where the main activity starts a service.
The service basically contains a timer in order to execute constantly some 
native functions.
Everything is working great as expected, the native library communicates 
with the activity and everybody is happy.

Also when closing the main activity, the service is working as expected .. 
until I try to wake up the main activity a front of a specific event.
The event is detected inside the native library (C code) and I built a 
mechanism in order to bring it out to the Java part.

I created a dummy activity that basically contains a function called from 
the native library.
In this function I send out an Intent to wake up the main activity. But I 
always end with some exception (usually the null exception).

Here the Java class called from the native library :

public boolean wakeMainActivity()
{
  boolean status = MainActivity.internalStatus;
   
  if(MainActivity.internalStatus == true)
 Log.d("Wake up activity", "Main activity in focus");
  else
  {
 Log.d("Wake up activity", "Main activity NOT in focus");

 /*
  *  Prepare and send intent to wake up this activity
  */
   
 try 
 {
Intent intent = new Intent(FakeActivity.this, 
MainActivity.class);
 startActivity(intent);
  } catch ( Exception e) {
 e.printStackTrace();
  }   
 
  }   
  return status;
   } 

The flag MainActivity.internalStatus is set in the main activity. onCreate 
and OnResume set the flag to true, onPause and onDestroy to false and is 
working.
In order to call this function, when the native library detect the event to 
wake up the activity, I call this  function :
(C code in the JNI area)

/*
 *  Call JAVA API "wakeMainActivity" in this function
 *  This function return a status :
 *  - 0 MainActivty not in focus
 *  - 1 MainActivity in focus
 *  - -1 function not found !
 */
int call_wakeMainActivity()
{
   int status;
   JNIEnv *env = NULL;
   jclass cls;
   jmethodID mid;
   jobject obj;

   if (g_JavaVM == NULL)
  return -1;

   status = (*g_JavaVM)->GetEnv(g_JavaVM, (void**)&env, JNI_VERSION_1_6);

   if (env == NULL)
return -1;

cls = (*env)->FindClass(env, "my/application/Fake_activity");

obj = getInstance(env, cls);
mid = (*env)->GetMethodID(env, cls, "wakeMainActivity", "()Z");
if (mid != 0)
{
  if((*env)->CallBooleanMethod(env, obj, mid) == 1)
  { 
  /* Called the Java function - return successful - main 
activity not in focus */
   return 1;
  }
  else
  {
  /* Called the Java function - return  successful - main 
activity in focus */
   return 0;
  }
}

return -1;
}

g_JavaVM is set on the onCreate and is static.
I'm always able to reach the Java function, but the Intent sent end always 
up in a null  exception.
I tried many different ways to set up the Intent but I still end up with an 
exception.
Any idea ? What I'm doing wrong ?

Thanks
  STeve

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

2012-10-05 Thread Subodh Nijsure
On Fri, Oct 5, 2012 at 3:16 PM, Jeremy Villalobos
 wrote:

>
> I am interested in promotiong the idea of a geographically distributed,
> lightly coupled idependent programmer groups somewhat specialized.  I reach
> the end of what Google could tell me and I wonder if somebody can send me in
> the right direction, if projects around this idea already exists ?
>
> Thanks

Have you looked at elance.com you can post your project requirements
and someone can provide a bid for the work and take things from there.

-Subodh

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

2012-10-05 Thread Jeremy Villalobos
I've found the use of Apache projects really helpful in creating my own 
projects.  However,  when it comes down to propietary libraries, I don't 
find it as easy to integrate software into my apps.

The main problem is that if I use services from some other paid apps, then 
the user will feel nickeled and dimed to death.  So, most of the time I 
keep free apps that extend my apps (like YouTube, and file viewers).  

On the web, this model has emerged for a few years now.  Access to 
data-sets and some types of Intelligent services are already provided the 
same way we can buy compute resources from Amazon and Google.  But these 
services tend to have nice legal user agreements that would be 
unaffordable for smaller programmer groups.

So I started thinking about modules.  Researching this idea I found Chuppa 
Mobile on the web.  This web-service is from the UK.  It does seem to 
provide a wizard-like approach to creating user agreements.  Although I 
have not tried it jet.

AppFutura is a service of developer-for-hire, where a quote is given, and 
the sponsor of the projects hires developer(s) to finish the project.  This 
is not what I am looking for because I suspect Android developer want their 
apps to be investments instead of one-of projects.  GetACoder is similar in 
this respect.

Does anybody know other similar projects ?

Could it be possible to create modules entirely relying on the Android 
Intents ?  For one, this allows for levels of trust among developers since 
no source code is exchanged.  What type of services would Google Play have 
to provide to make this possible ?

I am interested in promotiong the idea of a geographically distributed, 
lightly coupled idependent programmer groups somewhat specialized.  I reach 
the end of what Google could tell me and I wonder if somebody can send me 
in the right direction, if projects around this idea already exists ?

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

Re: [android-developers] Re: Google has received a subpoena seeking information related to Android applications

2012-10-05 Thread Adam Ratana
Same here.  I have seen my apps show up on pirate sites, though.

On Friday, October 5, 2012 10:57:52 AM UTC-4, MagouyaWare wrote:
>
> I received the email as well but have never sent a DMCA notice either...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Fri, Oct 5, 2012 at 2:12 AM, al 
> > wrote:
>
>> Since all answers seem to indicate the opposite: I got the mail but never 
>> send a DMCA notice.
>>
>> Am Dienstag, 2. Oktober 2012 22:54:30 UTC+2 schrieb Ian:
>>
>>> So it seems to be rather good news, isn't it? The FBI is hunting down 
>>> pirate sites...
>>> Did those who received this email ever made DMCA copyright infringement 
>>> notices to websites hosting/linking their apps illegaly?
>>> I did, several times. And now we've got this email; it may be related.
>>>
>>> On Tuesday, October 2, 2012 1:46:58 AM UTC+2, Tom wrote:

 I just spoke to a representative who said "Google should not have sent 
 those emails." I just said I received an email and she immediately knew 
 what I was referring to, no reference number needed. She told me to forget 
 it was sent, and that the FBI will contact me directly if there is any 
 issue pertaining to my account specifically (someone uploading one of my 
 applications illegally to another application market).

 Hope that clears things up for people, I feel bad for the 
 representatives at that number who must be receiving tons of calls. 
 Anyway, 
 nothing to worry about (at least for now).

 On Monday, October 1, 2012 7:14:18 PM UTC-4, Lew wrote:
>
> For more information
> about the subpoena, you may wish to contact the Federal Bureau of
> Investigation -- Atlanta Field Office at (404) 679-9000, reference #
> 2011R00320/FBI/ORKIN.
>
> On Monday, October 1, 2012 3:50:20 PM UTC-7, Streets Of Boston wrote:
>>
>> Got the same e-mail. Asked the same question on 'android-discuss' :-)
>> I'm curious what this is all about? BlueStack? Aliyun/Acer?
>>
>> On Monday, October 1, 2012 6:45:39 PM UTC-4, Andrei wrote:
>>>
>>> I received this email
>>> But i am not interested and want my account to be excluded
>>> What do i need to do?
>>> Thanks
>>>
>>> Google has received a subpoena seeking information related to Android
>>> applications that may have been made available on alternative markets
>>> without the consent of the developer. The subpoena seeks information
>>> about those Android applications, including contact information for 
>>> the
>>> developers of the applications. Our records show that your Android
>>> developer account will be included in the information Google will 
>>> provide
>>> in response to this subpoena.
>>>
>>> Google is not in a position to provide you with legal advice or 
>>> discuss
>>> the substance of the process in our possession. For more information
>>> about the subpoena, you may wish to contact the Federal Bureau of
>>> Investigation -- Atlanta Field Office at (404) 679-9000, reference #
>>> 2011R00320/FBI/ORKIN.
>>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

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

Re: [android-developers] KeyChain.getPrivateKey(Context,String) on Android 4.1?

2012-10-05 Thread James Yonan

>
> > I understand that on 4.1, private keys might be offloaded to hardware, 
> but 
> > still the code above should work because it's not accessing the key 
> directly 
> > -- it is only performing an encrypt operation using the key. 
>
> Not quite. You are feeding it to the Bouncy Castle provider, which knows 
> nothing about native keys and thus cannot use your key. I agree that it 
> should be better documented, but the new OpenSSL engine supports 
> only signing, verifying and key import. It should work if you use the 
> Signature class. The segfault sounds bad though, can you reproduce 
> it consistently? You might want to post this on android-security as well, 
> a lot of the Google people responsible for this seem to monitor it. 
>

Well, there's essentially two problems here...

1. KeyChain.getPrivateKey(this, alias) returns an object that segfaults 
when collected by the GC.  The segfault occurs in RSA_free in libcrypto. 
 This is 100% reproducible for me on Nexus 7.  This behavior has been 
documented in other posts, e.g. 
http://code.google.com/p/android/issues/detail?id=36545

2. You say that the new OpenSSL engine supports only signing, verifying and 
key import.  That's fine, but keep in mind that the RSA signature used for 
verification of an SSL session is typically generated by the cipher object 
javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1PADDING") acting as an 
encryptor.  Can java.security.Signature replicate this behavior?  This 
issue is also documented here: 
http://stackoverflow.com/questions/11261774/using-android-4-1-keychain

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Webview shows white blank page in Ice Cream Sandwitch

2012-10-05 Thread Streets Of Boston
Try this: Try call webtv.*destroy()* in your onDestroy() method. I'm just 
guessing here, but it's worth a try.

On a side-note: Don't call 'this.finish()' in your onPause() method. That 
is usually bad news.


On Friday, October 5, 2012 1:41:37 PM UTC-4, Power Android wrote:
>
>
>   In my webview I have loaded a URL which have an embeded video player of 
> a tv channel live stream. It is working correctly in all the OS version of 
> Android except ICS(4). First time It plays the video well, but when I go 
> back and come again in that page containing the video then the video doesnt 
> loads and shows a blank white page. If I force stop the app from the 
> application setting and start the app again then It runs well then appears 
> white screen again as usual, I have implemented a lot of tactics and this 
> is the latest , I am totally stuck here:
>
>
>
> public class Livetvwebview extends Activity {
>
> RelativeLayout a;
> WebView webtv;
> String url;
> VideoView video;
> WChromeClient chromeClient;
> WebViewClient wvClient;
>
> @Override
> protected void onCreate(Bundle savedInstanceState) {
> // TODO Auto-generated method stub
> super.onCreate(savedInstanceState);
> // requestWindowFeature(Window.FEATURE_NO_TITLE);
> getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
> WindowManager.LayoutParams.FLAG_FULLSCREEN);
> getWindow().requestFeature(Window.FEATURE_PROGRESS);
> setContentView(R.layout.livewebview);
> Toast.makeText(getApplicationContext(),
> "Channel is loading..This may take upto a minute",
> Toast.LENGTH_LONG).show();
> url = getIntent().getStringExtra("tvchannel");
> Log.i("TVURL", url);
> webtv = (WebView) findViewById(R.id.webViewlive);
> webtv.clearCache(true);
> webtv.loadUrl(url);
>
> webtv.getSettings().setLoadWithOverviewMode(true);
> webtv.getSettings().setUseWideViewPort(true);
>
> webtv.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
>
> webtv.setWebChromeClient(new WChromeClient());
> webtv.setWebViewClient(new myWebClient());
> webtv.getSettings().setJavaScriptEnabled(true);
>
> webtv.getSettings().setPluginState(PluginState.ON);
>
> webtv.getSettings().setDomStorageEnabled(true);
> }
>
>
>
> public class myWebClient extends WebViewClient {
> @Override
> public void onPageStarted(WebView view, String url, Bitmap favicon) {
> // TODO Auto-generated method stub
>
> super.onPageStarted(view, url, favicon);
>
> }
>
> @Override
> public boolean shouldOverrideUrlLoading(WebView view, String url) {
> // TODO Auto-generated method stub
>
> view.loadUrl(url);
>
> return true;
> }
>
> @Override
> public void onPageFinished(WebView view, String url) {
> // TODO Auto-generated method stub
> super.onPageFinished(view, url);
>
> }
> }
>
> @SuppressLint("NewApi")
> @Override
> protected void onPause() {
> // TODO Auto-generated method stub
> WebSettings webSettings = webtv.getSettings();
> webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
> webtv.onPause();
> this.finish();
> super.onPause();
>
> }
>
> @SuppressLint("NewApi")
> @Override
> protected void onResume() {
>
>
>
> webtv.onResume();
> super.onResume();
>
> }
>
>
>
>
>
>
> @Override
> protected void onDestroy() {
> // TODO Auto-generated method stub
> // android.os.Process.killProcess(android.os.Process.myPid());
> Editor editor = getSharedPreferences("clear_cache",
> Context.MODE_PRIVATE).edit();
> editor.clear();
> editor.commit();
> trimCache(this);
>
> super.onDestroy();
> }
>
> class WChromeClient extends WebChromeClient {
> @Override
> public void onProgressChanged(WebView view, int progress) {
> Log.i("Method", "Onrogresschanged");
>
> Livetvwebview.this.setTitle("Loading...");
> Livetvwebview.this.setProgress(progress * 100);
> if (progress == 100)
> Livetvwebview.this.setTitle("LiveTv");
>
> }
>
> @Override
> public void onShowCustomView(View view, CustomViewCallback callback) {
> // TODO Auto-generated method stub
> super.onShowCustomView(view, callback);
> if (view instanceof FrameLayout) {
> FrameLayout frame = (FrameLayout) view;
> if (frame.getFocusedChild() instanceof VideoView) {
> webtv.setVisibility(View.GONE);
> video = (VideoView) frame.getFocusedChild();
> FrameLayout.LayoutParams pa

[android-developers] Re: Prices in other currency don't make sense to me. I don't get the same amounts.

2012-10-05 Thread Streets Of Boston
These are currency fluctuations and the prices in the countries' currencies 
are fixed, not the original amount in dollars. 

When you do autofill, the prices in each country are filled-in according to 
the current exchange rate at that  moment. If these are up-to-date, you'd 
get exactly $3.99 when you'd sell a copy of your app right away. 

Say $3.99 would show for German customers as 3.06EUR. The prices for each 
country (Germany) are now fixed.

The next day, the fixed price of 3.06EUR won't be $3.99, but maybe $3.92 or 
something. The day after 3.06EUR could be $3.90

On Friday, October 5, 2012 10:03:09 AM UTC-4, niko20 wrote:
>
> I'm confused here, because if I set my price to something like 3.99, and 
> then I do "auto - fill" for the rest of the countries, then in my sales for 
> the USA, I will see 3.99, but for other countries sometimes I see 3.89 or 
> 3.98, etc. Why isn't the currency conversion always equaling 3.99? Is there 
> some "charge" for the conversion?
>
> -niko
>

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

2012-10-05 Thread spocky12
Still getting a lot of "other" canceled orders (also got mails from users 
complaining they can't buy my app).
Any news from Google or workaround ?

On Wednesday, October 3, 2012 2:16:50 PM UTC+2, spocky12 wrote:
>
> Who knows ? 
> Anyway, that's not possible for in-app billing apps :(
>
> On Wednesday, October 3, 2012 12:49:15 PM UTC+2, Pent wrote:
>>
>> One of my users thought to try ordering via the Google Play website, 
>> and it succeeded after 2 previous fails via the app. Might be 
>> coincidence. 
>>
>> Pent 
>>
>

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

2012-10-05 Thread Lew
Indicator Veritatis wrote:

> You question the 'naturalness' of his desire to use 'new', but you don't 
> seem to notice: you have merely moved the question, not answered it. Of 
> course it 


Actually, I did answer it.
 

> is 'unnatural' to call 'new' on an abstract class, but he was asking why 
> it was made abstract in the first place. You did not address this. Nor does 
> the Google documentation of the class.


Actually, I did address it.
 

>
> All you did was move the question to "why is calling a factory method more 
> 'natural'?" After all, factory methods are for when you do NOT know ahead 
> of 
>

That is only part of what I did.
 

> time exactly which class the created method will be. But why would that be 
> the case here? THAT is what needs to be explained.
>

I explained that it might be necessary, and that that is the usual reason 
for abstract classes with factory methods in Java.

I speculated as to what factors would make such a decision attractive to 
the API designer.
 

>
> Nor is it clear why you think there should be no obvious implementors of a 
> class named 'Uri'. One obvious implementation of a class with such a name 
>

I didn't say I think there should be no obvious implementors of a class 
named 'Uri'. 
I don't actually think that.
That could explain why it's not obvious why I think that.
 

> would be 1) Constructor takes string, returns (opaque?) integer handle for 
> uri 2) methods for opening, closing, fetching resource at uri given by 
> handle. But this is not the way Google did it; the Uri class instead has a 
> noticeably more restricted scope. It does not provide methods for opening a 
> Uri and fetching resources. Instead, the main methods provided are for 
> analyzing the Uri string itself, breaking it down into port, authority (if 
> any), query string etc. Other objects are then responsible for fetching.
>

That's nice.
 

>
> What benefit they got from doing it this way is far from clear, especially 
> since they are now recommending use of java.net for external HTTP access 
> for recent versions of Java, using android.net mainly for the internal 
> Uris used for Content Providers.
>

Well, we can but speculate, as I did.  

>
> As for using the Wikipedia entry, I have been often disappointed by 
> Wikipedia entries on OOD topics before. This time also, since they put the 
> reader through an alleged Java example of the Factory method (complex 
> numbers), and then admit that strictly speaking, it is not even an example 
> of the pattern. This is NO help to the learner, and little help to the 
> seasoned programmer.
>

I found it helpful, both as a learner and as a seasoned programmer. I'm 
sorry you found it less useful. 

>
> Finally, it is ironic that you observe (correct though that is), that use 
> of factory methods is "prevalent throughout the Java API". For java.net.URI 
> is NOT abstract, but android.net.Uri IS abstract. The similarity of these 
> names is probably a large part of why the OP expected both to be concrete. 
> Both claim, after all, to do roughly the same thing: represent a URI (one 
> immutable, the other mutable). The differences in the API alone do not 
> really explain why they made it abstract.
>
>
Nor do my speculations. They only provide pointers to the type of reasoning 
involved in creating factory methods.

I guess you're angry that I didn't break out my crystal ball and read the 
Android team's mind. I do apologize for that.

-- 
Lew
 

>
> bob wrote:
>>
>>> Can someone help me understand why the android.net.Uri class is abstract?
>>>
>>>
>> You got the "what", now for the "why".
>>  
>>
>>> Naturally, I want to do something like this:
>>>
>>> I question the naturalness of that desire.
>>  
>>
>>> Uri uri = new Uri("http://www.example.com/file.mp4";);
>>>
>>>
>> It's more natural, some would say, to use a factory method. (Google "Java 
>> factory method" 
>> and you'll find, e.g., 
>> http://en.wikipedia.org/wiki/Factory_method_pattern#Java, complete 
>> with reference to Josh Bloch's advice on the matter.)
>>
>> It's entirely unnatural to want to call a constructor on an abstract 
>> class. Such a class with 
>> no obvious implementors is a signal that it has a factory method. This is 
>> quite prevalent 
>> in the Java API.
>>
>> The "why" is to save the client from messy and irrelevant details of the 
>> implementation.
>> You shouldn't have to decide which particular flavor of 'Uri' to 
>> instantiate, especially if the 
>> thing is tricky (e.g., has to support an ever-expanding list of 
>> protocols). Let the factory 
>> manufacture you one and you save all that headache.
>>
>> Study up on the reasons to prefer a factory method, and when not to.
>>
>> -- 
>> Lew
>>
>>
>>  
>>
>

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

[android-developers] Webview shows white blank page in Ice Cream Sandwitch

2012-10-05 Thread Power Android
 
  
In my webview I have loaded a URL which have an embeded video player of a 
tv channel live stream. It is working correctly in all the OS version of 
Android except ICS(4). First time It plays the video well, but when I go 
back and come again in that page containing the video then the video doesnt 
loads and shows a blank white page. If I force stop the app from the 
application setting and start the app again then It runs well then appears 
white screen again as usual, I have implemented a lot of tactics and this 
is the latest , I am totally stuck here:



public class Livetvwebview extends Activity {

RelativeLayout a;
WebView webtv;
String url;
VideoView video;
WChromeClient chromeClient;
WebViewClient wvClient;

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
// requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().requestFeature(Window.FEATURE_PROGRESS);
setContentView(R.layout.livewebview);
Toast.makeText(getApplicationContext(),
"Channel is loading..This may take upto a minute",
Toast.LENGTH_LONG).show();
url = getIntent().getStringExtra("tvchannel");
Log.i("TVURL", url);
webtv = (WebView) findViewById(R.id.webViewlive);
webtv.clearCache(true);
webtv.loadUrl(url);

webtv.getSettings().setLoadWithOverviewMode(true);
webtv.getSettings().setUseWideViewPort(true);

webtv.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);

webtv.setWebChromeClient(new WChromeClient());
webtv.setWebViewClient(new myWebClient());
webtv.getSettings().setJavaScriptEnabled(true);

webtv.getSettings().setPluginState(PluginState.ON);

webtv.getSettings().setDomStorageEnabled(true);
}



public class myWebClient extends WebViewClient {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
// TODO Auto-generated method stub

super.onPageStarted(view, url, favicon);

}

@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// TODO Auto-generated method stub

view.loadUrl(url);

return true;
}

@Override
public void onPageFinished(WebView view, String url) {
// TODO Auto-generated method stub
super.onPageFinished(view, url);

}
}

@SuppressLint("NewApi")
@Override
protected void onPause() {
// TODO Auto-generated method stub
WebSettings webSettings = webtv.getSettings();
webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
webtv.onPause();
this.finish();
super.onPause();

}

@SuppressLint("NewApi")
@Override
protected void onResume() {



webtv.onResume();
super.onResume();

}






@Override
protected void onDestroy() {
// TODO Auto-generated method stub
// android.os.Process.killProcess(android.os.Process.myPid());
Editor editor = getSharedPreferences("clear_cache",
Context.MODE_PRIVATE).edit();
editor.clear();
editor.commit();
trimCache(this);

super.onDestroy();
}

class WChromeClient extends WebChromeClient {
@Override
public void onProgressChanged(WebView view, int progress) {
Log.i("Method", "Onrogresschanged");

Livetvwebview.this.setTitle("Loading...");
Livetvwebview.this.setProgress(progress * 100);
if (progress == 100)
Livetvwebview.this.setTitle("LiveTv");

}

@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
// TODO Auto-generated method stub
super.onShowCustomView(view, callback);
if (view instanceof FrameLayout) {
FrameLayout frame = (FrameLayout) view;
if (frame.getFocusedChild() instanceof VideoView) {
webtv.setVisibility(View.GONE);
video = (VideoView) frame.getFocusedChild();
FrameLayout.LayoutParams par = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT);
par.gravity = Gravity.CENTER_HORIZONTAL;
video.setLayoutParams(par);
frame.removeView(video);
a.addView(video);
video.setOnCompletionListener(new OnCompletionListener() {

@Override
public void onCompletion(MediaPlayer mp) {

[android-developers] Re: untracked pid exited

2012-10-05 Thread RichardC
AOSP groups are here:
http://source.android.com/community/index.html

On Friday, October 5, 2012 4:35:32 PM UTC+1, Dan McLeran wrote:
>
> I was able to get around this by changing my command string to include "su 
> -c" (i.e. "su -c ./rsync ..").
>
> Not sure if this is a good solution or not though.
>
> On Friday, October 5, 2012 8:57:14 AM UTC-6, Dan McLeran wrote:
>>
>> I am running Android ICS 4.0.3 on a Blaze phone platform. I built rsync 
>> version 2.6.9 using the Android NDK and installed in on my device. If I run 
>> a shell on the device via the serial port, I can launch rsync and it runs 
>> fine but I cannot seem to be able to launch it programmatically via 
>> Runtime.getRuntime().exec. What I see is init:untracked pid exited. Does 
>> anyone have some advice?
>>
>

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

2012-10-05 Thread Dan McLeran
I was able to get around this by changing my command string to include "su 
-c" (i.e. "su -c ./rsync ..").

Not sure if this is a good solution or not though.

On Friday, October 5, 2012 8:57:14 AM UTC-6, Dan McLeran wrote:
>
> I am running Android ICS 4.0.3 on a Blaze phone platform. I built rsync 
> version 2.6.9 using the Android NDK and installed in on my device. If I run 
> a shell on the device via the serial port, I can launch rsync and it runs 
> fine but I cannot seem to be able to launch it programmatically via 
> Runtime.getRuntime().exec. What I see is init:untracked pid exited. Does 
> anyone have some advice?
>

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

2012-10-05 Thread Dan McLeran
I am running Android ICS 4.0.3 on a Blaze phone platform. I built rsync 
version 2.6.9 using the Android NDK and installed in on my device. If I run 
a shell on the device via the serial port, I can launch rsync and it runs 
fine but I cannot seem to be able to launch it programmatically via 
Runtime.getRuntime().exec. What I see is init:untracked pid exited. Does 
anyone have some advice?

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

Re: [android-developers] Re: Google has received a subpoena seeking information related to Android applications

2012-10-05 Thread Justin Anderson
I received the email as well but have never sent a DMCA notice either...

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


On Fri, Oct 5, 2012 at 2:12 AM, al  wrote:

> Since all answers seem to indicate the opposite: I got the mail but never
> send a DMCA notice.
>
> Am Dienstag, 2. Oktober 2012 22:54:30 UTC+2 schrieb Ian:
>
>> So it seems to be rather good news, isn't it? The FBI is hunting down
>> pirate sites...
>> Did those who received this email ever made DMCA copyright infringement
>> notices to websites hosting/linking their apps illegaly?
>> I did, several times. And now we've got this email; it may be related.
>>
>> On Tuesday, October 2, 2012 1:46:58 AM UTC+2, Tom wrote:
>>>
>>> I just spoke to a representative who said "Google should not have sent
>>> those emails." I just said I received an email and she immediately knew
>>> what I was referring to, no reference number needed. She told me to forget
>>> it was sent, and that the FBI will contact me directly if there is any
>>> issue pertaining to my account specifically (someone uploading one of my
>>> applications illegally to another application market).
>>>
>>> Hope that clears things up for people, I feel bad for the
>>> representatives at that number who must be receiving tons of calls. Anyway,
>>> nothing to worry about (at least for now).
>>>
>>> On Monday, October 1, 2012 7:14:18 PM UTC-4, Lew wrote:

 For more information
 about the subpoena, you may wish to contact the Federal Bureau of
 Investigation -- Atlanta Field Office at (404) 679-9000, reference #
 2011R00320/FBI/ORKIN.

 On Monday, October 1, 2012 3:50:20 PM UTC-7, Streets Of Boston wrote:
>
> Got the same e-mail. Asked the same question on 'android-discuss' :-)
> I'm curious what this is all about? BlueStack? Aliyun/Acer?
>
> On Monday, October 1, 2012 6:45:39 PM UTC-4, Andrei wrote:
>>
>> I received this email
>> But i am not interested and want my account to be excluded
>> What do i need to do?
>> Thanks
>>
>> Google has received a subpoena seeking information related to Android
>> applications that may have been made available on alternative markets
>> without the consent of the developer. The subpoena seeks information
>> about those Android applications, including contact information for
>> the
>> developers of the applications. Our records show that your Android
>> developer account will be included in the information Google will
>> provide
>> in response to this subpoena.
>>
>> Google is not in a position to provide you with legal advice or
>> discuss
>> the substance of the process in our possession. For more information
>> about the subpoena, you may wish to contact the Federal Bureau of
>> Investigation -- Atlanta Field Office at (404) 679-9000, reference #
>> 2011R00320/FBI/ORKIN.
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] bind/unbind service

2012-10-05 Thread Justin Anderson
http://lmgtfy.com/?q=android+bind+service+memory+leak

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


On Fri, Oct 5, 2012 at 8:42 AM, lokesh gupta wrote:

> Doesnt it get disconnect  by its own
> On Oct 5, 2012 8:00 PM, "Justin Anderson"  wrote:
>
>> A memory leak
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/magouyaware
>>
>>
>> On Fri, Oct 5, 2012 at 8:24 AM, satish bhoyar wrote:
>>
>>> Hi All,
>>>
>>> I am just confused in Bindservice and unbind.
>>>
>>> I want to know If I am binding to service then is it necessary to unbind
>>> it?
>>> If I won't do it what impact will do onmy application.?
>>>
>>> thanks,
>>> saitsh
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2012-10-05 Thread Justin Anderson
>
> Here the problem is you inflating only one xml file in each view , so if
> your disabling button in one view it will effect in all views.
>
This is not the reason for the problem...

I have a listview which has a button in each row  of listview,What I am
> doing is on click of  2 nd row button I am disabling it, after scrolling
> the listview  whe i come back to 2nd row of listview , even  buttons in the
> 3rd and 4th row are  also disabled, though i did not disable them.
>

This is very likely due to view recycling, which is used to help the
listview scoll efficiently when there is a large amount of data.

Fixing this problem is a multi-step process:

   1. Keep track of the button state (enabled/disabled) in the adapter
   2. When a button is clicked, set the state in the adapter and call
   notifyDataSetChanged()
   3. In the getView() method of your adapter, set the state of the button
   based on the adapter data


It would also be beneficial to implement the ViewHolder pattern... You can
find many examples online by searching for something like "Android
ViewHolder Pattern"

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


On Fri, Oct 5, 2012 at 2:39 AM, rambabu mareedu
wrote:

> Here the problem is you inflating only one xml file in each view , so if
> your disabling button in one view it will effect in all views.

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

2012-10-05 Thread lokesh gupta
Doesnt it get disconnect  by its own
On Oct 5, 2012 8:00 PM, "Justin Anderson"  wrote:

> A memory leak
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Fri, Oct 5, 2012 at 8:24 AM, satish bhoyar wrote:
>
>> Hi All,
>>
>> I am just confused in Bindservice and unbind.
>>
>> I want to know If I am binding to service then is it necessary to unbind
>> it?
>> If I won't do it what impact will do onmy application.?
>>
>> thanks,
>> saitsh
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] bind/unbind service

2012-10-05 Thread Justin Anderson
A memory leak

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


On Fri, Oct 5, 2012 at 8:24 AM, satish bhoyar wrote:

> Hi All,
>
> I am just confused in Bindservice and unbind.
>
> I want to know If I am binding to service then is it necessary to unbind
> it?
> If I won't do it what impact will do onmy application.?
>
> thanks,
> saitsh
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] bind/unbind service

2012-10-05 Thread satish bhoyar
Hi All,

I am just confused in Bindservice and unbind.

I want to know If I am binding to service then is it necessary to unbind it?
If I won't do it what impact will do onmy application.?

thanks,
saitsh

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

Re: [android-developers] Re: Google account from different country

2012-10-05 Thread Latimerius
On Fri, Oct 5, 2012 at 2:37 AM, Zsolt Vasvari  wrote:
> In all countries, with the notable exception of the US, you pay taxes where
> you earn them.  If you are a US national/PR, the US government expect you
> pay US taxes no matter where you earned the money.  The first $X is  a
> foreign tax credit which means you don't pay double taxes on the first $X
> you earn.  X is around $95,000 these days.  Anyway, this is the general
> idea, and I am not a tax accountant, so don't take this as an advice.  With
> any questions, you need to consult a professional tax accountant.

No worries, fortunately I don't have to deal with this problem
anymore.  I had to though when we first got involved with Android, and
our plan B was exactly what the OP describes.  We figured it should
work from Google point of view (as Rudolf confirms) however we saw no
good way to figure out the taxes.

Where exactly you earn money can be a tricky question for someone
sitting in country A, using a sort of a proxy entity in country B to
sell stuff to someone else in country C, with the actual transaction
happening on Google servers in country D (most likely the U.S.).

I wouldn't be surprised at all if the logic (with respect to OP's
situation) was "Google deals with a Czech entity who has a Czech
street address and a Czech bank account, ergo someone's making profit
in CZ and has to pay Czech taxes".  Or something like that.  Now, if
he also lives there he has to pay Czech taxes anyway.  The interesting
case would be if he lives in Serbia, as that would indicate Serbia
might be the place of his tax residence (depending on local laws)
which would mean he'd have to pay Serbian taxes as well.

So there seems to be a plausible argument for paying Czech taxes, and
a plausible argument for paying Serbian taxes.

Now I won't be paying any money to anyone to figure this out as I
don't *have* to know currently, I just thought I'd ask in case
somebody here has some experience or knowledge about this.

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


Re: [android-developers] Custom array adapter issue

2012-10-05 Thread NikDmit
Nope. I don't touch getItemViewType or getViewTypeCount methods in this 
project.

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

[android-developers] Re: Prices in other currency don't make sense to me. I don't get the same amounts.

2012-10-05 Thread bob
 

Well, there is always rounding.  Also, there are changes in the exchange 
rates.

On Friday, October 5, 2012 9:04:17 AM UTC-5, niko20 wrote:
>
> What I mean is in Google Checkout when I see the actual sale, it's not 
> $3.99. It sold for something like $3.89 or such. I would have thought the 
> currency setting would have made them all equal out to $3.99 (using 
> autofill).
>
> -niko
>
>
> On Friday, October 5, 2012 9:03:09 AM UTC-5, niko20 wrote:
>>
>> I'm confused here, because if I set my price to something like 3.99, and 
>> then I do "auto - fill" for the rest of the countries, then in my sales for 
>> the USA, I will see 3.99, but for other countries sometimes I see 3.89 or 
>> 3.98, etc. Why isn't the currency conversion always equaling 3.99? Is there 
>> some "charge" for the conversion?
>>
>> -niko
>>
>

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

2012-10-05 Thread NikDmit
Thank you! Yep, you are right about my code. I didn't use the super class 
method. Now it works well. At least, I don't get any NullPointerExceptions 
=)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Prices in other currency don't make sense to me. I don't get the same amounts.

2012-10-05 Thread niko20
What I mean is in Google Checkout when I see the actual sale, it's not 
$3.99. It sold for something like $3.89 or such. I would have thought the 
currency setting would have made them all equal out to $3.99 (using 
autofill).

-niko


On Friday, October 5, 2012 9:03:09 AM UTC-5, niko20 wrote:
>
> I'm confused here, because if I set my price to something like 3.99, and 
> then I do "auto - fill" for the rest of the countries, then in my sales for 
> the USA, I will see 3.99, but for other countries sometimes I see 3.89 or 
> 3.98, etc. Why isn't the currency conversion always equaling 3.99? Is there 
> some "charge" for the conversion?
>
> -niko
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Prices in other currency don't make sense to me. I don't get the same amounts.

2012-10-05 Thread niko20
I'm confused here, because if I set my price to something like 3.99, and 
then I do "auto - fill" for the rest of the countries, then in my sales for 
the USA, I will see 3.99, but for other countries sometimes I see 3.89 or 
3.98, etc. Why isn't the currency conversion always equaling 3.99? Is there 
some "charge" for the conversion?

-niko

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

Re:[android-developers] How to install APK programmatically without user prompt

2012-10-05 Thread lokesh gupta
U can... But you need rooyed devices to achieve that
On Sep 16, 2011 11:02 PM, "Pratik Prajapati" 
wrote:

>
> I need to install some non market place APK programmatically *without *user
> prompt. I found some links on stackoverflow, but all those mechanism will
> prompt the user.
> Is there any way to do it with some APIs or I should use 'pm install  name>' command (doing with system() api)?
>
> --
> Regards,
> Pratik Prajapati
>
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: How to install APK programmatically without user prompt

2012-10-05 Thread Endy Silveira
Hey, did you got the answer?

If no, than there is:

http://www.kanatorn.info/2012/01/21/android-install-apk-programmatically-without-user-prompt/

The only one problem is that you need to be rooted...

Em domingo, 27 de maio de 2012 18h09min16s UTC-3, Antonin Chazalet escreveu:
>
> Thanks for your quick answer. 
>
> I tryied: 
>
> pm install /sdcard/download_aaa/NotePad.apk 
>
> Via my phone's terminal, and it returns me: 
>
> pkg: /sdcard/download_aaa/NotePad.apk 
> [1]  Killed pm install /sdcard/download_aaa/NotePad.apk 
>
> The NotePad.apk app hasn't been installed. 
>
> Do I miss any options? or something else? 
>
> My phone is a real one, not a emulated one. 
> It runs Android 2.1-update1. 
> It is not rooted. 
>
> I use the application named Terminal Emulator (v44) in order to get 
> access to my phone's shell. 
>
> I was already able to install, execute, and uninstall NotePad.apk 
> using standards ways. 
>
>
> Thanks, 
> Regards, 
>
> Antonin. 
>
>
> 2012/5/27 Pratik Prajapati >: 
> > 
> > It was my hack. Which worked in my device, as is not for any smart 
> phone, 
> > tablet. 
> > 
> > I run System command from java and user pm utility of android to install 
> > apk. 
> > 
> > 
> > On Sun, May 27, 2012 at 9:10 AM, Antonin Chazalet 
> > > wrote: 
> >> 
> >> Hello, 
> >> 
> >> 
> >> Pratik, can you tell us how you skipped the user prompt? 
> >> 
> >> 
> >> Thanks, 
> >> Regards, 
> >> 
> >> Antonin. 
> >> 
> >> 
> >> Le mardi 27 septembre 2011 18:04:37 UTC+2, pratik.p...@gmail.com a 
> écrit : 
> >>> 
> >>> Its in rooted device, but no option for user to do adb. Its nigher for 
> >>> phone nor for tablet market. 
> >>> 
> >>> -- 
> >>> Regards, 
> >>> Pratik Prajapati 
> >>> 
> > 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] KeyChain.getPrivateKey(Context,String) on Android 4.1?

2012-10-05 Thread Nikolay Elenkov
On Fri, Oct 5, 2012 at 2:40 PM, James Yonan  wrote:

> PrivateKey privateKey = KeyChain.getPrivateKey(context, alias);
> if (privateKey) {
>   byte[] data;
>   Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1PADDING");
>   cipher.init(Cipher.ENCRYPT_MODE, privateKey);
>   byte[] signed_bytes = cipher.doFinal(data);
> }
>
> This code now fails badly on 4.1 (testing on Nexus 7) even though
> KeyChain.getPrivateKey returns a non-null value for privateKey.  It not only
> fails to work, but causes a segfault later when privateKey is garbage
> collected.
>
> I understand that on 4.1, private keys might be offloaded to hardware, but
> still the code above should work because it's not accessing the key directly
> -- it is only performing an encrypt operation using the key.

Not quite. You are feeding it to the Bouncy Castle provider, which knows
nothing about native keys and thus cannot use your key. I agree that it
should be better documented, but the new OpenSSL engine supports
only signing, verifying and key import. It should work if you use the
Signature class. The segfault sounds bad though, can you reproduce
it consistently? You might want to post this on android-security as well,
a lot of the Google people responsible for this seem to monitor it.

>
> What is the proper way to do this on 4.1?
>

Does using the Signature class not work for you?

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


Re: [android-developers] Custom array adapter issue

2012-10-05 Thread Mark Murphy
On Fri, Oct 5, 2012 at 8:29 AM, NikDmit  wrote:
> Is it a kind
> of library bug or something is really wrong with my code bellow?

Since view recycling has worked for all Android versions, for
thousands upon thousands of developers, for over four years, it is
likely to be something with your code.

There are countless code samples to work from for recycling. The
easiest thing is to not manage the recycling yourself, but to let your
superclass handle it, if you are extending something like
ArrayAdapter:

https://github.com/commonsguy/cw-omnibus/tree/master/Selection/Dynamic

The only reason why convertView will not have your desired widget is
if, in some previous getView() call, you returned a View that did not
contain that widget in the first place.

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

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

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


[android-developers] Custom array adapter issue

2012-10-05 Thread NikDmit
Hello.

I have very strange issue with getView -method in custom implementation of 
the adapter view - convertView argument doesn't return a proper view. From 
time to time it works well and I'm able to grab, for instance, ImageView 
with findviewbyid -method, but sometimes it returns a wrong view and when 
I'm trying to grab an ImageView it findviewbyid retunrs null. Is it a kind 
of library bug or something is really wrong with my code bellow? Thank you 
in advance for answers.

@Override
public View getView(int position, View convertView, ViewGroup parent)
{
View view = convertView;
 if(view == null)
{
LayoutInflater inflater = 
(LayoutInflater)this.context.getSystemService
(Context.LAYOUT_INFLATER_SERVICE);
 view = inflater.inflate(R.layout.news_headlines_left, null);

}
   ImageView imgView = 
(ImageView)view.findViewById(R.id.newsPhotoLeft);
  .
  .
  .
}

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

Re: [android-developers] How to cache google map tiles in latest api?

2012-10-05 Thread Mark Murphy
The documentation would appear to be incorrect. The Google Maps SDK
add-on does not support caching of map tiles at the present time. You
may wish to consider alternative mapping solutions, such as
OpenStreetMap via OSMDroid.

On Fri, Oct 5, 2012 at 12:30 AM, Vadim Osovskiy  wrote:
> When you go to main page for google maps android api please check first
> paragraph (quote below)
>
>> To make it easier for you to add powerful mapping capabilities to your
>> application, the Google APIs add-on includes a Maps external library,
>> com.google.android.maps. The classes of the Maps library offer built-in
>> downloading, rendering, and caching of Maps tiles, as well as a variety of
>> display options and controls.
>
>
> I am trying to make an application that will be used in areas that do not
> have access to internet and thus need cached map while out of service. The
> cache will be needed for 8 hours the most.
> Not sure where to go from here
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



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

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

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


[android-developers] Missing or Incorrect images and backgrounds randomly throughout app lifecycle

2012-10-05 Thread Graeme
I was hoping someone here might have an idea what causes this sort of 
behaviour:

Throughout my application, in seemingly random places and in random 
conditions I'm observing this strange UI issue. Images are on occasion 
being loaded black (with the correct bounds) or with the incorrect image 
source (again, with the correct bounds). This effects `ImageViews` and has 
effected `android:background` tags with references to colour resources.

My application relies on 6 library projects, it runs Native Code via a 
Service and Activities in the App use GlSurfaceViews (although, not all 
Activities which display the problem contain OpenGL components). The 
problem could I suppose be from any of these places or a combination of 
them through using large amounts of memory.

You can see this behaviour in the following screen shots:

* This is actually a 6 or so pixel wide column separator image which has 
been incorrectly drawn into my ImageView (the ImageView seems to have 
correctly sized itself).

http://i.stack.imgur.com/fzfm9.png

* When going out of the Application and then back in again (repeatedly) it 
instead appeared (and remained) like so:

http://i.stack.imgur.com/ILEWB.png

* After a Force Clear and a Clear App Data it returned to the correct 
format:

http://i.stack.imgur.com/q4Xa4.png

As you can also see the Magnifying Glass image next to it is displaying 
fine in each of these. The problems with these missing/incorrect images and 
backgrounds seems to happen randomly, throughout the application lifecycle, 
and I've been unable to find a way of reproducing it. 

The layouts for these images are nothing special, I'm not doing anything 
funny during the rendering lifecycle (i'm not overriding `onDraw()` or 
`onMeasure()` or the like). The source of these images aren't being set 
dynamically but via the XML. 

As you can see from the above example, it's not a build issue as it occurs 
between app lifecycles not between installs. It's also happening on 
different devices, Samsung 8.9, Acer Iconia Tab, Motarola XOOM,

It seems to me to be some sort of error with the reference table, could it 
perhaps have been nudged by my native code? Or is it an effect of me in 
some stages of the application using too much memory?

My question on SO has more examples including XML layouts:
http://stackoverflow.com/questions/12562896/missing-or-incorrect-images-and-backgrounds-randomly-throughout-app-lifecycle

Thanks for your 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] Using google as the idp and my own service as the sp in an OAuth exchange

2012-10-05 Thread David Cameron
I'm building an Android application, and would like users to login with 
their Google Apps account. However, I'm not using, nor am I interested in 
using any of google's services in the backend. Is this possible?

I'm picturing this approach:

   1. Use AccountManager in the application to ask for the authtoken of a 
   com.google account
   2. Send that authtoken to the server with requests
   3. On the server, validate that authtoken with google's servers
   4. Supply information to the user from my server, based on the validity 
   of the token

There is so much documentation about accessing a google service (drive, 
maps, tasks) at step 3, but no information about simply validating a token. 
Is there a service to do this?

This document seems to suggests it is possible:
https://developers.google.com/accounts/docs/OAuth2Login

Meanwhile the authentication and authorization home page suggests that 
OpenID should be used for authentication:
https://developers.google.com/accounts/

The page about authenticating mobile apps describes using embedded 
WebViews, which I had hoped to avoid by using the AccountManager:
https://developers.google.com/accounts/docs/MobileApps

Although someone has written a library to do the embedded WebView approach:
http://stackoverflow.com/questions/3352592/webservice-credentials-openid-android-accountmanager


Are there other possible approaches?

My priorities are:

   - not to handle passwords
   - be able to validate that a web request comes from a claimed user 
   (according to google)
   - tie that user to a user in my system (probably via the "name" of the 
   account in AccountManager, which is the email address)

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

2012-10-05 Thread Vadim Osovskiy
When you go to main page for google maps android api please check first 
paragraph (quote below)

To make it easier for you to add powerful mapping capabilities to your 
> application, the Google APIs add-on includes a Maps external library, 
> com.google.android.maps.
>  
> The classes of the Maps library offer built-in *downloading*, *rendering*, 
> and *caching of Maps tiles*, as well as a variety of display options and 
> controls.


I am trying to make an application that will be used in areas that do not 
have access to internet and thus need cached map while out of service. The 
cache will be needed for 8 hours the most.
Not sure where to go from here 

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

2012-10-05 Thread Aristo Michael
Thanks its works for me too


>

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

[android-developers] Contacts Sync

2012-10-05 Thread GWDave
Duplicate contacts on android device

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

[android-developers] Re: the "Welcome to Android Development" window doesn't appears

2012-10-05 Thread mady09
Hi I stuck with the same problem...!! :(   

Eclipse SDK Version: 4.2.1 (JUNO) Build id: M20120914-1800
ADT version: 20.0.3

please help us..!!


On Wednesday, October 3, 2012 8:51:47 AM UTC+5:30, Marco Guida wrote:
>
> Hi, i've followed the installation instructions, when i install the ADT 
> and restart Eclipse,  the "Welcome to Android Development" window doesn't 
> appears...why?
> In the Eclipse -> Preference doesn't appear Android and the Android 
> buttons in the GUI doesn't appear.
>
> Eclipse version: 4.2.1
> ADT version: 20.0.3
>
> Can you help me 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

Re: [android-developers] KeyChain.getPrivateKey(Context,String) on Android 4.1?

2012-10-05 Thread James Yonan
There is a problem in 4.1 with apps that need to create a signature using a 
private key in the keychain.  In particular, apps that establish SSL client 
sessions (such as OpenVPN) would use code such as this to allow an SSL 
negotiation to use a client cert/key from the keychain:

import java.security.PrivateKey;
import javax.crypto.Cipher;

. . .

PrivateKey privateKey = KeyChain.getPrivateKey(context, alias);
if (privateKey) {
  byte[] data;
  Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1PADDING");
  cipher.init(Cipher.ENCRYPT_MODE, privateKey);
  byte[] signed_bytes = cipher.doFinal(data);
}

This code now fails badly on 4.1 (testing on Nexus 7) even 
though KeyChain.getPrivateKey returns a non-null value for privateKey.  It 
not only fails to work, but causes a segfault later when privateKey is 
garbage collected.

I understand that on 4.1, private keys might be offloaded to hardware, but 
still the code above should work because it's not accessing the key 
directly -- it is only performing an encrypt operation using the key.

What is the proper way to do this on 4.1?

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

[android-developers] Re: revoke permissions to access google auth tokens

2012-10-05 Thread Ali
I have same question, is there any update on this topic?

It has also been asked on SO and there is just a workaround for it:
http://stackoverflow.com/questions/5805657/revoke-account-permission-for-an-app

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

[android-developers] Widget OnClick self firing randomly

2012-10-05 Thread EndLessMind
I have a service the controls a mediaplayer and updates a widget. I
added 3 ImageViews to change song (Prev and Next) and to Play/Pause. I
added custom BroadcastReceivers, one for each ImageView. But some some
reason, i receive broadcast randomly. Sometime i get 3 broadcast,
sometimes i get 8. And they are broadcast the should only appear when
i tap on one of the 3 ImageViews.

Here is the code for my widget:
public class GMWidget extends AppWidgetProvider {
private String TAG = "GMWidget";


@Override
public void onEnabled(Context context) {
}

String LOG = "GMWidget";
@Override
  public void onUpdate(Context context, AppWidgetManager
appWidgetManager,
  int[] appWidgetIds) {
Log.w(LOG, "onUpdate method called");



}

@Override
public void onReceive(Context context, Intent intent) {
super.onReceive(context, intent);
String action = intent.getAction();
//Log.d(TAG,"CLICKK: " + action);
Intent i = new Intent();
i.setAction(action);
context.sendBroadcast(i);

}


}


And here is where i set the "listeners"

public void SetWidgetListener() {
Log.d(TAG, "SetListener called");
 RemoteViews updateViews = null;
updateViews = new RemoteViews(this.getPackageName(),
R.layout.widget);
Intent intent = new Intent(this, GMWidget.class);
intent.setAction(WIDGET_PAUSE_PLAY);
PendingIntent WidgetPausePlay = 
PendingIntent.getBroadcast(this,
0, intent, 0);
updateViews.setOnClickPendingIntent(R.id.pbWidMediaPlay,
WidgetPausePlay);

Intent Widget_Next_intent = new Intent(this, 
GMWidget.class);
Widget_Next_intent.setAction(WIDGET_NEXT);
PendingIntent WidgetNext = PendingIntent.getBroadcast(this, 
0,
Widget_Next_intent, 0);
updateViews.setOnClickPendingIntent(R.id.pbWidMediaNext,
WidgetNext);

Intent Widget_Prev_intent = new Intent(this, 
GMWidget.class);
Widget_Prev_intent.setAction(WIDGET_PREV);
PendingIntent WidgetPrev = PendingIntent.getBroadcast(this, 
0,
Widget_Prev_intent, 0);
updateViews.setOnClickPendingIntent(R.id.pbWidMediaPrev,
WidgetPrev);

ComponentName thisWidget = new ComponentName(this,
GMWidget.class);
AppWidgetManager manager =
AppWidgetManager.getInstance(this);
manager.updateAppWidget(thisWidget, updateViews);
}

But i only set the listeners when i receive "APPWIDGET_ENABLED"

Hope someone can help me.
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: [GooglePlay] Google criteria for "New Games and Applications"

2012-10-05 Thread Aristo Michael

sorry i dont know yar..

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

2012-10-05 Thread Truong Chanh Tran
Are you sure this fixes the problem? because it didn't make any difference 
to me. I stil see a slight pause using ogg files. I had to use a little 
hack with the timer task and timers to make it work. Although this creates 
other bugs which happens when the phone is in lock/standby mode. Is there a 
specific ogg specification to prove your logic?

On Thursday, 19 February 2009 08:30:29 UTC+11, julius wrote:
>
> Thanks that worked for me too!

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

[android-developers] Accessing real SD card from the emulator

2012-10-05 Thread Gus
Hi,
 
I am using the android emulator on a Linux box. I know you can read and 
write a "fake" SD card simulated by a .img file (in vfat) in the emulator. 
However, I would like the emulator to access a real SD card (mounted on 
/media/sdcard0 on the host computer, for example).
 
I do not want to make a copy of the SD card (dd and other commands). I want 
live access to the real SD card.
 
Is it possible? How?
 
Thanks, Gus

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

2012-10-05 Thread Android User
Hi,

I have used socialAUth libaray. It helps me to post message , get contacts 
and get user profile.

http://code.google.com/p/socialauth-android/

On Thursday, June 2, 2011 10:11:41 AM UTC+5:30, Rosalie wrote:
>
>
>
> Hai all, I have a problem with linkedin integration in my app. I have 
> created own API's to connect with linkedin. 
>
> I have used HttpConnection to get the data and post the data. All the 
> web services are running fine when I run each web service separately 
> but when I run all the web services at a time its showing Http errors. 
>
> The first web service is working fine but when it comes to second web 
> service its showing Http error code 401. 
>
> Please can anyone let me know why is it not working. Please help me. 
>
> Thanks in advance. 
>

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

Re: [android-developers] Checking if 5ghz wifi is available

2012-10-05 Thread Reductio Ad Absurdum
Am Donnerstag, 4. Oktober 2012 22:22:10 UTC+2 schrieb Irfan Sheriff:
> On Wed, Oct 3, 2012 at 8:11 AM, Reductio Ad Absurdum  
> wrote:
> 
> 
> 
> Hi all,
> 
> 
> i'm desperatly searching for a method to figure out if a device running my 
> app can actually use the 5Ghz wifi band.
> 
> 
> 
> 
> There is no API. Why would you want this in an app ?
> 
> 
> 

http://goo.gl/kjfR5

My app tries to prefer 5ghz wifis instead of restricting the device to them 
like Android itself can do.

It would be nice if I could inform users if their device has no 5ghz WiFi to 
avoid frustration.

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

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

2012-10-05 Thread rambabu mareedu
 Here the problem is you inflating only one xml file in each view , so if
your disabling button in one view it will effect in all views.

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

2012-10-05 Thread al
Since all answers seem to indicate the opposite: I got the mail but never 
send a DMCA notice.

Am Dienstag, 2. Oktober 2012 22:54:30 UTC+2 schrieb Ian:
>
> So it seems to be rather good news, isn't it? The FBI is hunting down 
> pirate sites...
> Did those who received this email ever made DMCA copyright infringement 
> notices to websites hosting/linking their apps illegaly?
> I did, several times. And now we've got this email; it may be related.
>
> On Tuesday, October 2, 2012 1:46:58 AM UTC+2, Tom wrote:
>>
>> I just spoke to a representative who said "Google should not have sent 
>> those emails." I just said I received an email and she immediately knew 
>> what I was referring to, no reference number needed. She told me to forget 
>> it was sent, and that the FBI will contact me directly if there is any 
>> issue pertaining to my account specifically (someone uploading one of my 
>> applications illegally to another application market).
>>
>> Hope that clears things up for people, I feel bad for the representatives 
>> at that number who must be receiving tons of calls. Anyway, nothing to 
>> worry about (at least for now).
>>
>> On Monday, October 1, 2012 7:14:18 PM UTC-4, Lew wrote:
>>>
>>> For more information
>>> about the subpoena, you may wish to contact the Federal Bureau of
>>> Investigation -- Atlanta Field Office at (404) 679-9000, reference #
>>> 2011R00320/FBI/ORKIN.
>>>
>>> On Monday, October 1, 2012 3:50:20 PM UTC-7, Streets Of Boston wrote:

 Got the same e-mail. Asked the same question on 'android-discuss' :-)
 I'm curious what this is all about? BlueStack? Aliyun/Acer?

 On Monday, October 1, 2012 6:45:39 PM UTC-4, Andrei wrote:
>
> I received this email
> But i am not interested and want my account to be excluded
> What do i need to do?
> Thanks
>
> Google has received a subpoena seeking information related to Android
> applications that may have been made available on alternative markets
> without the consent of the developer. The subpoena seeks information
> about those Android applications, including contact information for the
> developers of the applications. Our records show that your Android
> developer account will be included in the information Google will 
> provide
> in response to this subpoena.
>
> Google is not in a position to provide you with legal advice or discuss
> the substance of the process in our possession. For more information
> about the subpoena, you may wish to contact the Federal Bureau of
> Investigation -- Atlanta Field Office at (404) 679-9000, reference #
> 2011R00320/FBI/ORKIN.
>


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

2012-10-05 Thread Archana
Hi, I need to create an application(using 2 emulators) in which: Each 
emulator serves as a server and a client.

Server starts as a service in background. On request by the client, I have 
to transfer the contents of a JSON file from 1 emulator's server to other 
emulator's client.. Can you please guide me in the usage of how to use port 
numbers(as the IP addresses of both instances of the emulator is the same)?

Thank you!

On Friday, October 5, 2012 5:48:19 AM UTC+3, gjs wrote:
>
> Hi,
>
> Change the port number in your request -
>
> PORT = 8765
>
> not 8080
>
> And yes you can write your own http server simply by using a server 
> socket. 
> http://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html
>
> Regards 
>
>
> On Thursday, October 4, 2012 3:57:58 PM UTC+10, Archana wrote:
>>
>> Hi, I want to develop HTTP server in Android. I used the link 
>> https://gist.github.com/1893396#gistcomment-582451 NanoHTTPD. But when I 
>> open the page http://10.0.2.15:8080, I am getting WebPage not found. In 
>> the logs, I am getting 
>>
>> 10-04 05:55:39.106: E/Tab(499): onReceivedError -6 http://10.0.2.15:8697/The 
>> connection to the server was unsuccessful.
>>
>> Can anyone please tell me what the error is about? Or is there any other 
>> way to implement a HTTP server in Android?
>>
>> 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] listview row button click

2012-10-05 Thread vani reddy
HI,

I have a listview which has a button in each row  of listview,What I am
doing is on click of  2 nd row button I am disabling it, after scrolling
the listview  whe i come back to 2nd row of listview , even  buttons in the
3rd and 4th row are  also disabled, though i did not disable them.

How to overcome this problem??
-- 
Regards,
Vani Reddy

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

2012-10-05 Thread Ajit Vasudevan
awesome. Thanks Conrad & Romain.
 
@Romain : I fixed a rather expensive draw operation on the canvas in one of 
my views (a custom listview actually - was performing a few primitive draws 
in the onDraw method). I managed to define a Rect area to limit the bounds. 
It opens up another question - but I will post it in a separate thread 
because its not related to TextureView.  FYI - Once i fixed this , a simple 
view (with invalidate() calls) worked like a charm - atleast thus far. I 
will gauge the performance and see if introducing more drawing operations 
causes it to choke.
 
Thanks
-Ajit
On Thursday, October 4, 2012 8:25:01 AM UTC-7, Conrad Chapman wrote:

> As it happens our friend Romain Guy did have some ideas
>
> https://groups.google.com/forum/?fromgroups=#!topic/android-developers/_Ogjc8sozpA
>
> thank you
>
> On Wednesday, 3 October 2012 11:34:58 UTC+2, Conrad Chapman wrote:
>>
>> I have a similar problem but I was using SurfaceView properly as you 
>> mention Romain Guy but changing my code over does not work. The problem and 
>> code was posted here
>>
>> http://stackoverflow.com/questions/12688409/android-textureview-canvas-drawing-problems
>> The unlockandpostcanvas method does nothing. neither does 
>> TextureView.invalidate or surface.updateTexImage(). Only tapping the screen 
>> gets it to display??
>> Any ideas?
>>
>> On Monday, 1 October 2012 18:17:57 UTC+2, Romain Guy (Google) wrote:
>>>
>>> There is an overhead associated to invalidate() but unless your 
>>> hierarchy is extremely complicated it shouldn't be such an issue. But 
>>> you're right: SurfaceView can be used to avoid calling invalidate() 
>>> but don't override it's onDraw() method. You usually create a new 
>>> thread that renders onto the surface. 
>>>
>>> On Mon, Oct 1, 2012 at 2:53 AM, Ajit Vasudevan  
>>> wrote: 
>>> > Hi Romain, 
>>> > 
>>> > Thanks for your response. 
>>> > 
>>> > I was experiencing a very interesting behavior. I started using a 
>>> custom 
>>> > view inside a framelayout, and performed all the primitive operations 
>>> and 
>>> > called invalidate() to let the system call onDraw. It was choking. I 
>>> even 
>>> > tried to invalidate a rect, but it was just not fast enough - the 2nd 
>>> view 
>>> > that was requesting the underlying view to redraw certain primitives 
>>> based 
>>> > on the actions on the 2nd view was not responsive. I then started 
>>> using the 
>>> > SurfaceView to see if there is any benefit for the same operation - 
>>> and 
>>> > voila - it worked like a charm. This is why is used SurfaceView as a 
>>> > substitute - there was an apparent performance benefit. 
>>> > 
>>> >  That said, I'm going to take another look at my hierarchy, and all 
>>> the 
>>> > custom views (there are quite a few), to make sure there are no other 
>>> leaks. 
>>> > Like you said, I would rather use a View instead of SurfaceView. 
>>>  Thanks for 
>>> > your input though - it does answer the question that I can use a 
>>> canvas with 
>>> > TextureView if i follow the intended mode of use. 
>>> > 
>>> > -Ajit 
>>> > 
>>> > On Saturday, September 29, 2012 2:47:45 PM UTC-7, Romain Guy (Google) 
>>> wrote: 
>>> >> 
>>> >> Hi, 
>>> >> 
>>> >> If you were using SurfaceView's onDraw() method then you were not 
>>> >> getting any benefit. You have to use 
>>> >> lockCanvas()/unlockCanvasAndPost() and post on the underlying 
>>> Surface. 
>>> >> TextureView works in a similar way: you can call 
>>> >> lockCanvas()/unlockCanvasAndPost(). 
>>> >> 
>>> >> However, it seems all you need is a View. It's easier to use and 
>>> since 
>>> >> you are not using SurfaceView properly anyway it will do the same 
>>> >> thing. 
>>> >> 
>>> >> On Thu, Sep 27, 2012 at 2:19 PM, Ajit Vasudevan  
>>> wrote: 
>>> >> > Hello, 
>>> >> > 
>>> >> > I am currently working on an app that requires 
>>> computations/rendering 
>>> >> > based 
>>> >> > on a variety of user inputs. I have implemented the SurfaceView and 
>>> >> > things 
>>> >> > work as expected. 
>>> >> > But I started facing performance issues when I tried to put this 
>>> inside 
>>> >> > a 
>>> >> > horizontal scroll view. Obviously it is not intended to work this 
>>> way - 
>>> >> > but 
>>> >> > I tried anyway :) 
>>> >> > Based on what I have read - it appears like I have to move to 
>>> >> > TextureView. 
>>> >> > But i am unable to override the onDraw, and therefore cannot 
>>> perform the 
>>> >> > necessary drawing using the Canvas. This might be a trivial 
>>> question - 
>>> >> > but I 
>>> >> > wanted to know if we can use TextureView to draw primitives on the 
>>> >> > screen 
>>> >> > using a Canvas? The only examples I have seen thus far show the use 
>>> of 
>>> >> > video/camera/openGL rendering on the TextureView. 
>>> >> > 
>>> >> > Any help on this would be great. 
>>> >> > 
>>> >> > Thanks much 
>>> >> > -Ajit 
>>> >> > 
>>> >> > -- 
>>> >> > You received this message because you are subscribed to the Google 
>>> >> > Groups "Android Developer