[android-developers] Re: How to enable the Camera Icon on Nexus 7

2012-10-18 Thread x-alina
--- 
aosp.orig/packages/apps/Camera/src/com/android/camera/DisableCameraReceiver.java

2012-10-17 22:02:54.0 +0200
+++ 
aosp/packages/apps/Camera/src/com/android/camera/DisableCameraReceiver.java 
2012-10-17 22:12:39.618708549 +0200
@@ -29,7 +29,7 @@ import android.util.Log;
 // this receiver will be disabled, so it will not run again.
 public class DisableCameraReceiver extends BroadcastReceiver {
 private static final String TAG = DisableCameraReceiver;
-private static final boolean CHECK_BACK_CAMERA_ONLY = true;
+private static final boolean CHECK_BACK_CAMERA_ONLY = false;
 private static final String ACTIVITIES[] = {
 com.android.camera.CameraLauncher,
 };

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

2012-10-18 Thread Tom
Hi,

How to record and play the voice through the android app?
 
if any body know that concept plase share with me

Regards,
Tamilarasi

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

2012-10-18 Thread Piren
http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setOffscreenPageLimit(int)

just set it to 2

On Wednesday, October 17, 2012 7:30:54 PM UTC+2, Giosia Gentile wrote:

 it is one week I try to solve this problem whitout success. Please 
 help me. 

 I use the tabs navigation with viewpager. This is the class where I 
 put the tabs and the FragmentPagerAdapter class: 
 public class Detail extends SherlockFragmentActivity { 

 ViewPager  mViewPager; 

 TabsAdapter mTabsAdapter; 


 @Override 
 public void onCreate(Bundle savedInstanceState) { 

 super.onCreate(savedInstanceState); 


 setContentView(R.layout.activity_main); 

  ... 



  ActionBar bar = getSupportActionBar(); 
  bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
  bar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE); 

  mViewPager = (ViewPager)findViewById(R.id.pager); 

  // Add the tabs 
  mTabsAdapter = new TabsAdapter(this, bar, mViewPager); 
  mTabsAdapter.addTab(bar.newTab().setText(R.string.filmtab), 
  FragmentFilm.class, null); 
  mTabsAdapter.addTab(bar.newTab().setText(R.string.cinematab), 
  FragmentCinema.class, null); 
  mTabsAdapter.addTab(bar.newTab().setText(R.string.dintornitab), 
  FragmentPdi.class, null); 



  if (savedInstanceState != null) { 
   
 bar.setSelectedNavigationItem(savedInstanceState.getInt(tab)); 
  } 



 } 


  @Override 
 protected void onSaveInstanceState(Bundle outState) { 
 super.onSaveInstanceState(outState); 
 outState.putInt(tab, 
 getSupportActionBar().getSelectedNavigationIndex()); 
 } 


  public static class TabsAdapter extends FragmentPagerAdapter 
  implements ViewPager.OnPageChangeListener, ActionBar.TabListener 
 { 
  private final Context mContext; 
  private final ActionBar mBar; 
  private final ViewPager mViewPager; 
  private final ArrayListTabInfo mTabs = new 
 ArrayListTabInfo(); 

  static final class TabInfo { 
  private final Class? clss; 
  private final Bundle args; 

  TabInfo(Class? _class, Bundle _args) { 
  clss = _class; 
  args = _args; 
  } 
  } 

  public TabsAdapter(Detail activity, ActionBar bar, ViewPager 
 pager) { 
  super(activity.getSupportFragmentManager()); 
  mContext = activity; 
  mBar = bar; 
  mViewPager = pager; 
  mViewPager.setAdapter(this); 
  mViewPager.setOnPageChangeListener(this); 
  } 

  public void addTab(ActionBar.Tab tab, Class? extends 
 Fragment clss, Bundle args) { 
  TabInfo info = new TabInfo(clss, args); 
  tab.setTag(info); 
  tab.setTabListener(this); 
  mTabs.add(info); 
  mBar.addTab(tab); 
  notifyDataSetChanged(); 
  } 

  @Override 
  public int getCount() { 
  return mTabs.size(); 
  } 

  @Override 
  public Fragment getItem(int position) { 
  TabInfo info = mTabs.get(position); 
  return Fragment.instantiate(mContext, 
 info.clss.getName(), info.args); 
  } 

  @Override 
  public void onPageScrolled(int position, float 
 positionOffset, int positionOffsetPixels) { 
  } 

  @Override 
  public void onPageSelected(int position) { 
  mBar.setSelectedNavigationItem(position); 
  } 

  @Override 
  public void onPageScrollStateChanged(int state) { 
  } 

  @Override 
  public void onTabSelected(Tab tab, FragmentTransaction ft) { 
  Object tag = tab.getTag(); 
  for (int i=0; imTabs.size(); i++) { 
  if (mTabs.get(i) == tag) { 
  mViewPager.setCurrentItem(i); 
  } 
  } 
  } 

  @Override 
  public void onTabUnselected(Tab tab, FragmentTransaction ft) 
 { 

  } 

  @Override 
  public void onTabReselected(Tab tab, FragmentTransaction ft) 
 { 

  } 
  } 
 } 

 The 3 fragment classes are all the same I copy here just one; In the 
 fragment class I use async task for download the data I need to put in 
 the view, I do this in the onActivityCreated method: 

 public class FragmentFilm extends SherlockFragment 
 { 

 private Detail act; 

 private DetailedRec detail_film; 
 private View view; 
 private String a; 




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



 setRetainInstance(true); 
 view = inflater.inflate(R.layout.tab_film_info, container, 
 false); 

 return 

Re: [android-developers] Re: How to enable the Camera Icon on Nexus 7

2012-10-18 Thread Nikolay Elenkov
On Thu, Oct 18, 2012 at 4:14 PM, x-alina alina.friedrich...@gmail.com wrote:
 ---
 aosp.orig/packages/apps/Camera/src/com/android/camera/DisableCameraReceiver.java

Glad you found it, but if you are trying to modify AOSP code, this is
off-topic for this list.

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

2012-10-18 Thread Julia Uschapovska
Many thanks!

четверг, 18 октября 2012 г., 0:32:04 UTC+3 пользователь Michael Chan 
написал:

 Hi Julia, 

 From 
 http://developer.android.com/guide/google/play/billing/billing_subscriptions.html
  

 As with other in-app products, you configure and publish subscriptions 
 using the Developer Console and then sell them from inside apps 
 installed on an Android-powered devices. In the Developer console, you 
 create subscription products and add them to a product list, then set 
 a price and optional trial period for each, choose a billing interval 
 (monthly or annual), and then publish. 

 Thanks, 
 Mike 


 On Wed, Oct 17, 2012 at 8:52 AM, Julia Uschapovska 
 uscha...@gmail.com javascript: wrote: 
  Does a user pay only once when the trial period is over? or is there 
 some 
  monthly/yearly or any other subscription type? 
  
  -- 
  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.comjavascript: 
  To unsubscribe from this group, send email to 
  android-developers+unsubscr...@googlegroups.com javascript: 
  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] Android Chatting

2012-10-18 Thread Rahul Kaushik
Thanks Rafeel

Can You Please guide me how it would connect to server wildfire 3.1.0


Thanks

On Tue, Oct 16, 2012 at 5:47 PM, Rafael Maas rafaelm...@gmail.com wrote:

 Q1: API 7 ( android 2.1 )
 http://developer.android.com/about/versions/android-2.1.html.
 Q2: Yes, smack is a good open Source XMPP (Jabber) client library (
 http://xmpp.org/xmpp-protocols/)


 2012/10/16 Rahul Kaushik rahulkaushi...@gmail.com

 Hello,

 I want to develop an chat application

 Q1 : I want it to work on mobile and tablet and it should be compatible
 with all android version , and by default which version of android and api
 i should start my developmet??

 Q2 : i have goggled this and found *smack(3.2.2)* as a good option (if
 there any please tell)


 Please suggest

 Thanks
 RK

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


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

2012-10-18 Thread Rahul Kaushik
Hello,

How to connect with server wildfire 3.1.0 from android code

Thanks
RK

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

[android-developers] Apps created by our company. Feedback please.

2012-10-18 Thread Kesavan M
Dear all,

MAD University is aimed at creating a mobile ecosystem wherein students are
encouraged to become entrepreneurs. Some of our students have developed
apps which has been posted in the Play. Please download and give your
feedback so that we would be able to raise the bar of our output thereby
increasing the quality of deliverable among our students.

https://play.google.com/store/apps/developer?id=MAD+University#?t=W251bGwsbnVsbCxudWxsLDEsImNvbS5tYWQudmlzd2Fyb29wYW0uYXBwIl0
.

You can view and download the apps from the above link.

thanks
kesavan.m

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

2012-10-18 Thread Asheesh Arya
please refer this link
http://www.benmccann.com/dev-blog/android-audio-recording-tutorial/

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

2012-10-18 Thread Archana
Hi, my scenario to implement is to communicate between 2 phones(in the same 
network) running the same application. Can I use Wi-Fi direct for this? Any 
example/link will be helpful.
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] Changing a CharacterStyle

2012-10-18 Thread Jan Burse

Dear All,

I am using a single character style in multiple text
locations. I simply did the following:

output = new ForegroundColorSpan(OUTPUT_COLOR);

And then whenever a portion of my text has to
have the above character style, I simply use the
wrap() method to share the style:

getEditableText().setSpan(CharacterStyle.wrap(output),
   start, start + str.length(),
   Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

Now I don't find a method setForgroundColor in the
ForgroundColorSpan class. How can I change the color?
How can I notify my text?

Bye

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

2012-10-18 Thread Paolo Mancini
 

Hi, 

I'm using the XmlPullParser to parse a large XML file.

I need to obtain position (bytes) for each tag but I haven't found any 
method.

I need this cause I want to trace the progression of the parsing (with the 
total length).


Is it possible? Does somebody know another solution?


Many 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] Live streaming

2012-10-18 Thread mohammed Nuhail
can any one help me out with Live video streaming ?
 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] Live streaming

2012-10-18 Thread Michael Banzon
I'm sure that getting help will be a lot easier if you state a real
and actual problem based on the experiments you have conducted so far.

On Thu, Oct 18, 2012 at 12:06 PM, mohammed Nuhail nuhail...@gmail.com wrote:
 can any one help me out with Live video streaming ?
  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



-- 
Michael Banzon
http://michaelbanzon.com/

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


Re: [android-developers] Live streaming

2012-10-18 Thread mohammed Nuhail
send me some working example

On Thu, Oct 18, 2012 at 3:40 PM, Michael Banzon mich...@banzon.dk wrote:

 I'm sure that getting help will be a lot easier if you state a real
 and actual problem based on the experiments you have conducted so far.

 On Thu, Oct 18, 2012 at 12:06 PM, mohammed Nuhail nuhail...@gmail.com
 wrote:
  can any one help me out with Live video streaming ?
   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



 --
 Michael Banzon
 http://michaelbanzon.com/

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


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

