[android-developers] Detecting hardware button on Android mobile

2013-08-30 Thread Ash
Hi All,

I have a mobile phone from Runbo (
http://www.runboruggedphones.com/shop/buy-runbo-x5-ip67-rugged-waterproof-smartphone.html
).

It has a 3 additional buttons which I have not seen on normal Android 
phones. These are PTT, SOS and ET. 

I was able to detect the SOS and ET button using the following functions:
public void onKeyUp(...)
and
public void onKeyDown(...)

The keycode values for SOS and ET were very high in the range. ET was set 
to 300 and SOS was 301. But that does not matter as long as I can detect 
them.

However I am not able to detect the PTT button press.

Has anyone got any ideas on how to detect when the PTT button is pressed?

Any advice or help will be much appreciated.

Thanks
Ash

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


[android-developers] When will ADT give support to test app for new Nexus 7(2013)

2013-08-30 Thread ankit the OPIUM
My customers are complaining that my app is not working properly in New 
Nexus 7(2013). I want to test it in that but device is not available for 
sale in India. So when I tried to create emulator for the given 
configuration it is not booting at all. I have tried on Windows XP and 7 
both with latest SDK 20.0.5
I have created new device with following configuration.
1200*1920
xhdpi (also tried with hdpi and xxhdpi also)

Am I missing something?

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


Re: [android-developers] Detecting hardware button on Android mobile

2013-08-30 Thread Jadranko Bodiroga
something like this maybe:  if (event.getKeyCode() == KeyEvent.KEYCODE_POWER
) {}



On Fri, Aug 30, 2013 at 1:06 PM, Ash anan...@gmail.com wrote:

 Hi All,

 I have a mobile phone from Runbo (
 http://www.runboruggedphones.com/shop/buy-runbo-x5-ip67-rugged-waterproof-smartphone.html
 ).

 It has a 3 additional buttons which I have not seen on normal Android
 phones. These are PTT, SOS and ET.

 I was able to detect the SOS and ET button using the following functions:
 public void onKeyUp(...)
 and
 public void onKeyDown(...)

 The keycode values for SOS and ET were very high in the range. ET was set
 to 300 and SOS was 301. But that does not matter as long as I can detect
 them.

 However I am not able to detect the PTT button press.

 Has anyone got any ideas on how to detect when the PTT button is pressed?

 Any advice or help will be much appreciated.

 Thanks
 Ash

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


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


Re: [android-developers] Detecting hardware button on Android mobile

2013-08-30 Thread Jadranko Bodiroga
add permission : uses-permission android:name=
android.permission.PREVENT_POWER_KEY /


On Fri, Aug 30, 2013 at 3:00 PM, Jadranko Bodiroga 
jadrankobodiroga1...@gmail.com wrote:

 something like this maybe:  if (event.getKeyCode() == KeyEvent.
 KEYCODE_POWER) {}



 On Fri, Aug 30, 2013 at 1:06 PM, Ash anan...@gmail.com wrote:

 Hi All,

 I have a mobile phone from Runbo (
 http://www.runboruggedphones.com/shop/buy-runbo-x5-ip67-rugged-waterproof-smartphone.html
 ).

 It has a 3 additional buttons which I have not seen on normal Android
 phones. These are PTT, SOS and ET.

 I was able to detect the SOS and ET button using the following functions:
 public void onKeyUp(...)
 and
 public void onKeyDown(...)

 The keycode values for SOS and ET were very high in the range. ET was set
 to 300 and SOS was 301. But that does not matter as long as I can detect
 them.

 However I am not able to detect the PTT button press.

 Has anyone got any ideas on how to detect when the PTT button is pressed?

 Any advice or help will be much appreciated.

 Thanks
 Ash

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




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


Re: [android-developers] Video in portrait mode

2013-08-30 Thread Jadranko Bodiroga
maybe try add something like this : super.setRequestedOrientation(
ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) ...then you force it to show in
portal/Landscape...


On Fri, Aug 30, 2013 at 4:58 AM, Sadhna Upadhyay
sadhna.braah...@gmail.comwrote:

 Hi guys,
 i am recording video and playing it but the problem is that it is
 not playing in portrait mode tough it is recording in portrait but when i
 play video it play in landscape only please help me if any one have any
 idea about it.





 Thanks
 sadhna

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


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


[android-developers] Re: Clickable URLs in EditText when using ArrowKeyMovementMethod

2013-08-30 Thread Emanuel Moecklin
See my answer here with a complete example:
http://stackoverflow.com/a/18541955/534471

On Thursday, March 24, 2011 5:11:48 AM UTC-4, asher wrote:

 Hi Abhilash,
 Can you give an example of the code you wrote in order to do that?

 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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Detecting hardware button on Android mobile

