lselwd | 19 Apr 18:50 2014

reading (with voice by pressing a button) of help-section-page text conflicts with incoming ring & talk... well?

I did a Java/Android app (game). problem
reading (with voice by pressing a button) of help-section-page text conflicts with incoming ring & talk... well?

--
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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Josphat Muchiri | 19 Apr 16:11 2014
Picon

how to move non-movable apps to SD card

hello guys, i have a problem moving non-movable apps in my android phone to SD card, pliz any help

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dilip Kumar Chaudhary | 19 Apr 13:03 2014
Picon

WebView Unable to display

I'm trying to load twitter widget.but Unable to follow throwing following error
"Refused to display 'https://twitter.com/SanjeevKapoor?original_referer=http%3A%2F%2Fzenga001.s3.amazonaws.com%2Fsanjeev_xml%2Ftwitter%2FSanjeevKapoor.html&profile_id=56363343&tw_p=embeddedtimeline&tw_w=456719461332967424' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.", source: about:blank (0)

please suggest me what's wrong with this.

--
Thanks & 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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rahul Kaushik | 19 Apr 12:44 2014
Picon

intercept post data in web view

how can I intercept the POST data from the form, change it's values, then send it along in webview?

If the user enters name = Steve and email = steve <at> steve.com in the form, I want to change the values to name = bob and email = bob <at> bob.com in the android app and have the new POST be sent to http://www.example.com/do.php.

<form action="http://www.example.com/do.php" method="post"> <input type="text" name="name" /> <input type="text" name="email" /> <input type="submit" /> </form>

--
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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sunil.K | 18 Apr 14:46 2014
Picon

Alarm Intent not triggered

Hello,

I am developing an app related to alarm service and facing an issue of Intent not being called.
I have registered for event in manifest file:

  <receiver android:name="com.example.myfirstapp.EventTriggerManager" >
        </receiver>

And have implemented EventTriggerManager class extended from BroadcastReceiver:

public class EventTriggerManager extends BroadcastReceiver 
{
  <at> Override
  public void onReceive(Context context, Intent intent) 
  {
 System.out.println("Alarm raised");
 Toast.makeText(context, "Don't panik You have an alarm!!!!.", Toast.LENGTH_LONG).show();
}
}

Adding an alarm from the Activity class:
            Intent intent = new Intent(this, EventTriggerManager.class);
   PendingIntent pendingIntent = PendingIntent.getBroadcast(this.getApplicationContext(), 12345678, intent, 0);
   AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
   alarmManager.set(AlarmManager.RTC_WAKEUP, totalTime, pendingIntent);

But alarm is not getting triggered when totalTime is reached in the system.

Note: totalTime is absolute time used.

Pls point my mistake why the expected output is not seen.

Regards,
   Sunil

--
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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rahul Kaushik | 18 Apr 07:57 2014
Picon

read post parameters

Hi,

I have an html file in my assets folder ,which "POST" the form and have 100 parameters,i can load that html in my webview control when  click the submit button which post the html , it redirect to the new html, which is also in assets  folder but before redirecting to new html, i want to read the parameter in my first html file.

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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
yccheok | 17 Apr 16:59 2014
Picon

Do we need to consume HttpURLConnection's error stream when IOException thrown

According to technical guide from Oracle Java, we should consume HttpURLConnection's error stream when IOException thrown

http://docs.oracle.com/javase/6/docs/technotes/guides/net/http-keepalive.html

What can you do to help with Keep-Alive? Do not abandon a connection by ignoring the response body. Doing so may results in idle TCP connections. That needs to be garbage collected when they are no longer referenced.

If getInputStream() successfully returns, read the entire response body.

When calling getInputStream() from HttpURLConnection, if an IOException occurs, catch the exception and call getErrorStream() to get the response body (if there is any).

Reading the response body cleans up the connection even if you are not interested in the response content itself. But if the response body is long and you are not interested in the rest of it after seeing the beginning, you can close the InputStream. But you need to be aware that more data could be on its way. Thus the connection may not be cleared for reuse.

Here's a code example that complies to the above recommendation:

Here's the code example