[android-developers] Re: How to pass a LIst of MyObject in .aidl

2012-10-18 Thread Landry shuai
How do you solve this problem? I also come across this problem.

On Wednesday, September 23, 2009 9:57:10 AM UTC+8, John Landler wrote:

 I read this.
 http://developer.android.com/guide/developing/tools/aidl.html

 And I have
 * created a MyObject.java which implements Parceable.
 * created a MyObject.aidl file which just contains:

 package com.mycompany.mypackage;

 parcelable MyObject;

 * In my IMyService.aidl, I have added
 import com.mycompany.mypackage.MyObject;

 * in my Android.mk file, I have added:
 LOCAL_SRC_FILES += \
 src/com/mycompany/mypackage/MyObject.aidl \
 src/com/mycompany/mypackage/IMyService.aidl \

 But when I compile, I get this error:
 Aidl: Test = src/com/mycompany/mypackage//MyObject.aidl
 src/com/mycompany/mypackage/MyObject.aidl:19 aidl can only generate
 code for interfaces, not parcelables,
 src/com/mycompany/mypackage/MyObject.aidl:19 .aidl files that only
 declare parcelables don't need to go in the Makefile.
 make: *** 
 [out/target/common/obj/APPS/Test_intermediates/src/src/com/mycompany/mypackage/MyObject.java]
 Error 1

 I appreciate if anyone can help me.

 On Tue, Sep 22, 2009 at 5:12 PM, n179911 n17...@gmail.com javascript: 
 wrote:
  I have this method in my .aidl file:
 
  void getObjects(out ListMyObject objList);
  But I get this error
 
  src/com/mycompany/mypackage/ITestService.aidl:26 parameter objList (1)
  unknown type List objList
 
  How to create a List of MyObject in .aidl?
  I know I need to create a Java class MyObject which implements
  Parceable.  I just don't know what I need to do in .aidl file.
 
  Thank you.
 



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

Re: [android-developers] Re: Gradients on PNGs

2012-10-18 Thread Francisco Marzoa
In fact, the problem was with the format, but with RGB_. I have had 
problems like this before, but for some reason I forgot it, and I recall 
just a minute after sending that question.


The obvious solution was to use RGB_ instead.

Best regards,

On 09/24/2012 08:11 PM, bob wrote:

Maybe you are loading a bitmap with this format:

Bitmap.Config
RGB_565



On Monday, September 24, 2012 9:52:47 AM UTC-5, Fran wrote:

Hi,

I am facing problems with PNG that includes some gradients. They are
very bad shown, with bands instead of soft transitions. I have
attached
two images that illustrates the problem.

In the past I used to solve this problem with the workaround of
spreading some noise on before saving the PNG, but it means more time
lost and less graphic quality.

Now I have a graphic designer that is improving the graphics of my
first
game, and I do not want to tell him that he must do such dirty
things so
the gradients are shown as it should.

So, is there any definitive solution to this problem and not merely a
workaround?

Best regards,


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


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

[android-developers] Re: Save the fragment state in tabs switch

2012-10-18 Thread Giosia Gentile
Thank you I will try it this evening!!
Please can you help me also with the screen orientation??? I used the 
setRetainIstance(true) but it donìt work!!

On Thursday, October 18, 2012 10:08:08 AM UTC+2, Piren wrote:


 http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setOffscreenPageLimit(int)

 just set it to 2

 On Wednesday, October 17, 2012 7:30:54 PM UTC+2, Giosia Gentile wrote:

 it is one week I try to solve this problem whitout success. Please 
 help me. 

 I use the tabs navigation with viewpager. This is the class where I 
 put the tabs and the FragmentPagerAdapter class: 
 public class Detail extends SherlockFragmentActivity { 

 ViewPager  mViewPager; 

 TabsAdapter mTabsAdapter; 


 @Override 
 public void onCreate(Bundle savedInstanceState) { 

 super.onCreate(savedInstanceState); 


 setContentView(R.layout.activity_main); 

  ... 



  ActionBar bar = getSupportActionBar(); 
  bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
  bar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE); 

  mViewPager = (ViewPager)findViewById(R.id.pager); 

  // Add the tabs 
  mTabsAdapter = new TabsAdapter(this, bar, mViewPager); 
  mTabsAdapter.addTab(bar.newTab().setText(R.string.filmtab), 
  FragmentFilm.class, null); 
  mTabsAdapter.addTab(bar.newTab().setText(R.string.cinematab), 
  FragmentCinema.class, null); 
  mTabsAdapter.addTab(bar.newTab().setText(R.string.dintornitab), 
  FragmentPdi.class, null); 



  if (savedInstanceState != null) { 
   
 bar.setSelectedNavigationItem(savedInstanceState.getInt(tab)); 
  } 



 } 


  @Override 
 protected void onSaveInstanceState(Bundle outState) { 
 super.onSaveInstanceState(outState); 
 outState.putInt(tab, 
 getSupportActionBar().getSelectedNavigationIndex()); 
 } 


  public static class TabsAdapter extends FragmentPagerAdapter 
  implements ViewPager.OnPageChangeListener, ActionBar.TabListener 
 { 
  private final Context mContext; 
  private final ActionBar mBar; 
  private final ViewPager mViewPager; 
  private final ArrayListTabInfo mTabs = new 
 ArrayListTabInfo(); 

  static final class TabInfo { 
  private final Class? clss; 
  private final Bundle args; 

  TabInfo(Class? _class, Bundle _args) { 
  clss = _class; 
  args = _args; 
  } 
  } 

  public TabsAdapter(Detail activity, ActionBar bar, ViewPager 
 pager) { 
  super(activity.getSupportFragmentManager()); 
  mContext = activity; 
  mBar = bar; 
  mViewPager = pager; 
  mViewPager.setAdapter(this); 
  mViewPager.setOnPageChangeListener(this); 
  } 

  public void addTab(ActionBar.Tab tab, Class? extends 
 Fragment clss, Bundle args) { 
  TabInfo info = new TabInfo(clss, args); 
  tab.setTag(info); 
  tab.setTabListener(this); 
  mTabs.add(info); 
  mBar.addTab(tab); 
  notifyDataSetChanged(); 
  } 

  @Override 
  public int getCount() { 
  return mTabs.size(); 
  } 

  @Override 
  public Fragment getItem(int position) { 
  TabInfo info = mTabs.get(position); 
  return Fragment.instantiate(mContext, 
 info.clss.getName(), info.args); 
  } 

  @Override 
  public void onPageScrolled(int position, float 
 positionOffset, int positionOffsetPixels) { 
  } 

  @Override 
  public void onPageSelected(int position) { 
  mBar.setSelectedNavigationItem(position); 
  } 

  @Override 
  public void onPageScrollStateChanged(int state) { 
  } 

  @Override 
  public void onTabSelected(Tab tab, FragmentTransaction ft) { 
  Object tag = tab.getTag(); 
  for (int i=0; imTabs.size(); i++) { 
  if (mTabs.get(i) == tag) { 
  mViewPager.setCurrentItem(i); 
  } 
  } 
  } 

  @Override 
  public void onTabUnselected(Tab tab, FragmentTransaction ft) 
 { 

  } 

  @Override 
  public void onTabReselected(Tab tab, FragmentTransaction ft) 
 { 

  } 
  } 
 } 

 The 3 fragment classes are all the same I copy here just one; In the 
 fragment class I use async task for download the data I need to put in 
 the view, I do this in the onActivityCreated method: 

 public class FragmentFilm extends SherlockFragment 
 { 

 private Detail act; 

 private DetailedRec detail_film; 
 private View view; 
 private String a; 




 @Override 
 public View onCreateView(LayoutInflater 

Re: [android-developers] XmlPullParser tag position

2012-10-18 Thread Harri Smått

On Oct 18, 2012, at 12:36 PM, Paolo Mancini paolo8...@gmail.com wrote:

 I need to obtain position (bytes) for each tag but I haven't found any method.

Yesterday you needed an approximation of current position for setting up a 
progress bar, which one is it?

--
H

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

2012-10-18 Thread Paolo Mancini
Sorry, i've duplicated the topic…it's the same problem!


Il giorno 18/ott/2012, alle ore 12:42, Harri Smått ha scritto:

 
 On Oct 18, 2012, at 12:36 PM, Paolo Mancini paolo8...@gmail.com wrote:
 
 I need to obtain position (bytes) for each tag but I haven't found any 
 method.
 
 Yesterday you needed an approximation of current position for setting up a 
 progress bar, which one is it?
 
 --
 H
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Save the fragment state in tabs switch

2012-10-18 Thread Piren
Orientation change will be harder to handle... see this for help:
http://developer.android.com/guide/topics/resources/runtime-changes.html





On Thursday, October 18, 2012 12:40:49 PM UTC+2, Giosia Gentile wrote:

 Thank you I will try it this evening!!
 Please can you help me also with the screen orientation??? I used the 
 setRetainIstance(true) but it donìt work!!

 On Thursday, October 18, 2012 10:08:08 AM UTC+2, Piren wrote:


 http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setOffscreenPageLimit(int)

 just set it to 2

 On Wednesday, October 17, 2012 7:30:54 PM UTC+2, Giosia Gentile wrote:

 it is one week I try to solve this problem whitout success. Please 
 help me. 

 I use the tabs navigation with viewpager. This is the class where I 
 put the tabs and the FragmentPagerAdapter class: 
 public class Detail extends SherlockFragmentActivity { 

 ViewPager  mViewPager; 

 TabsAdapter mTabsAdapter; 


 @Override 
 public void onCreate(Bundle savedInstanceState) { 

 super.onCreate(savedInstanceState); 


 setContentView(R.layout.activity_main); 

  ... 



  ActionBar bar = getSupportActionBar(); 
  bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
  bar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE); 

  mViewPager = (ViewPager)findViewById(R.id.pager); 

  // Add the tabs 
  mTabsAdapter = new TabsAdapter(this, bar, mViewPager); 
  mTabsAdapter.addTab(bar.newTab().setText(R.string.filmtab), 
  FragmentFilm.class, null); 
  mTabsAdapter.addTab(bar.newTab().setText(R.string.cinematab), 
  FragmentCinema.class, null); 
  mTabsAdapter.addTab(bar.newTab().setText(R.string.dintornitab), 
  FragmentPdi.class, null); 



  if (savedInstanceState != null) { 
   
 bar.setSelectedNavigationItem(savedInstanceState.getInt(tab)); 
  } 



 } 


  @Override 
 protected void onSaveInstanceState(Bundle outState) { 
 super.onSaveInstanceState(outState); 
 outState.putInt(tab, 
 getSupportActionBar().getSelectedNavigationIndex()); 
 } 


  public static class TabsAdapter extends FragmentPagerAdapter 
  implements ViewPager.OnPageChangeListener, ActionBar.TabListener 
 { 
  private final Context mContext; 
  private final ActionBar mBar; 
  private final ViewPager mViewPager; 
  private final ArrayListTabInfo mTabs = new 
 ArrayListTabInfo(); 

  static final class TabInfo { 
  private final Class? clss; 
  private final Bundle args; 

  TabInfo(Class? _class, Bundle _args) { 
  clss = _class; 
  args = _args; 
  } 
  } 

  public TabsAdapter(Detail activity, ActionBar bar, ViewPager 
 pager) { 
  super(activity.getSupportFragmentManager()); 
  mContext = activity; 
  mBar = bar; 
  mViewPager = pager; 
  mViewPager.setAdapter(this); 
  mViewPager.setOnPageChangeListener(this); 
  } 

  public void addTab(ActionBar.Tab tab, Class? extends 
 Fragment clss, Bundle args) { 
  TabInfo info = new TabInfo(clss, args); 
  tab.setTag(info); 
  tab.setTabListener(this); 
  mTabs.add(info); 
  mBar.addTab(tab); 
  notifyDataSetChanged(); 
  } 

  @Override 
  public int getCount() { 
  return mTabs.size(); 
  } 

  @Override 
  public Fragment getItem(int position) { 
  TabInfo info = mTabs.get(position); 
  return Fragment.instantiate(mContext, 
 info.clss.getName(), info.args); 
  } 

  @Override 
  public void onPageScrolled(int position, float 
 positionOffset, int positionOffsetPixels) { 
  } 

  @Override 
  public void onPageSelected(int position) { 
  mBar.setSelectedNavigationItem(position); 
  } 

  @Override 
  public void onPageScrollStateChanged(int state) { 
  } 

  @Override 
  public void onTabSelected(Tab tab, FragmentTransaction ft) { 
  Object tag = tab.getTag(); 
  for (int i=0; imTabs.size(); i++) { 
  if (mTabs.get(i) == tag) { 
  mViewPager.setCurrentItem(i); 
  } 
  } 
  } 

  @Override 
  public void onTabUnselected(Tab tab, FragmentTransaction ft) 
 { 

  } 

  @Override 
  public void onTabReselected(Tab tab, FragmentTransaction ft) 
 { 

  } 
  } 
 } 

 The 3 fragment classes are all the same I copy here just one; In the 
 fragment class I use async task for download the data I need to put in 
 the view, I do this in the onActivityCreated method: 

 public class 

Re: [android-developers] XmlPullParser tag position

2012-10-18 Thread Harri Smått

On Oct 18, 2012, at 1:50 PM, Paolo Mancini paolo8...@gmail.com wrote:

 Sorry, i've duplicated the topic…it's the same problem!

In that case you could implement your own InputStream class which is actually 
only a proxy over existing InputStream. And you can count how many bytes have 
passed through it on the fly. For parsing you pass this proxy input stream 
instead and can fetch current position from it.

See CountingInputStream for some ideas;

http://alvinalexander.com/java/jwarehouse/commons-io-1.0/src/java/org/apache/commons/io/input/CountingInputStream.java.shtml

--
H

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

2012-10-18 Thread Mark Murphy
On Thu, Oct 18, 2012 at 5:35 AM, Jan Burse janbu...@fastmail.fm wrote:
 How can I change the color?

Use getSpans(), find all occurrences of your span, remove the old
span, and replace it with a span with the new color.

It's possible that there is a more efficient alternative than this,
but I am not aware of one.

-- 
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] how create voice chatting app in android

