Doug Gordon | 18 Apr 12:58 2015
Picon

SQLite case insensitive matching

Similar questions have been asked, but many are old and it's not clear 
to me exactly what the resolution is. I have a list filter with a local 
db query that is matching columns against user input (uses MATCH, but 
that is probably not significant). Both the contents of the columns and 
the user input can be mixed case, but the match should be 
case-insensitive. This has been working (for years!) for most 
situations, but it was recently pointed out to me by a user (in France) 
that if he inputs a lowercase accented character, e.g. é, it will not 
match a database entry containing the uppercase equivalent, e.g. É.

My understanding is that Android SQLite does not support this 
automatically as it does for ASCII characters, but is there a solution 
within Android? I have no control over what is in the database (it comes 
from an outside source) or what the user inputs.

Doug Gordon
GHCS Software

--

-- 
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.
(Continue reading)

abhi | 18 Apr 08:18 2015
Picon

Receive Callback from Service

Is there any mechanism to receive a callback from service through AIDL without any client intervention.Already i have implemented a two way communication through AIDL, but still i couldnt figure out how to sent a callback without a client call.Any insights into this will be very helpfull.

--
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.
NewToAndroid | 17 Apr 15:50 2015
Picon

Which activity method is good for a continuous loop?

Hi all,

I have a very simple app, which has 1 screen with few buttons. It will start a service which will pay music
using mediaplayer.
Now, sometimes if I go in no internet coverage area or move between 3g and wifi, the player stops and service
completes (does its onDestroy).

I am thinking of writting a simple loop, which will check if the service is running after every 10 secnds (or
something like that) and if the service is down, it will start it.
Question is, where should I write this loop in the activity code ? which method is better suited to have this
loop which is continuously running ? onStart? 
Any other better ideas ? (I am sure there will be)

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 <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 | 17 Apr 15:00 2015
Picon

Signing App

Hello Team

What is the difference between 

android export signed application package or  export android application 

which is a better way to sign an app

Please Suggest

TX
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.
booooooooooooo | 14 Apr 10:18 2015
Picon

How to avoid reverse engineering of an APK file?

HI All

please any body help to  restrict  extracting apk .


Regards
Vinod

--
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.
Xavier Gouchet | 14 Apr 08:42 2015
Picon

WearableCalendarContract query doesn't return recurring events

I'm creating a watchface for Android Wear which will display calendar events. Based on this page (and the WatchFace sample provided in the SDK), I managed to query the next events for the day, and display them on my watchface (below is the code I use to query the events).

The problem is that recurring events are not returned in the cursor, and thus are not displayed on the watch face. Is there any parameter to add in the query to get recurring events ?

--
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.
NewToAndroid | 14 Apr 00:53 2015
Picon

Service dies when no internet connectivity

Hi all,

I have developed an app which steams music live in a service. The service is started with an intent from the
activity. It works fine. Basically, I am using media player object, which plays music in the service
(which I started with intent).
But when I was driving thru some remote hilly area, where there is no internet connectivity, the service
stopped playing music. When I checked later, the service has stopped. What is the concept behind this ?

What can be the best/established way of handling this situation ?

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 <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.
Sebouh | 12 Apr 14:17 2015
Picon

Invoking CellLocation.requestLocationUpdate() results in java.lang.NullPointerException in Lollipop 5.1

Here's the stack trace. Any thoughts?

java.lang.RuntimeException: Unable to start service com.sebouh00.smartwifitoggler.WifiMonitorService <at> 17d40de1 with Intent { act=com.sebouh00.smartwifitoggler.startup cmp=com.sebouh00.smartwifitoggler/.WifiMonitorService }: java.lang.NullPointerException: Attempt to invoke interface method 'void com.android.internal.telephony.Phone.updateServiceLocation()' on a null object reference
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2911)
at android.app.ActivityThread.access$2100(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1401)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void com.android.internal.telephony.Phone.updateServiceLocation()' on a null object reference
at android.os.Parcel.readException(Parcel.java:1552)
at android.os.Parcel.readException(Parcel.java:1499)
at com.android.internal.telephony.ITelephony$Stub$Proxy.updateServiceLocation(ITelephony.java:1900)
at android.telephony.CellLocation.requestLocationUpdate(CellLocation.java:42)
at com.sebouh00.smartwifitoggler.WifiMonitorService.onStartCommand(SourceFile:2698)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2894)
... 9 more

--
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.
Dan Cha | 12 Apr 07:00 2015
Picon

Image is being oriented differently once uploaded to server, why?

So within my app, i have the ability to allow the user to take a pic, see a thumbnail within the app and once the form is submitted, its uploaded to the server.

But something ive noticed lately is that (since im storing the image taken in the users gallery within a folder specific to the app) if you view the pic outside the app in the actually folder, it looks oriented correctly, if i take it portrait its portrait, if i take the pic landscape, its stored in landscape.

Also when the user is presented the thumbnail, it also shows correct, but for some reason when the image is uploaded to the server, it no longer has the correct orientation.