try { URL a = new URL(args[0]); URLConnection urlc = a.openConnection(); is = conn.getInputStream(); int ret = 0; while ((ret = is.read(buf)) > 0) { processBuf(buf); } // close the inputstream is.close(); } catch (IOException e) { try { respCode = ((HttpURLConnection)conn).getResponseCode(); es = ((HttpURLConnection)conn).getErrorStream(); int ret = 0; // read the response body while ((ret = es.read(buf)) > 0) { processBuf(buf); } // close the errorstream es.close(); } catch(IOException ex) { // deal with the exception } }

Does this applicable to Android platform? As I don't see such technique in most of the Android code example.

--
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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
yccheok | 17 Apr 16:58 2014
Picon

Google provides 2 different examples of HttpURLConnection usage - Should we call HttpURLConnection's disconnect?

Google is providing 2 different examples of HttpURLConnection usage.

Not calling HttpURLConnection's disconnect

http://developer.android.com/training/basics/network-ops/connecting.html

// Given a URL, establishes an HttpUrlConnection and retrieves // the web page content as a InputStream, which it returns as // a string. private String downloadUrl(String myurl) throws IOException { InputStream is = null; // Only display the first 500 characters of the retrieved // web page content. int len = 500; try { URL url = new URL(myurl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setReadTimeout(10000 /* milliseconds */); conn.setConnectTimeout(15000 /* milliseconds */); conn.setRequestMethod("GET"); conn.setDoInput(true); // Starts the query conn.connect(); int response = conn.getResponseCode(); Log.d(DEBUG_TAG, "The response is: " + response); is = conn.getInputStream(); // Convert the InputStream into a string String contentAsString = readIt(is, len); return contentAsString; // Makes sure that the InputStream is closed after the app is // finished using it. } finally { if (is != null) { is.close(); } } }

Calling HttpURLConnection's disconnect

http://developer.android.com/reference/java/net/HttpURLConnection.html

URL url = new URL("http://www.android.com/"); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); try { InputStream in = new BufferedInputStream(urlConnection.getInputStream()); readStream(in); finally { urlConnection.disconnect(); } }

This rather confuses us as developer. Should we, call HttpURLConnection's disconnect or not?

--
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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
KK | 17 Apr 15:12 2014
Picon

Android Pinch zoom not working over imageview inside gesture overlayview

I am doing the following in my application.

1) Display a image in a activity.

2) Recognize gesture over that image.

3) And also doing pinch and zoom over the same image.

The layout I have created is given below.

    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

    <ImageView
        android:id=" <at> +id/showImg"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:scaleType="matrix"
        android:src=" <at> drawable/image" >
    </ImageView>

    </FrameLayout>

And I am using the following code for the "pinch zoom" and "gesture overlayview" (detect the gesture).

    public class Touch extends Activity implements OnTouchListener {
    private static final String TAG = "Touch";

// These matrices will be used to move and zoom image
Matrix matrix = new Matrix();
Matrix savedMatrix = new Matrix();

// We can be in one of these 3 states
static final int NONE = 0;
static final int DRAG = 1;
static final int ZOOM = 2;
int mode = NONE;

// Remember some things for zooming
PointF start = new PointF();
PointF mid = new PointF();
float oldDist = 1f;

<at> Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GestureOverlayView gestureOverlayView = new GestureOverlayView(this);
View inflate = getLayoutInflater().inflate(R.layout.main, null);
gestureOverlayView.addView(inflate);

ImageView img = (ImageView) inflate.findViewById(R.id.showImg);
img.setScaleType(ImageView.ScaleType.FIT_CENTER);
img.setOnTouchListener(this);

setContentView(gestureOverlayView);
}