2012-10-18 Thread Tom
Hi,


if know about how create voice chatting app in android? please share with 
me.

Thanks

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

[android-developers] Re: Media Volume

2012-10-18 Thread Tom
Hi, 

if u know about the record and play the voice in android please share with 
me
Thanks

On Wednesday, 17 October 2012 20:00:05 UTC+5:30, chi wrote:

 Hi, everyone!

 Does anybody know how android measures its media volume? I am working on a 
 project right now that is dependent on the volume, in decibels, of the 
 sound I'm playing.

 I'm using Audio Manager's setStreamVolume, which measures the volume in 
 integer from 0-15. Can anybody tell me the decibel equivalent of these 
 integers? Or is there any other way I can manipulate the volume and know 
 its value in decibels?

 Thanks!!


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

[android-developers] Re: Reusing gradients in different places

2012-10-18 Thread Fran
I answer to myself, JFTR:

Use GradientDrawable instead of LinearGradient, so you can move the same 
gradient object to different places just assigning different bounds.

Best regards,

El miércoles, 17 de octubre de 2012 17:52:42 UTC+2, Fran escribió:

 Hi there, 

 I draw a grid on a surface, and each cell of the grid is filled with a 
 gradient, so what I do is to create a LinearGradient for each cell, then 
 set as a shader for a Paint, and finally create a Rect using that Paint. 

 Something in the way of: 

 Paint cellPaint = new Paint(); 
 ... 
 for (i=0; icell.length; i++) { 
  LinearGradient gradient = new LinearGradient(cell[i].left, 
 cell[i].top, 80, 80, Color.BLACK, Color.WHITE, Shader.TileMode.CLAMP); 
  cellPaint.setShader(cellGradient); 
  canvas.drawRect(cell[i].left, cell[i].top, cell[i].left+79, 
 cell[i].top+79, cellPaint); 
 } 


 The problem is that I need to create a lot of LinearGradient objects, 
 one for each cell, even when they use the same colors, size, etc. and 
 just changes the coordinates because each one is drawn on a different 
 place. 

 But LinearGradient constructor seems to use absolute coordinates, I 
 mean relatives to the whole screen, so a LinearGradient created on x and 
 y coordinates, cannot be reused on x2 and y2 (where x2 and y2 are 
 different from x and y, of course). 

 Does someone knows a more or less straight forward manner to solve this 
 problem creating just one LinearGradient and then moving it to 
 different places as needed? 

 Best regards, 



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

2012-10-18 Thread Jan Burse

Mark Murphy schrieb:

On Thu, Oct 18, 2012 at 5:35 AM, Jan Burse janbu...@fastmail.fm wrote:

How can I change the color?


Use getSpans(), find all occurrences of your span, remove the old
span, and replace it with a span with the new color.

It's possible that there is a more efficient alternative than this,
but I am not aware of one.



I went for a custom class:

public class MyForegroundColorSpan extends CharacterStyle
   implements UpdateAppearance {
private int color;

public int getForegroundColor() {
return color;
}

public void setForegroundColor(int c) {
color = c;
}

public void updateDrawState(TextPaint ds) {
ds.setColor(color);
}

}

Then using the setter and calling invalidate() on
the text view works like a charm.

Bye

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

2012-10-18 Thread Guillaume Imbert
I'm encoutering an issue using IsoDep and NfcA classes.

I need to scan a tag and transceive informations. To do so, I use the 
following code :

IsoDep isoDep = IsoDep.get(tag);
try {
isoDep.connect();
isoDep.setTimeout(5000);
Log.d(ISODEP_TESTS, isoDep.isConnected() ? connection OK
: connection NOK);
isoDep.close();
Log.d(ISODEP_TESTS,
connection after close : 
+ (isoDep.isConnected() ? connection still open
: connection closed));
} catch (IOException e) {
Log.e(ISEODEP_ERROR,
error on isodep connection :  + e.getMessage());
Log.e(ISEODEP_ERROR, NfcAdapter state :  + mAdapter.isEnabled());
try {
isoDep.close();
Log.e(ISEODEP_ERROR,
no error on isodep close when IOException happened);
} catch (IOException e1) {
Log.e(ISEODEP_ERROR,
error on isodep close when IOException : 
+ e1.getMessage());
}
throw e;
}
 The given tag is not null, and everything goes well in most cases.
Nonetheless when I take the nfc card away from the phone before the 
transceive ended, I get an IOException.
It happens when I try to connect to the isodep technology. Moreover, once I 
get this IOException, any other attempt to read the card leads to this same 
IOException.
To get back the normal behavior, I have to finish the application, and then 
I can scan a new tag.

Here are the logs I obtain :

10-18 11:24:20.926: D/MainActivity(28797): onResume called  == 
First scan. Everything is OK
10-18 11:24:20.958: D/ISODEP_TESTS(28797): connection OK
10-18 11:24:20.981: D/ISODEP_TESTS(28797): connection after close : 
connection closed
10-18 11:24:22.380: D/MainActivity(28797): onResume called  == 
Second scan. Everything is OK
10-18 11:24:22.403: D/ISODEP_TESTS(28797): connection OK
10-18 11:24:22.426: D/ISODEP_TESTS(28797): connection after close : 
connection closed
10-18 11:24:25.051: D/MainActivity(28797): onResume called  == 
Thrid scan. I take away the card while the scan occurs.
10-18 11:24:25.059: E/ISEODEP_ERROR(28797): error on isodep connection : 
null
10-18 11:24:25.059: E/ISEODEP_ERROR(28797): NfcAdapter state : true
10-18 11:24:25.059: E/ISEODEP_ERROR(28797): no error on isodep close when 
IOException happened
10-18 11:24:29.137: D/MainActivity(28797): onResume called  == 
Fourth scan. I do not take away the card. IOException occurs while 
isodep.connect() is called
10-18 11:24:29.145: E/ISEODEP_ERROR(28797): error on isodep connection : 
null
10-18 11:24:29.145: E/ISEODEP_ERROR(28797): NfcAdapter state : true
10-18 11:24:29.145: E/ISEODEP_ERROR(28797): no error on isodep close when 
IOException happened
10-18 11:24:35.434: D/MainActivity(28797): onResume called  == 
Fifth scan. Same as 4
10-18 11:24:35.434: E/ISEODEP_ERROR(28797): error on isodep connection : 
null
10-18 11:24:35.434: E/ISEODEP_ERROR(28797): NfcAdapter state : true
10-18 11:24:35.442: E/ISEODEP_ERROR(28797): no error on isodep close when 
IOException happened

Since the nfc cards I use are nfcA compatible too, I have tried this 
technology too, and I get the same results.

Is there a way to get back the normal behavior without having to restart 
the application? What am I doing wrong?

If it can helps, Here are my androidManifest.xml and the Activity main 
methods :
application
android:icon=@drawable/ic_launcher
android:label=@string/app_name
android:theme=@android:style/Theme.Holo.NoActionBar 
activity
android:name=.MainActivity
android:label=@string/title_activity_main
android:screenOrientation=portrait 
intent-filter
action android:name=android.nfc.action.TAG_DISCOVERED /