2013-08-30 Thread Ash
The code you have given is to detect the Power button. I want to detect the 
PTT (push-to-talk) button.

On Friday, 30 August 2013 23:01:01 UTC+10, baturanija1 wrote:

 add permission : uses-permission android:name=
 android.permission.PREVENT_POWER_KEY /


 On Fri, Aug 30, 2013 at 3:00 PM, Jadranko Bodiroga 
 jadrankobo...@gmail.com javascript: wrote:

 something like this maybe:  if (event.getKeyCode() == KeyEvent.
 KEYCODE_POWER) {}



 On Fri, Aug 30, 2013 at 1:06 PM, Ash ana...@gmail.com javascript:wrote:

 Hi All,

 I have a mobile phone from Runbo (
 http://www.runboruggedphones.com/shop/buy-runbo-x5-ip67-rugged-waterproof-smartphone.html
 ).

 It has a 3 additional buttons which I have not seen on normal Android 
 phones. These are PTT, SOS and ET. 

 I was able to detect the SOS and ET button using the following functions:
 public void onKeyUp(...)
 and
 public void onKeyDown(...)

 The keycode values for SOS and ET were very high in the range. ET was 
 set to 300 and SOS was 301. But that does not matter as long as I can 
 detect them.

 However I am not able to detect the PTT button press.

 Has anyone got any ideas on how to detect when the PTT button is pressed?

 Any advice or help will be much appreciated.

 Thanks
 Ash

  -- 
 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 unsubscribe from this group and stop receiving emails from it, send 
 an email to android-developers+unsubscr...@googlegroups.comjavascript:
 .
 For more options, visit https://groups.google.com/groups/opt_out.





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


[android-developers] Adding Fragments to a LinearLayout programmatically

2013-08-30 Thread Ralph Bergmann | the4thFloor.eu
I am trying to add nested child Fragments into a parent Fragment.

All works fine but

At first my code:

public class FragmentDatasheetWithHeader extends Fragment {


   private long   mRowId;
   private String mSid;


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

  final ScrollView scrollView = new ScrollView(getActivity());
  final LinearLayout linearLayout = new LinearLayout(getActivity());
  linearLayout.setId(4711);
  linearLayout.setOrientation(LinearLayout.VERTICAL);

  scrollView.addView(linearLayout);

  createUI();

  return scrollView;
   }

   private void createUI() {

  final FragmentProductDetailHeader fragmentHeader =
FragmentProductDetailHeader.newInstance(this.mRowId,
FragmentProductDetailHeader.HEADERTYPE_SMALL);
  final FragmentDatasheet fragmentDatasheet =
FragmentDatasheet.newInstance(this.mRowId, this.mSid);

  final FragmentManager fragmentManager = getChildFragmentManager();
  fragmentManager.beginTransaction().add(4711, fragmentHeader,
fragmentHeader).commit();
  fragmentManager.beginTransaction().add(4711, fragmentDatasheet,
fragmentDatasheet).commit();
   }
}

Now my problem:

In the Developer options I activated Don't keep activities (Destroy
every activity as soon the user leaves it)

When the activity with the FragmentDatasheetWithHeader is open and the
app goes into background and comes back to foreground the nested
Fragments are doubled. But it only appears if the container for the
nested Fragments is a LinearLayout. If the container is a FrameLayout
the nested Fragments are not doubled.

What's going wrong?


Ralph

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


Re: [android-developers] Adding Fragments to a LinearLayout programmatically

2013-08-30 Thread TreKing
On Fri, Aug 30, 2013 at 6:44 PM, Ralph Bergmann | the4thFloor.eu 
ra...@the4thfloor.eu wrote:

 When the activity with the FragmentDatasheetWithHeader is open and the
 app goes into background and comes back to foreground the nested
 Fragments are doubled. But it only appears if the container for the
 nested Fragments is a LinearLayout. If the container is a FrameLayout
 the nested Fragments are not doubled.

 What's going wrong?


1 - Debug your app and gather more information.
2 - Use the logging utility at your disposal to spew out information about
what your app is doing.
3 - Use the info from (1) and (2) above to determine whether your app is,
in fact, is going through the creation of this fragment twice.

The frame layout may have two items in it, you just may not be able to tell
that there are two since they would overlap. In a LinearLayout, it would be
obvious.

-
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Adding Fragments to a LinearLayout programmatically

2013-08-30 Thread Ralph Bergmann | the4thFloor.eu
Am 31.08.13 02:02, schrieb TreKing:
 1 - Debug your app and gather more information.

I debugged it. The createUI() method is called once.



Ralph

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