public boolean onTouch(View v, MotionEvent event) {
ImageView view = (ImageView) v;
view.setScaleType(ImageView.ScaleType.MATRIX);
float scale;

// Dump touch event to log
dumpEvent(event);

// Handle touch events here...
switch (event.getAction() & MotionEvent.ACTION_MASK) {

case MotionEvent.ACTION_DOWN: // first finger down only
Log.d(TAG, "mode=DRAG");
mode = DRAG;
break;
case MotionEvent.ACTION_UP: // first finger lifted
case MotionEvent.ACTION_POINTER_UP: // second finger lifted
mode = NONE;
Log.d(TAG, "mode=NONE");
break;
case MotionEvent.ACTION_POINTER_DOWN: // second finger down
oldDist = spacing(event);
Log.d(TAG, "oldDist=" + oldDist);
if (oldDist > 5f) {
savedMatrix.set(matrix);
midPoint(mid, event);
mode = ZOOM;
Log.d(TAG, "mode=ZOOM");
}
break;

case MotionEvent.ACTION_MOVE:
if (mode == DRAG) { // movement of first finger
} else if (mode == ZOOM) { // pinch zooming
float newDist = spacing(event);
Log.d(TAG, "newDist=" + newDist);
if (newDist > 5f) {
matrix.set(savedMatrix);
scale = newDist / oldDist; // thinking i need to play around
// with this value to limit it
matrix.postScale(scale, scale, mid.x, mid.y);
}
}
break;
}

// Perform the transformation
view.setImageMatrix(matrix);

return true; // indicate event was handled
}

private float spacing(MotionEvent event) {
float x = event.getX(0) - event.getX(1);
float y = event.getY(0) - event.getY(1);
return FloatMath.sqrt(x * x + y * y);
}

private void midPoint(PointF point, MotionEvent event) {
float x = event.getX(0) + event.getX(1);
float y = event.getY(0) + event.getY(1);
point.set(x / 2, y / 2);
}

/** Show an event in the LogCat view, for debugging */
private void dumpEvent(MotionEvent event) {
String names[] = { "DOWN", "UP", "MOVE", "CANCEL", "OUTSIDE",
"POINTER_DOWN", "POINTER_UP", "7?", "8?", "9?" };
StringBuilder sb = new StringBuilder();
int action = event.getAction();
int actionCode = action & MotionEvent.ACTION_MASK;
sb.append("event ACTION_").append(names[actionCode]);
if (actionCode == MotionEvent.ACTION_POINTER_DOWN
|| actionCode == MotionEvent.ACTION_POINTER_UP) {
sb.append("(pid ").append(
action >> MotionEvent.ACTION_POINTER_ID_SHIFT);
sb.append(")");
}
sb.append("[");
for (int i = 0; i < event.getPointerCount(); i++) {
sb.append("#").append(i);
sb.append("(pid ").append(event.getPointerId(i));
sb.append(")=").append((int) event.getX(i));
sb.append(",").append((int) event.getY(i));
if (i + 1 < event.getPointerCount())
sb.append(";");
}
sb.append("]");
Log.d(TAG, sb.toString());
}
}

The issue is mentioned below.

The zoom is not working perfectly. sometimes, I do a pinch or zoom, it is not working. 

**NOTE: But when I remove the "GestureOverlayView", the pinch and zoom working perfectly over that imageview. But I need "GestureOverlayView" to detect gesture.**

Is this a android issue or the coding issue? How can I fix 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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Balint | 17 Apr 12:15 2014
Picon

How does Play Store alteregos like AppAware display apps?

Hi,
 
We have a very special idea about a new Play Store alterego. We would display Android apps in a dedicated app just like AppAware, 1Mobile Market, AppSales, Appsfire, but in a special way. However, we don't know if we can display the apps without the developers' permission.
 
Do these apps scrape Play Store for data and display the apps without the permission of the developers or do they ask developers if they can use their apps? Considering these apps provide users with thousands of apps, I don't think they mail all developers.
 
What do you think? Can this be done? Is there a risk that a developer sues these apps for using his app without his exact permission? These apps have 500,000-1,000,000 downloads which mean they are very popular. I personally wouldn't regret seeing my app in one of these "play stores".
 
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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jonathan Fajardo Roa | 16 Apr 23:50 2014
Picon

SubView

Hola mi nombre es Jonathan,

Como puedo ver un activity dentro de otro? en la misma pantalla.

Gracias.



Hello my name is Jonathan, 

As I can see a activity inside another? on the same screen. 

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 <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gmane