category android:name=android.intent.category.DEFAULT /
/intent-filter
/activity
activity-alias
android:name=MainActivityLauncher
android:label=@string/app_name
android:targetActivity=MainActivity 
intent-filter
action android:name=android.intent.action.MAIN /

category android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity-alias
/application
 @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(this.getClass().getSimpleName(), onCreate called);
mAdapter = NfcAdapter.getDefaultAdapter(this);

setContentView(R.layout.activity_main);
HomeFragment homeFragment = new HomeFragment();
getFragmentManager().beginTransaction()
.replace(R.id.frame_content, homeFragment).commit();

pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this,
getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_TAG_DISCOVERED);
try {
ndef.addDataType(*/*); /*
 * Handles all MIME based dispatches. You
 * should specify only the ones that you
 * need.
 */
} catch (MalformedMimeTypeException e) {
throw new RuntimeException(fail, e);
}
intentFiltersArray = new IntentFilter[] { ndef, };

Re: [android-developers] Re: Changing a CharacterStyle

2012-10-18 Thread Mark Murphy
That's an interesting approach. I do not think that it will work in
all cases. If you poke around at the logic for rendering text in
TextView, you'll find a bunch of baked-in class references (e.g.,
getUrls() only uses UrlSpan, spell-check logic relies on
SuggestionSpan), meaning that creating your own equivalents would be
at least partially ignored by the rendering code. I'm glad to hear
that this works at least for foreground colors, though.

On Thu, Oct 18, 2012 at 8:05 AM, Jan Burse janbu...@fastmail.fm wrote:
 Mark Murphy schrieb:

 On Thu, Oct 18, 2012 at 5:35 AM, Jan Burse janbu...@fastmail.fm wrote:

 How can I change the color?


 Use getSpans(), find all occurrences of your span, remove the old
 span, and replace it with a span with the new color.

 It's possible that there is a more efficient alternative than this,
 but I am not aware of one.


 I went for a custom class:

 public class MyForegroundColorSpan extends CharacterStyle
implements UpdateAppearance {
 private int color;

 public int getForegroundColor() {
 return color;
 }

 public void setForegroundColor(int c) {
 color = c;
 }

 public void updateDrawState(TextPaint ds) {
 ds.setColor(color);
 }

 }

 Then using the setter and calling invalidate() on
 the text view works like a charm.


 Bye

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

Android Training in NYC: http://marakana.com/training/android/

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


[android-developers] Re: Changing a CharacterStyle

2012-10-18 Thread Jan Burse

Mark Murphy schrieb:

SuggestionSpan), meaning that creating your own equivalents would be
at least partially ignored by the rendering code. I'm glad to hear
that this works at least for foreground colors, though.


It works, since characterstyle is supposed to be extensible
in that the method updateDrawState() is implemented.

But I don't know yet whether the invalidate() also works
for spans that are UpdateLayout and not only UpdateAppearance.

Maybe somebody knows more.

Bye

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

2012-10-18 Thread ravi .
Hi
I had uploaded video from Android device to YouTube using* **YouTube Direct 
App for Android http://code.google.com/p/ytd-android/  
http://code.google.com/p/ytd-android/*. I want to know how to delete the 
uploaded video from YouTube. http://code.google.com/p/ytd-android/ 
 
Thanks
http://code.google.com/p/ytd-android/

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

Re: [android-developers] How to delete video from YouTube

2012-10-18 Thread Mark Murphy
This list is for developing applications with the Android SDK. For
YouTube support, please contact YouTube.

On Thu, Oct 18, 2012 at 8:30 AM, ravi . ravikanth...@gmail.com wrote:
 Hi
 I had uploaded video from Android device to YouTube using YouTube Direct App
 for Android  . I want to know how to delete the uploaded video from YouTube.

 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



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

Android Training in NYC: http://marakana.com/training/android/

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


Re: [android-developers] Re: Ways that 2 Android phones communicate between each other

2012-10-18 Thread Archana
Hi, I want the same application installed in 2 devices(emulators) to 
exchange file/update it between them, given they are in the same network.

On Monday, October 15, 2012 8:57:57 PM UTC+3, Kristopher Micinski wrote:

 AIDL has nothing to do with this, other than the fact that it is also 
 sending information across a kernel barrier, but otherwise completely 
 unrelated. 

 Why are your requirements to use HTTP?  Is this for a class?  If so, 
 then read any of the hundreds of network programming in Java 
 tutorials on the internet, it is literally no different in Android, 
 except that you will probably do it in a service. 

 kris 

 On Mon, Oct 15, 2012 at 10:19 AM, Archana 
 ramalinga...@gmail.comjavascript: 
 wrote: 
  But the requirements are to use HTTP. Please let me know if I have to 
 use 
  AIDL/ Binder for this scenario? Any suggestion will be really helpful to 
 me. 
  Thanks in advance! 
  
  
  On Monday, October 15, 2012 5:16:19 PM UTC+3, Kristopher Micinski wrote: 
  
  I think I've said this before, but you probably do _not_ want to use 
  an HTTP stream socket connection, that will be an excellent way to 
  kill the device's battery and most data providers block ports anyway. 
  
  kris 
  
  On Mon, Oct 15, 2012 at 5:14 AM, Archana ramalinga...@gmail.com 
 wrote: 
   Hi, I just want 2 android phone instances to communicate via HTTP 
   protocol. 
   Phone 1 does HTTP Post of a file to phone2, which does some 
 processing 
   and 
   updates file. This has to be again sent to phone1. This process 
 should 
   go 
   on. 
   
   
   On Saturday, October 13, 2012 11:37:28 AM UTC+3, Andrew Mackenzie 
 wrote: 
   
   Depends on size of what you want to send, and how long the 
 connection 
   should last 
   
   If its a list you want: 
   SMS 
   Nfc - he needed 
   Bump 
   QR code on screen - QR code scanner 
   Audio 
   Bluetooth 
   Wifi direct 
   Wifi via 'relay' server 
   
   If its a solution you want, then maybe give us some more information 
   about 
   what you want to do. 
   
   -- 
   You received this message because you are subscribed to the Google 
   Groups Android Developers group. 
   To post to this group, send email to android-d...@googlegroups.com 
   To unsubscribe from this group, send email to 
   android-developers+unsubscr...@googlegroups.com javascript: 
   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.comjavascript: 
  To unsubscribe from this group, send email to 
  android-developers+unsubscr...@googlegroups.com javascript: 
  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] If hdpi and xhdpi drawables defined, which drawable is used as base for an mdpi device?

2012-10-18 Thread Mark Carter
If I define a drawable in hdpi and xhdpi but not mdpi, will Android (on an 
mdpi device) take the xhdpi drawable and scale it down by a factor of two 
or will it use the nearest defined density (hdpi) drawable?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Want to distribute a application and manage unistallation of it remotely

2012-10-18 Thread Gautam Bisht
Hi All,

I want to create a application for my employee which will be distributed 
from my server. I want a feature that once the employee leave the company i 
can remotely uninstall the application from his/her mobile.
Is it possible in android??

Regards,
Gautam

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

2012-10-18 Thread Liorry
Hi Tina,
I'd love to hear your feedback regarding this issue. Did you solve it? 
I too get the onPurchaseStateChange callback only sometimes... for some 
reason, sometimes a user buys a product, I get the payment but the 
onPurchaseStateChange callback is never called.
Only the onRequestPurchaseResponse is always called.

Here's what I did: http://stackoverflow.com/a/12948238/444324

But did you get any feedback whether it's ok to count on 
the onRequestPurchaseResponse callback?

Thank you!

On Thursday, July 19, 2012 6:28:13 PM UTC+3, Tina wrote:

 Hi, all.
 I have implemented InAppBilling in my application and after publication I 
 have found that sometimes my application did not received 
 PURCHASE_STATE_CHANGED message and onPurchaseStateChange is never called.
 On the other hand it always received REQUEST_PURCHASE message with correct 
 information about purchace state (if user card is invalid)
 The question is: could I use REQUEST_PURCHASE message as final information 
 about purchace transaction and perform all operation in 
 onRequestPurchaseResponse callback?
 If it is incorrect please tell me - what is the best way to act in such 
 situation?

 Thank you in advance,
 Tina



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

2012-10-18 Thread Seshu
Hi all,
I implemented GCM i.e., Google Cloud Messaging in my
application. I got registration id and i sent to backend team.our
backend team sending msg's to device. but i am not able to receive
those messages. sday i received 2 messages out of 10. but 2day i
didn't receive single message also. If any body knows the reason then
plz tell 2 me... Please see my code attached here..

public class GCMIntentService extends GCMBaseIntentService{

public GCMIntentService(){
super(Utils.GCMSenderId);
}

@Override
protected void onError(Context context, String regId) {
Log.e(, error registration id : +regId);
}

@Override
protected void onMessage(Context context, Intent intent) {
String message = intent.getStringExtra(message);
Log.e(message  is, +message);
}

@Override
protected void onRegistered(Context context, String regId) {
handleRegistration(context, regId);
}

@Override
protected void onUnregistered(Context context, String regId) {

}
}

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

2012-10-18 Thread srikanth
Hi All, 

I am also one of the user facing the adb offline issue frequently.. But 
after googling a lot i come to know this link 
http://forum.xda-developers.com/showthread.php?t=974824 which have an adbd 
attached. I've tried it and worked like a charm. 

But i don't know what changes were made to the attached adbd inorder to fix 
the offline issue. So thought of asking you like experts. 

Share your info.. Thanks

-Srikanth.

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

2012-10-18 Thread Mark Murphy
I recommend the android-gcm Google Group for questions related to GCM.

On Thu, Oct 18, 2012 at 9:01 AM, Seshu s.seshu...@gmail.com wrote:
 Hi all,
 I implemented GCM i.e., Google Cloud Messaging in my
 application. I got registration id and i sent to backend team.our
 backend team sending msg's to device. but i am not able to receive
 those messages. sday i received 2 messages out of 10. but 2day i
 didn't receive single message also. If any body knows the reason then
 plz tell 2 me... Please see my code attached here..

 public class GCMIntentService extends GCMBaseIntentService{

 public GCMIntentService(){
 super(Utils.GCMSenderId);
 }

 @Override
 protected void onError(Context context, String regId) {
 Log.e(, error registration id : +regId);
 }

 @Override
 protected void onMessage(Context context, Intent intent) {
 String message = intent.getStringExtra(message);
 Log.e(message  is, +message);
 }

 @Override
 protected void onRegistered(Context context, String regId) {
 handleRegistration(context, regId);
 }

 @Override
 protected void onUnregistered(Context context, String regId) {

 }
 }

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

Android Training in NYC: http://marakana.com/training/android/

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


Re: [android-developers] Want to distribute a application and manage unistallation of it remotely