Im using ftp to upload the image with this code:

            try
            {
                int reply;
                String reply2;
                ftpClient.connect("ftp.site.com");
                ftpClient.login("site","pass");
                ftpClient.changeWorkingDirectory("/imgs/");
                ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
                BufferedInputStream buffIn = null;
                buffIn = new BufferedInputStream(new FileInputStream(file));
                ftpClient.enterLocalPassiveMode();
                ftpClient.storeFile(destinFolder,buffIn);
                buffIn.close();
                reply = ftpClient.getReplyCode();
                if(!FTPReply.isPositiveCompletion(reply))
                {
                    ftpClient.disconnect();
                }
                ftpClient.logout();
            }

I even changed my logic to this and still nothing, the image is always uploaded in landscape. Even though the thumbnail and stored image on the phone is portrait.
Found at this link: http://stackoverflow.com/questions/24629584/image-orientation-changes-while-uploading-image-to-server


int rotate = 0; try { getContentResolver().notifyChange(imageUri, null); File imageFile = new File(al_image_paths.get(i)); ExifInterface exif = new ExifInterface( imageFile.getAbsolutePath()); int orientation = exif.getAttributeInt( ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_270: rotate = 270; break; case ExifInterface.ORIENTATION_ROTATE_180: rotate = 180; break; case ExifInterface.ORIENTATION_ROTATE_90: rotate = 90; break; } Log.v(Common.TAG, "Exif orientation: " + orientation); Bitmap rotattedBitmap= BitmapFactory.decodeFile(al_image_paths.get(i)); Matrix matrix = new Matrix(); matrix.postRotate(rotate); return Bitmap.createBitmap(rotattedBitmap, 0, 0, rotattedBitmap.getWidth(), rotattedBitmap.getHeight(), matrix, true); } catch (Exception e) { e.printStackTrace(); }

--
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.
Dan Cha | 10 Apr 23:27 2015
Picon

Where in code would i resize an image taken using intent?

So ive been reading a few posts some using Bitmap.createScaledBitmap, some using .compress feature and each one i try, never throws an exception or error, but file never gets resized.

I found this routine, but it doesnt do anything as far as the image taken. So basically within my app i allow the user to take a pic to attach to the submission.
When you take the image, it displays a thumbnail on the screen, at this point the image is already saved to the phones gallery.
I need to resize it (without changing the proportions) to make sure that the image is no larger than 200px wide or high because once you submit the form, im uploading the image to our server.

public Bitmap getResizedBitmap(Bitmap bm, int newWidth, int newHeight) { int width = bm.getWidth(); int height = bm.getHeight(); float scaleWidth = ((float) newWidth) / width; float scaleHeight = ((float) newHeight) / height; // CREATE A MATRIX FOR THE MANIPULATION Matrix matrix = new Matrix(); // RESIZE THE BIT MAP matrix.postScale(scaleWidth, scaleHeight); // "RECREATE" THE NEW BITMAP Bitmap resizedBitmap = Bitmap.createBitmap(bm, 0, 0, width, height, matrix, false); return resizedBitmap; }
When the user clicks the image button on the screen, the camera opens and allows them to take the pic, ive tried to call the above routine within this event after everything so that i know the file is created and exists.
Here is the event for that: private ImageButton.OnClickListener takePicture_Button_listener = new ImageButton.OnClickListener() { public void onClick(View v) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectDiskWrites() .detectNetwork() .penaltyLog() .build()); // create Intent to take a picture and return control to the calling application Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //User fileUri for full path to image taken. fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); // create a file to save the image fname = fileUri.toString().substring(fileUri.toString().lastIndexOf("/")+1); intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name // start the image capture Intent startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE); } };

Ive tried to use it here after the previewCapturedImage routine is called and ive even tried the currently commented out code seen below and neither modify the file.
protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE && resultCode == RESULT_OK) { previewCapturedImage(); //Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath()); //getResizedBitmap(bitmap,200,200); } else if (resultCode == RESULT_CANCELED) { // User cancelled the image capture Toast.makeText(this, "Image Capture Cancelled:\n" + data.getData(), Toast.LENGTH_LONG).show(); } else { // Image capture failed, advise user Toast.makeText(this, "Image Capture Failed:\n" + data.getData(), Toast.LENGTH_LONG).show(); } }

Where can i properly resize the image, either during or after its taken so that the actual image stored on the device is within my size requirements and file size, currently since its not resizing its creating a 4mb file which takes forever to upload and has some huge dimensions(5213x2988) I just need to make sure that the full size image is no larger than 200px width or height, it obvisously needs to keep its proportions, but the max cant be any larger than 200px

--
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.
Digipom | 10 Apr 15:01 2015
Picon

Swiping away an app kills foreground services in Lollipop 5.1

On KitKat versions before 4.4.3, there was a bug where swiping away an app from the recent tasks list would kill the app even if a foreground service was running. Worse, the user would not know that the app was stopped, as ongoing notifications would not be removed and the system app would continue to show the services as running.

This bug was fixed in 4.4.3, but now it seems a variant of it has returned in 5.1: when swiping an app away from the recent apps list, it will get killed, even if a foreground service is running. This doesn't seem to affect all apps, as with the previous bug which also didn't affect all apps. The notification does get removed this time around.

Has anyone else noticed this? My previous workaround was to safely shut down the foreground services in onTaskRemoved and I might just have to bring that back.

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