2012-10-18 Thread Mark Murphy
On Thu, Oct 18, 2012 at 8:55 AM, Gautam Bisht gautambi...@gmail.com wrote:
 I want to create a application for my employee which will be distributed
 from my server. I want a feature that once the employee leave the company i
 can remotely uninstall the application from his/her mobile.
 Is it possible in android??

Not really. You can *start* the uninstallation process via an
ACTION_UNINSTALL_PACKAGE Intent and startActivity(). However, the user
has to confirm the removal.

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

Android Training in NYC: http://marakana.com/training/android/

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


[android-developers] download images from server and populate it in listrview

2012-10-18 Thread vani reddy
Hi friends,

How to download images from server and store it in cache and next time i
can reload from cache and populate it in listview??

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

[android-developers] Re: download images from server and populate it in listrview

2012-10-18 Thread ravi .
Hope this may help u
http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview


  

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Want to distribute a application and manage unistallation of it remotely

2012-10-18 Thread Gautam Bisht
But how it is possible from google play. It do not ask for the user 
permission and uninstall the application you choose. 

On Thursday, October 18, 2012 6:38:31 PM UTC+5:30, Mark Murphy (a Commons 
Guy) wrote:

 On Thu, Oct 18, 2012 at 8:55 AM, Gautam Bisht 
 gauta...@gmail.comjavascript: 
 wrote: 
  I want to create a application for my employee which will be distributed 
  from my server. I want a feature that once the employee leave the 
 company i 
  can remotely uninstall the application from his/her mobile. 
  Is it possible in android?? 

 Not really. You can *start* the uninstallation process via an 
 ACTION_UNINSTALL_PACKAGE Intent and startActivity(). However, the user 
 has to confirm the removal. 

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

 Android Training in NYC: http://marakana.com/training/android/ 


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

[android-developers] Re: If hdpi and xhdpi drawables defined, which drawable is used as base for an mdpi device?

2012-10-18 Thread RichardC
I think none of the above but you should read:
http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch

and also this is very easy to test just use different coloured bitmaps in 
each qualified folder.

On Thursday, October 18, 2012 1:53:40 PM UTC+1, Mark Carter wrote:

 If I define a drawable in hdpi and xhdpi but not mdpi, will Android (on an 
 mdpi device) take the xhdpi drawable and scale it down by a factor of two 
 or will it use the nearest defined density (hdpi) drawable?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Getting the details of the current song playing in the media player in Android

2012-10-18 Thread gopi nidubrolu
hi,

 i tried what you suggested, But i did not get Song track information. i
send my java class files one is for User interface(Playsong.java) and
another is service class(Playbackservice.java) for Playing songs



On Wed, Oct 17, 2012 at 8:40 PM, Gopi gopi.nidubr...@arijasoft.com wrote:

 Getting the details of the current song playing in the media player in
 Androidhttp://stackoverflow.com/questions/11890860/getting-the-details-of-the-current-song-playing-in-the-media-player-in-android

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




-- 
Thanks  Regards

Gopi N

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

Playsong.java
Description: Binary data


Playbackservice.java
Description: Binary data


Re: [android-developers] Want to distribute a application and manage unistallation of it remotely

2012-10-18 Thread Mark Murphy
On Thu, Oct 18, 2012 at 9:25 AM, Gautam Bisht gautambi...@gmail.com wrote:
 But how it is possible from google play. It do not ask for the user
 permission and uninstall the application you choose.

Yes, it does. When you tap on Uninstall, it pops up a dialog: Do
you want to uninstall this app?.

Besides, Google Play is a privileged app, tied more closely into the
OS than ordinary SDK apps can be.

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

Android Training in NYC: http://marakana.com/training/android/

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


Re: [android-developers] Android fails converting p12 file's certificates to x509; converts properly using java

2012-10-18 Thread Ab
Thank you for your help, this fixed my problem.

On Wednesday, 17 October 2012 21:30:40 UTC-4, Nikolay Elenkov wrote:

 On Thu, Oct 18, 2012 at 3:03 AM, Ab abe.op...@gmail.com javascript: 
 wrote: 
 . 
  
  Is due to java.security implementation on Android, or is my code 
 incorrect? 
  
  java.security.cert.CertificateException: 
  org.apache.harmony.security.asn1.ASN1Exception: ASN.1 boolean: wrong 
 content 
  at [4]. DER allows only 0x00 or 0xFF values 
  

 Your code is mostly OK and works on Android 4.1. 

  https://www.dropbox.com/s/al1415o4kdycmqs/test.p12 
  

 I hope you are not going to use this anymore... 


  
  private X509Certificate[] convertCertificates(Certificate[] certsIn) 
  throws CertificateException 
  { 
  X509Certificate[] certsOut = new X509Certificate[certsIn.length]; 
  
  for (int iCnt = 0; iCnt  certsIn.length; iCnt++) 
  { 
  CertificateFactory cf = CertificateFactory.getInstance(X.509); 
  ByteArrayInputStream bais = new 
  ByteArrayInputStream(certsIn[iCnt].getEncoded()); 
  certsOut[iCnt] =  (X509Certificate) cf.generateCertificate(bais); 
  } 
  
  return certsOut; 
  } 
  

 What you get here is already an X509Certificate, so there is really no 
 need to parse it again, just cast it. If for some reason you really need 
 to, 
 try CertificateFactory.getInstance(X.509, BC). This will use the 
 BouncyCastle parser and might work even if the Harmony one is broken 
 on your device. 

 BTW, you are not 'converting' anything here, you are just accessing 
 the certificate(s) that are already in the PKCS#12 file. 


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

Re: [android-developers] Paying developer fee for a *different* company

2012-10-18 Thread mmilo
Was hoping for a more elegant solution, and no reply from Google for a few 
days now. WIll post back if I find a better solution.

On Wednesday, October 17, 2012 5:03:12 PM UTC-4, TreKing wrote:


 Tell them to pay for it, then send them 25 bucks.


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



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

[android-developers] WiFi hotspot and 2.3.6 (or newer)

2012-10-18 Thread falcon74
Froyo apparently had an option to create a portable hotspot under 
Wireless settings.
Is there anything equivalent available on 2.3.6 (or newer) versions of 
Android for non-rooted phones ?
Is this feature device specific (i.e. works on certain devices, but not on 
others) ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Want to distribute a application and manage unistallation of it remotely

2012-10-18 Thread b0b


On Thursday, 18 October 2012 14:55:25 UTC+2, Gautam Bisht wrote:

 Hi All,

 I want to create a application for my employee which will be distributed 
 from my server. I want a feature that once the employee leave the company i 
 can remotely uninstall the application from his/her mobile.
 Is it possible in android??

 Regards,
 Gautam



Not possible without being a system app with special permission. 
But nothing prevent you to add an online check in your app allowing or 
denying usage of the app. aka a kill switch. 

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

[android-developers] How to make Widgets not overlap

2012-10-18 Thread Perry168
Hi all,

   In activity, it has five TabWidgets. I customized my  own image. When 
running, I found that it will overlap between two TabWidgets. Can anyone 
tell me how to remove the overlap?

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

2012-10-18 Thread bob
 

Why not use one of those reloadable Visa cards you can get at the grocery 
store?


That should definitely work.



On Thursday, October 18, 2012 8:43:04 AM UTC-5, mmilo wrote:

 Was hoping for a more elegant solution, and no reply from Google for a few 
 days now. WIll post back if I find a better solution.

 On Wednesday, October 17, 2012 5:03:12 PM UTC-4, TreKing wrote:


 Tell them to pay for it, then send them 25 bucks.


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



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

[android-developers] How to keep in the highlight on girdview?

2012-10-18 Thread Perry168
Hi all,

 if I have a Drawable that used to highlight the currently selected item in 
GridView. How can I keep in highlight on the selected item? Even I scroll 
the GridView.

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

Re: [android-developers] Re: How to get a button id from an app(I don't have the source)

2012-10-18 Thread $rik@nth
Hmm.. if i want to automate any preinstalled google app like gmail, google
+ etc.. is there a way to automate the tests?

On Wed, Oct 17, 2012 at 11:54 PM, Kristopher Micinski 
krismicin...@gmail.com wrote:

 Ah, forgot this wasn't your app, yes usually I have apps signed iwth
 my key but not source to them (for a strange reason I'd rather not
 explain..)

 kris

 On Wed, Oct 17, 2012 at 11:00 AM, Diego Torres Milano
 dtmil...@gmail.com wrote:
  You mentioned you don't have the source, so we assume it's not your APK,
  then Instrumentation won't work because both packages must be signed by
 the
  same key otherwise you'll receive a SecurityException.
  I don't know what do you want the id for, but using AndroidViewClient
  [https://github.com/dtmilano/AndroidViewClient] you can easily get the
 dump
  of the View tree and get Ids an other properties.
 
 
  On Wednesday, 17 October 2012 06:48:47 UTC-4, srikanth wrote:
 
  Hi Kris,
  How you will do/get these things via instrumentation?
 
  On Wed, Oct 17, 2012 at 7:40 AM, Kristopher Micinski 
 krismi...@gmail.com
  wrote:
 
  Umm
 
  slight disagree
 
  I do this all the time in instrumentation.
 
  kris
 
  On Tue, Oct 16, 2012 at 8:14 AM, Dhruv Kumar dhru...@gmail.com
 wrote:
   Without Application you can't get the id . By the way you can get id
   e.g
   text = (TextView)findViewById(R.id.text); where id mention in xml
 file.
  
  
   On Tuesday, October 16, 2012 6:55:11 AM UTC-4, srikanth wrote:
  
   Hi,
  
   I want to get the element/button id in an app(I don't have the
 apk)..
   can
   any one please tell me on how to get the id?
  
   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-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
 
 
 
 
  --
  Thanks  Regards,
  M.Srikanth Kumar.
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, 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




-- 
Thanks  Regards,
M.Srikanth Kumar.

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

2012-10-18 Thread Giosia Gentile
Ok but
onRetainNonConfigurationInstance()
is deprecated! What I must use insted of it??

On Oct 18, 12:51 pm, Piren gpi...@gmail.com wrote:
 Orientation change will be harder to handle... see this for 
 help:http://developer.android.com/guide/topics/resources/runtime-changes.html







 On Thursday, October 18, 2012 12:40:49 PM UTC+2, Giosia Gentile wrote:

  Thank you I will try it this evening!!
  Please can you help me also with the screen orientation??? I used the
  setRetainIstance(true) but it donìt work!!

  On Thursday, October 18, 2012 10:08:08 AM UTC+2, Piren wrote:

 http://developer.android.com/reference/android/support/v4/view/ViewPa...)

  just set it to 2

  On Wednesday, October 17, 2012 7:30:54 PM UTC+2, Giosia Gentile wrote:

  it is one week I try to solve this problem whitout success. Please
  help me.

  I use the tabs navigation with viewpager. This is the class where I
  put the tabs and the FragmentPagerAdapter class:
  public class Detail extends SherlockFragmentActivity {

      ViewPager  mViewPager;

      TabsAdapter mTabsAdapter;

      @Override
      public void onCreate(Bundle savedInstanceState) {

          super.onCreate(savedInstanceState);

          setContentView(R.layout.activity_main);

       ...

       ActionBar bar = getSupportActionBar();
       bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
       bar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);

       mViewPager = (ViewPager)findViewById(R.id.pager);

       // Add the tabs
       mTabsAdapter = new TabsAdapter(this, bar, mViewPager);
       mTabsAdapter.addTab(bar.newTab().setText(R.string.filmtab),
               FragmentFilm.class, null);
       mTabsAdapter.addTab(bar.newTab().setText(R.string.cinematab),
               FragmentCinema.class, null);
       mTabsAdapter.addTab(bar.newTab().setText(R.string.dintornitab),
               FragmentPdi.class, null);

       if (savedInstanceState != null) {

  bar.setSelectedNavigationItem(savedInstanceState.getInt(tab));
       }

      }

       @Override
          protected void onSaveInstanceState(Bundle outState) {
              super.onSaveInstanceState(outState);
              outState.putInt(tab,
  getSupportActionBar().getSelectedNavigationIndex());
          }

       public static class TabsAdapter extends FragmentPagerAdapter
       implements ViewPager.OnPageChangeListener, ActionBar.TabListener
  {
           private final Context mContext;
           private final ActionBar mBar;
           private final ViewPager mViewPager;
           private final ArrayListTabInfo mTabs = new
  ArrayListTabInfo();

           static final class TabInfo {
               private final Class? clss;
               private final Bundle args;

               TabInfo(Class? _class, Bundle _args) {
                   clss = _class;
                   args = _args;
               }
           }

           public TabsAdapter(Detail activity, ActionBar bar, ViewPager
  pager) {
               super(activity.getSupportFragmentManager());
               mContext = activity;
               mBar = bar;
               mViewPager = pager;
               mViewPager.setAdapter(this);
               mViewPager.setOnPageChangeListener(this);
           }

           public void addTab(ActionBar.Tab tab, Class? extends
  Fragment clss, Bundle args) {
               TabInfo info = new TabInfo(clss, args);
               tab.setTag(info);
               tab.setTabListener(this);
               mTabs.add(info);
               mBar.addTab(tab);
               notifyDataSetChanged();
           }

           @Override
           public int getCount() {
               return mTabs.size();
           }

           @Override
           public Fragment getItem(int position) {
               TabInfo info = mTabs.get(position);
               return Fragment.instantiate(mContext,
  info.clss.getName(), info.args);
           }

           @Override
           public void onPageScrolled(int position, float
  positionOffset, int positionOffsetPixels) {
           }

           @Override
           public void onPageSelected(int position) {
               mBar.setSelectedNavigationItem(position);
           }

           @Override
           public void onPageScrollStateChanged(int state) {
           }

           @Override
           public void onTabSelected(Tab tab, FragmentTransaction ft) {
               Object tag = tab.getTag();
               for (int i=0; imTabs.size(); i++) {
                   if (mTabs.get(i) == tag) {
                       mViewPager.setCurrentItem(i);
                   }
               }
           }

           @Override
           public void onTabUnselected(Tab tab, FragmentTransaction ft)
  {

           }

           @Override
           public void onTabReselected(Tab tab, FragmentTransaction ft)
  {

           }
       }
  }

  The 3 fragment classes are all the same I copy here just one; In the
  fragment class I use async task for 

Re: [android-developers] Re: [Android-developers]:need help in creating bluetooth file transfer app. urgent

2012-10-18 Thread bob
Change this:

InputStream instream = socket.getInputStream();

to this:

*OutputStream outstream = socket.getOutputStream();*


Change this:

instream.read( buffer);

to this:

*outstream.write( buffer);*


On Thursday, October 11, 2012 12:26:43 AM UTC-5, akash roy wrote:

 i want send a file so what changes i have to make.?


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 get a button id from an app(I don't have the source)

2012-10-18 Thread Mark Murphy
On Thu, Oct 18, 2012 at 11:25 AM, $rik@nth srikanth0...@gmail.com wrote:
 Hmm.. if i want to automate any preinstalled google app like gmail, google +
 etc.. is there a way to automate the tests?

Get a job at Google.

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

Android Training in NYC: http://marakana.com/training/android/

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


[android-developers] Dear TalkBack developers

2012-10-18 Thread geourge
 

Dear TalkBack developers,

 

We are the TalkBack for Android phones Chinese users, and are very pleased 
to contact you by email. We hope you could hear the feedback and advices 
from Chinese TalkBack users, in order to improve TalkBack services. Android 
is a very excellent smartphone operating system, especially its openness 
provides more choices for mobile users. TalkBack build for Android is a 
well-designed accessibility, especially after Android 4.0, which adds a new 
feature Explore by Touch. This function helps our blind and vision-impaired 
users interact with our devices more easily, such as: Tablet, smartphone, 
etc. 

 

TalkBack helps our blind users to interact with our devices as normal 
people. Meanwhile, SoundBack and KickBack accessibility all facilitate 
blind users interact with their mobile. However, many mobile manufacturers 
less focus on blind customers in China. As the blind people living in 
China, we hope Google could suggest those manufactures do not delete 
Text-to-Speech function when they customize Android, and make sure this 
function can be used normally. In addition, we still have some problems 
when using TalkBack, especially the Input Methods of Talkback. There isn’t 
Chinese Input options can be founded by TalkBack Chinese user,even Google 
Input Method cannot type Chinese. I'm hoping so eagerly that Google could 
add Chinese Input options in TalkBack. 

 

As the users of Android platform, TalkBack, Explore by Touch, SoundBack and 
KickBack

are all necessary for Android to have non-visual accessibility, but the 
fact is that many Android market software could not be speak out correctly, 
because of using graphic icon. We hope TalkBack developers design a 
function to help our blind users customize label, save it, and share with 
other TalkBack users, in order to make our TalkBack experience smoothly. 
Additionally, we still have an enquiry want to verify it with TalkBack 
developers. The problem is when we use TalkBack to dial the extension 
number, the Arabic Numerals cannot be speak properly, and similarly, some 
buttons during we make the phone call also cannot be speak properly. We 
doubt that whether it is the bug of TalkBack or the bug of customized for 
the third party Android system. If it is the bug of TalkBack, we hope 
Google can solve it as soon as possible. Finally, we wish TalkBack 
developers make more efforts and provide more humanized products. 

 

One of our friends helps us translate this letter, if it’s possible, please 
reply us in Chinese. We are looking forward to hearing from you.

 

Yours Faithfully,

 Chinese Folk TalkBack Blind Users Group

Contact us:

Email:*xujun...@163.com* xujun...@163.com

 

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

[android-developers] WiFi Direct Group Creation with Multiple Devices

2012-10-18 Thread Zach
Hi,
I am doing some experiments with WiFi Direct. I was successful in creating 
a group and communication with each other(between 2 Devices) . I would like 
to know, say I have 10 devices and all starts to create a group, by calling 
createGroup functionality in WiFiP2Pmanager. Whether all devices will 
create independent groups, or just one group will be created among them?

Can someone explain this please?
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] WifiP2pManager.ConnectionInfoListener onConnectionInfoAvailable (WifiP2pInfo info)

2012-10-18 Thread Zach
thanks for the response. I will have a look on that. I am considering a 
situation in which say 10 devices are connected each other via a GO. And 
suddenly the GO drops. So hopefully I can identify that the device got 
disconnected from the  P2P_PEERS_CHANGED_ACTION broadcast status. Now I 
want to create a new group among the remaining 9 devices. I have posted a 
question in relation to this here 
https://groups.google.com/forum/?fromgroups=#!topic/android-developers/OxxrSCYg2Hk

Can you please have a look.

Thanks

On Tuesday, October 16, 2012 11:45:21 PM UTC+1, Irfan Sheriff wrote:

 Do you see the peer status (WifiP2pDevice has a status field) as connected 
 when you listen P2P_PEERS_CHANGED_ACTION broadcast and request the peers ?

 On Tue, Oct 16, 2012 at 5:11 AM, Zach zachar...@gmail.com 
 javascript:wrote:

 Hi 
 I am working on wifi direct. After sending a connect request I was 
 expecting a call back to the onConnectionInfoAvailable call back. But that 
 wont happen always for some reason. And at times it takes a while when i 
 finally receives a callback.

 What am i doing wrong here? Is this call back an acknowledgement for 
 a successful/failed connection? I know the connect method has a callback 
 and for me that always returns a success.

 How ca i do this properly? How to identify a successful connection is 
 established or not?
 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.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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] WiFi Direct Group Creation with Multiple Devices

2012-10-18 Thread Irfan Sheriff
Each device will end up creating its own group if you do that.

You have the option doing createGroup() on one device and then calling
connect() from the other devices which will lead to all of them joining
that group.

On Thu, Oct 18, 2012 at 9:02 AM, Zach zachariah...@gmail.com wrote:

 Hi,
 I am doing some experiments with WiFi Direct. I was successful in creating
 a group and communication with each other(between 2 Devices) . I would like
 to know, say I have 10 devices and all starts to create a group, by calling
 createGroup functionality in WiFiP2Pmanager. Whether all devices will
 create independent groups, or just one group will be created among them?

 Can someone explain this please?
 Thanks

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

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

2012-10-18 Thread bob
I would guess arrayWifiLinkRatios has something to do with power usage 
estimates at arrayWifiLinkSpeeds.


On Monday, August 27, 2012 11:40:03 PM UTC-5, thejaswi s wrote:

 Following methods are in dreamConstants file. From where they got these 
 constants? From which file they read it?

 public double wifiHighPower() {
 return 720;
   }

   public double wifiLowHighTransition() {
 return 15;
   }

   public double wifiHighLowTransition() {
 return 8;
   }

   private static final double[] arrayWifiLinkRatios = {
 47.122645, 46.354821, 43.667437, 43.283525, 40.980053, 39.44422, 
 38.676581,
 34.069637, 29.462693, 20.248805, 11.034917, 6.427122
   };
  
   private static final double[] arrayWifiLinkSpeeds = {
 1, 2, 5.5, 6, 9, 11, 12, 18, 24, 36, 48, 54
   };

 On Tue, Aug 28, 2012 at 12:59 AM, bob b...@coolfone.comze.comjavascript:
  wrote:


 Like this?



 /* Uids as listed in android_filesystem_config.h */
   public static final int AID_ALL =   -1; /* A special constant 
 we will
* use to indicate a 
 request
* for global 
 information. */
   public static final int AID_ROOT=0; /* traditional unix 
 root user
*/
   public static final int AID_SYSTEM  = 1000; /* system server */
   public static final int AID_RADIO   = 1001; /* telephony subsystem, 
 RIL */
   public static final int AID_BLUETOOTH   = 1002; /* bluetooth subsystem 
 */
   public static final int AID_GRAPHICS= 1003; /* graphics devices */
   public static final int AID_INPUT   = 1004; /* input devices */
   public static final int AID_AUDIO   = 1005; /* audio devices */
   public static final int AID_CAMERA  = 1006; /* camera devices */
   public static final int AID_LOG = 1007; /* log devices */
   public static final int AID_COMPASS = 1008; /* compass device */
   public static final int AID_MOUNT   = 1009; /* mountd socket */
   public static final int AID_WIFI= 1010; /* wifi subsystem */
   public static final int AID_ADB = 1011; /* android debug bridge
  (adbd) */
   public static final int AID_INSTALL = 1012; /* group for installing
  packages */
   public static final int AID_MEDIA   = 1013; /* mediaserver process 
 */
   public static final int AID_DHCP= 1014; /* dhcp client */
   public static final int AID_SHELL   = 2000; /* adb and debug shell 
 user */
   public static final int AID_CACHE   = 2001; /* cache access */
   public static final int AID_DIAG= 2002; /* access to diagnostic
  resources */
   /* The 3000 series are intended for use as supplemental group id's only.
* They indicate special Android capabilities that the kernel is aware 
 of. */
   public static final int AID_NET_BT_ADMIN= 3001; /* bluetooth: create any
  socket */
   public static final int AID_NET_BT  = 3002; /* bluetooth: create 
 sco,
  rfcomm or l2cap 
 sockets */
   public static final int AID_INET= 3003; /* can create AF_INET 
 and
  AF_INET6 sockets */
   public static final int AID_NET_RAW = 3004; /* can create raw INET 
 sockets
*/
   public static final int AID_MISC= 9998; /* access to misc 
 storage */
   public static final int AID_NOBODY  = ;
   public static final int AID_APP =1; /* first app user */


 It's probably *AIDL*.

 http://developer.android.com/guide/components/aidl.html


 On Monday, August 27, 2012 7:59:03 AM UTC-5, thejaswi s wrote:

 I was just going through powertutor source code and found 
 many constants related to WiFi, CPU and LCD components. I can understand 
 the flow but not getting about these constants.I am curious to know about 
 this. Where these constants are derived from ? what are the standard 
 values? etc.. Please point me to the link where I can get these 
 information. Please do reply.



  -- 
 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.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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

Re: [android-developers] Re: Save the fragment state in tabs switch

2012-10-18 Thread Justin Anderson
Ummm... if you look at the documentation for the deprecated method it tells
you what to do...

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


On Thu, Oct 18, 2012 at 9:27 AM, Giosia Gentile gfu...@gmail.com wrote:

 Ok but
 onRetainNonConfigurationInstance()
 is deprecated! What I must use insted of it??

 On Oct 18, 12:51 pm, Piren gpi...@gmail.com wrote:
  Orientation change will be harder to handle... see this for help:
 http://developer.android.com/guide/topics/resources/runtime-changes.html
 
 
 
 
 
 
 
  On Thursday, October 18, 2012 12:40:49 PM UTC+2, Giosia Gentile wrote:
 
   Thank you I will try it this evening!!
   Please can you help me also with the screen orientation??? I used the
   setRetainIstance(true) but it donìt work!!
 
   On Thursday, October 18, 2012 10:08:08 AM UTC+2, Piren wrote:
 
  
 http://developer.android.com/reference/android/support/v4/view/ViewPa...)
 
   just set it to 2
 
   On Wednesday, October 17, 2012 7:30:54 PM UTC+2, Giosia Gentile wrote:
 
   it is one week I try to solve this problem whitout success. Please
   help me.
 
   I use the tabs navigation with viewpager. This is the class where I
   put the tabs and the FragmentPagerAdapter class:
   public class Detail extends SherlockFragmentActivity {
 
   ViewPager  mViewPager;
 
   TabsAdapter mTabsAdapter;
 
   @Override
   public void onCreate(Bundle savedInstanceState) {
 
   super.onCreate(savedInstanceState);
 
   setContentView(R.layout.activity_main);
 
...
 
ActionBar bar = getSupportActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
bar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
 
mViewPager = (ViewPager)findViewById(R.id.pager);
 
// Add the tabs
mTabsAdapter = new TabsAdapter(this, bar, mViewPager);
mTabsAdapter.addTab(bar.newTab().setText(R.string.filmtab),
FragmentFilm.class, null);
mTabsAdapter.addTab(bar.newTab().setText(R.string.cinematab),
FragmentCinema.class, null);
mTabsAdapter.addTab(bar.newTab().setText(R.string.dintornitab),
FragmentPdi.class, null);
 
if (savedInstanceState != null) {
 
   bar.setSelectedNavigationItem(savedInstanceState.getInt(tab));
}
 
   }
 
@Override
   protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   outState.putInt(tab,
   getSupportActionBar().getSelectedNavigationIndex());
   }
 
public static class TabsAdapter extends FragmentPagerAdapter
implements ViewPager.OnPageChangeListener, ActionBar.TabListener
   {
private final Context mContext;
private final ActionBar mBar;
private final ViewPager mViewPager;
private final ArrayListTabInfo mTabs = new
   ArrayListTabInfo();
 
static final class TabInfo {
private final Class? clss;
private final Bundle args;
 
TabInfo(Class? _class, Bundle _args) {
clss = _class;
args = _args;
}
}
 
public TabsAdapter(Detail activity, ActionBar bar, ViewPager
   pager) {
super(activity.getSupportFragmentManager());
mContext = activity;
mBar = bar;
mViewPager = pager;
mViewPager.setAdapter(this);
mViewPager.setOnPageChangeListener(this);
}
 
public void addTab(ActionBar.Tab tab, Class? extends
   Fragment clss, Bundle args) {
TabInfo info = new TabInfo(clss, args);
tab.setTag(info);
tab.setTabListener(this);
mTabs.add(info);
mBar.addTab(tab);
notifyDataSetChanged();
}
 
@Override
public int getCount() {
return mTabs.size();
}
 
@Override
public Fragment getItem(int position) {
TabInfo info = mTabs.get(position);
return Fragment.instantiate(mContext,
   info.clss.getName(), info.args);
}
 
@Override
public void onPageScrolled(int position, float
   positionOffset, int positionOffsetPixels) {
}
 
@Override
public void onPageSelected(int position) {
mBar.setSelectedNavigationItem(position);
}
 
@Override
public void onPageScrollStateChanged(int state) {
}
 
@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
Object tag = tab.getTag();
for (int i=0; imTabs.size(); i++) {
if (mTabs.get(i) == tag) {

Re: [android-developers] Paying developer fee for a *different* company

2012-10-18 Thread Lew
mmilo wrote:

 Was hoping for a more elegant solution, and no reply from Google for a few 
 days now. WIll post back if I find a better solution.


Okay, send them the money first. 


 TreKing wrote:


 Tell them to pay for it, then send them 25 bucks.


What's inelegant about that, pray tell?

-- 
Lew
 

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

Re: [android-developers] How to make Widgets not overlap

2012-10-18 Thread Justin Anderson
With the amount of information you've given us no.

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


On Thu, Oct 18, 2012 at 7:46 AM, Perry168 perry...@gmail.com wrote:

 Hi all,

In activity, it has five TabWidgets. I customized my  own image. When
 running, I found that it will overlap between two TabWidgets. Can anyone
 tell me how to remove the overlap?

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

2012-10-18 Thread Justin Anderson
1) This feature is probably a combination of device  carrier specific.
2) This question has nothing to do with this list...

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


On Thu, Oct 18, 2012 at 7:45 AM, falcon74 banibrata.du...@gmail.com wrote:

 Froyo apparently had an option to create a portable hotspot under
 Wireless settings.
 Is there anything equivalent available on 2.3.6 (or newer) versions of
 Android for non-rooted phones ?
 Is this feature device specific (i.e. works on certain devices, but not on
 others) ?

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

2012-10-18 Thread Vinicius Jose Grein
Dear all,we developed and application that uses a database with 100 MB, our
application does not write any information on it.

We are having trouble to use this database, I read an article that
describes that the best option is copy that db file from asset (internal
folder in application) to data,
this behavior is not working for us, even when we are deploying the app, we
need to root the handset and copy the file do data by force.


Could you please suggest any behavior that I can follow to work with large
databases?

Best Regards

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

2012-10-18 Thread RichardC
Why is it not working for you?  What errors are you getting?

On Thursday, October 18, 2012 9:13:25 PM UTC+1, Vinicius wrote:

 Dear all,we developed and application that uses a database with 100 MB, 
 our application does not write any information on it.

 We are having trouble to use this database, I read an article that 
 describes that the best option is copy that db file from asset (internal 
 folder in application) to data,
 this behavior is not working for us, even when we are deploying the app, 
 we need to root the handset and copy the file do data by force.


 Could you please suggest any behavior that I can follow to work with large 
 databases?

 Best Regards


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

2012-10-18 Thread Nobu Games
For older Android versions there is an asset file size limit of about 1MB 
per asset file I believe. You should try splitting the database file into 
100 separate files and let your app on first start join these chunks into a 
merged file on the external storage.

On Thursday, October 18, 2012 3:13:25 PM UTC-5, Vinicius wrote:

 Dear all,we developed and application that uses a database with 100 MB, 
 our application does not write any information on it.

 We are having trouble to use this database, I read an article that 
 describes that the best option is copy that db file from asset (internal 
 folder in application) to data,
 this behavior is not working for us, even when we are deploying the app, 
 we need to root the handset and copy the file do data by force.


 Could you please suggest any behavior that I can follow to work with large 
 databases?

 Best Regards


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

2012-10-18 Thread bahmani iman
Hi
I use the program to create an electronic book.
  Someone help me?
I emphasize the use of programming
For example, I use the html language and its application in the Android 
could make a simple book, but I want to make a career book.
I want to be more like a professional, not like a book, a simple application

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

2012-10-18 Thread Mark Murphy
On Thu, Oct 18, 2012 at 4:39 PM, Nobu Games dev.nobu.ga...@gmail.com wrote:
 For older Android versions there is an asset file size limit of about 1MB
 per asset file I believe.

Only for file extensions not known to be already compressed.

That's why SQLiteAssetHelper has you package the database in ZIP form:

https://github.com/jgilfelt/android-sqlite-asset-helper

The OP's bigger problem is that the Play Store only supports 50MB APK
files, last I checked, before you have to start getting into all the
expansion file stuff.

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

Android Training in NYC: http://marakana.com/training/android/

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


[android-developers] Jelly Bean: White background color is rendered as semi-transparent gray

2012-10-18 Thread Nobu Games
I've got a problem with Jelly Bean (Nexus 7 tablet) that is driving me 
nuts. I cannot get a solid white background color on any view. I have the 
following layout setup:

   - RelativeLayout (root) with android:background=@android:color/white
  - android.support.v4.view.ViewPager with 
  android:background=@android:color/white (redundancy out of 
  desperation)
 - RelativeLayout with 
android:background=@android:color/white(redundancy out of desperation)
 - Contains a *graphical about screen* arrangement with a 
transparent gap in the middle. The gap appears grey instead of white
- WebView
 - com.viewpagerindicator.UnderlinePageIndicator
   
No matter what I tried: turning off hardware acceleration, removing the 
WebView, 
specifying # as background color everywhere: it does not work. 
The white background color is always rendered as some semi-transparent gray.

I even verified that weird behavior by adding a solid white background 
color to one of the sub-views of the about screen. That sub-view is 
floating in a grayish semi-transparent box on top of its colorful 
background. What is going on here? What am I missing? The very same code 
works just fine on older Android versions.

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

2012-10-18 Thread ColorTheorist
There is a custom device that I am working with that has been approved to 
communicate with Apple mobile devices.  It will be my responsibility on my 
end to also communicate with that device over bluetooth with Android 
applications.  In pre-limenary testing, the devices around me here will 
pair with the device, but will not connect with the device.  I haven't done 
bluetooth development before, so I will have to research a bit into the 
complications involved in pairing and connecting with a device from within 
an Android library in the next few days.

But I was curious if anyone had knowledge of whether or not the chip 
modifications that were needed in the Apple device were going to cause 
issues in connecting with my Android devices.  If anyone has that knowledge 
available to them, I would be glad to hear feedback on it.  Just cause it 
hasn't connected thus far, doesn't mean that I wouldn't be able to connect 
with it from the code still, so that test will be for tomorrow.  

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Jelly Bean: White background color is rendered as semi-transparent gray

2012-10-18 Thread Mark Murphy
On Thu, Oct 18, 2012 at 4:51 PM, Nobu Games dev.nobu.ga...@gmail.com wrote:
 No matter what I tried: turning off hardware acceleration, removing the
 WebView, specifying # as background color everywhere: it does not
 work. The white background color is always rendered as some semi-transparent
 gray.

Try #FFFE or something like that. I seem to recall a bug from a
while back that had similar symptoms. Having something *just* off from
pure white worked, but pure white gave odd results.

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

Android Training in NYC: http://marakana.com/training/android/

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


Re: [android-developers] Jelly Bean: White background color is rendered as semi-transparent gray

2012-10-18 Thread Nobu Games
Oh my... you saved my day and sanity, Mark! It works

On Thursday, October 18, 2012 4:00:39 PM UTC-5, Mark Murphy (a Commons Guy) 
wrote:

 On Thu, Oct 18, 2012 at 4:51 PM, Nobu Games 
 dev.nob...@gmail.comjavascript: 
 wrote: 
  No matter what I tried: turning off hardware acceleration, removing the 
  WebView, specifying # as background color everywhere: it does 
 not 
  work. The white background color is always rendered as some 
 semi-transparent 
  gray. 

 Try #FFFE or something like that. I seem to recall a bug from a 
 while back that had similar symptoms. Having something *just* off from 
 pure white worked, but pure white gave odd results. 

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

 Android Training in NYC: http://marakana.com/training/android/ 


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

[android-developers] IllegalArgumentException from the MediaStore

2012-10-18 Thread Gaurav
Hi,
 Accessing the media store gives me an IllegalArgumentException. This is a 
one off case that has been reported by Google crash reports. I do not have 
any further information such as device, api level etc. I looked the Media 
Store API and it is undocumented. Nothing, not even bad documentation is 
present. The checking seems to happen in native code, so really grepping 
through a few different source files for few different versions did not 
help either. At this point I would really appreciate any pointers regarding 
some magical reason for this to happen. 


Caused by: java.lang.IllegalArgumentException
 at 
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:144)
 at 
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
 at 
android.content.ContentProviderProxy.bulkQueryInternal(ContentProviderNative.java:330)
 at 
android.content.ContentProviderProxy.query(ContentProviderNative.java:366)
 at android.content.ContentResolver.query(ContentResolver.java:271)
 at android.provider.MediaStore$Images$Media.query(MediaStore.java:521)

Thanks
Gaurav

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

2012-10-18 Thread bahmani iman
Dear Friend
  You can individually program data to give users

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

2012-10-18 Thread Ubuntu guy
Managed to override setLayoutParams in my custom layout and i was able
to override the parameters specified in the layout xml.

On Oct 17, 1:15 pm, Ubuntu guy sam_...@yahoo.co.in wrote:
 Hello,

    I'm developing a custom layout with a fixed width and i don't want
 the users of this custom layout to specify their own width. I was
 looking at an option to specify the width via setLayoutParams() in the
 constructor of the custom layout but without layout_width, i get a
 runtime exception indicating that layout_width is mandatory, even for
 a custom layout. (You must supply a layout_width attribute).

    Is there any way to achieve 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] How to make Widgets not overlap

2012-10-18 Thread Perry168
What's information you need know more? Please suggest. I think who have the 
exp. Who will know what I say.


MagouyaWare於 2012年10月19日星期五UTC+8上午3時57分33秒寫道:

 With the amount of information you've given us no.

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


 On Thu, Oct 18, 2012 at 7:46 AM, Perry168 perr...@gmail.com javascript:
  wrote:

 Hi all,

In activity, it has five TabWidgets. I customized my  own image. When 
 running, I found that it will overlap between two TabWidgets. Can anyone 
 tell me how to remove the overlap?

 -- 
 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.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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: Large Database File

2012-10-18 Thread Vinicius Jose Grein
Great Mark, I will try and let you know the result

On Thu, Oct 18, 2012 at 5:47 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Thu, Oct 18, 2012 at 4:39 PM, Nobu Games dev.nobu.ga...@gmail.com
 wrote:
  For older Android versions there is an asset file size limit of about 1MB
  per asset file I believe.

 Only for file extensions not known to be already compressed.

 That's why SQLiteAssetHelper has you package the database in ZIP form:

 https://github.com/jgilfelt/android-sqlite-asset-helper

 The OP's bigger problem is that the Play Store only supports 50MB APK
 files, last I checked, before you have to start getting into all the
 expansion file stuff.

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

 Android Training in NYC: http://marakana.com/training/android/

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


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

2012-10-18 Thread ilikeB2
When I try to pass CTS test cases, there are always some cases (10or 20 in 
17000) which show fail in the first time test. But when I derive them in a 
new plan and run it again in the same device, it will pass. The question is 
that will generate two  results, so is there any way to merge them together 
and present to google CTS group?

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] Need to create composer in Email...

2012-10-18 Thread Amit Sinha
Dear Asheesh,

Thanks for the sample code.

I have some specific requirement,  like in my Email composer in want add
feature like Bold, underline and italic for text typed.

Also font change(color and size) for the text in composer screen.

Do let me know in case you have any idea about that.

Thanks
Amit sinha

On Thu, Oct 18, 2012 at 11:11 AM, Asheesh Arya asheesharya...@gmail.comwrote:

 code to create and send email programmatically in android
 import java.io.File;
 import android.app.Activity;
 import android.content.Intent;
 import android.net.Uri;
 import android.os.Bundle;
 import android.os.Environment;
 import android.util.Log;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.TextView;
 import android.widget.Toast;
 public class sendemail extends Activity {

 Button send;

 EditText address, subject, emailtext;

 /** Called when the activity is first created. */

 @Override

 public void onCreate(Bundle savedInstanceState) {

 super.onCreate(savedInstanceState);

 setContentView(R.layout.main11);

 send = (Button) findViewById(R.id.emailsendbutton);

 address = (EditText) findViewById(R.id.emailaddress);

 subject = (EditText) findViewById(R.id.emailsubject);

 emailtext = (EditText) findViewById(R.id.emailtext);

 final TextView tv = (TextView)findViewById(R.id.fileContent);

 send.setOnClickListener(new OnClickListener() {

// TextView tv = (TextView)findViewById(R.id.fileContent);
 public void onClick(View v) {

 // TODO Auto-generated method stub

 if(!address.getText().toString().trim().equalsIgnoreCase()){
 //Toast.makeText(getApplicationContext(), Please enter an
 email address.., Toast.LENGTH_LONG).show();

   File dir = Environment.getExternalStorageDirectory();
File file = new
 File(dir,download/phonedata.txt);
  if (file.exists())

 try {
   Log.i(getClass().getSimpleName(), send  task - start);
 final Intent emailIntent = new Intent(
 android.content.Intent.ACTION_SEND);
 emailIntent.setType(plain/text);
 //emailIntent.setType(application/octet-stream);


 emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,new String[] {
 address.getText().toString() });

 emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
 subject.getText());

 emailIntent.putExtra(Intent.EXTRA_STREAM,
 Uri.parse(file:// + file));
 Toast.makeText(sendemail.this, File successfully attached
 in your Mail!!!,
 Toast.LENGTH_LONG).show();
 tv.setText(File Successfully attached in your mail!!!);
 emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,
 emailtext.getText());

 sendemail.this.startActivity(Intent
 .createChooser(emailIntent, Send mail...));


 } catch (Throwable t) {

 Toast.makeText(sendemail.this, Request failed:  +
 t.toString(),
 Toast.LENGTH_LONG).show();
 }
 else
 {
 tv.setText(Sorry file doesn't exist!!!);
 Toast.makeText(sendemail.this, File not found in
 sd-cardPlease upload it from Server!!!,
   Toast.LENGTH_LONG).show();
 //Toast.makeText(getApplicationContext(), Please
 enter an email address.., Toast.LENGTH_LONG).show();
 }
 }
 else
 {
Toast.makeText(getApplicationContext(), Please enter
 an email address.., Toast.LENGTH_LONG).show();}
  }
 });
 }
 }

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Composer screen with Bold, underline and italic text, font changes

2012-10-18 Thread Amit Sinha


Hi,

can any body tell me how to create composer screen with some specific 
requirement, like in my composer screen I want to add feature like Bold, 
underline and italic for text typed.

Also font change(color and size) for the text in composer screen in 
android. I want to save composer in HTML format.

please give me sample code if any body have?

thx.

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

2012-10-18 Thread Mychandus Msb
Dual SIM settings is Vendor dependent. As per my knowledge so far there is
no generic android APIs released. If you have the device source you can
analyse. But generally, there should some API to get the SIM ID, SIM0 ro
SIM1

On Sun, Aug 12, 2012 at 9:03 AM, raja shekar 
raja.androiddevelo...@gmail.com wrote:

 i want to change the Network Mode for Both SIM in Phone. How can i handle
 this ? is there any API is Available for this featutes?


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




-- 
CHANDRA_MBS

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