[android-developers] Image captured from my app is rotated by default

2014-03-25 Thread Jags
Hi All,

I tried to capture an image and send it to server in my app. I did that 
using camera intent. the problem is in my samsung galaxy s4 device the 
image is rotated -90 degree by default. I read around web that it is a 
problem with the samsung devices. But what is the best solution to it ? if 
i rotate the image after capture, it becomes heavy image processing in my 
app. What is the best approach to resolve this ? 

in phonegap there is something like correctOrientation = true / false 
what's its counterpart in native code ?

thanks and regards
jags

-- 
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/d/optout.


[android-developers] Re: how to enforce access to a Service with multiple permissions

2014-03-25 Thread smoogli
I tried again in several ways:
permission android:name=android.permission.INTERNET/permission within 
the manifest: did not block binding to the service
elsewhere within the service tag: did not build.

Although looks strange, so an Android service can require from a 3rd party 
entity only a single permission?

any replies welcomed

cheers!


On Sunday, March 9, 2014 4:37:55 PM UTC+2, smoogli wrote:

 I created a Service which requires 3rd party entity to declare it uses a 
 permission. 
 service android:name=myservice android:exported=true  
 android:permission=android.permission.INTERNET 
 that works.

 however, I cannot find how to require from the 3rd party entity, to 
 declare it uses multiple permissions.
 1. cannot add permission within the service tag. getting error:
  Parser exception for myservice\AndroidManifest.xml: Attribute 
 permission bound to namespace 
 http://schemas.android.com/apk/res/android; was already specified for 
 element service.
  Error in an XML file: aborting build.
 2. 
 http://developer.android.com/reference/android/R.styleable.html#AndroidManifestServicetalks
  about a single permission per service tag
 3. adding permission android:name=android.permission.INTERNET / in the 
 manifest scope seems not to apply on enforcing permission when binding to 
 the service by the 3rd party entity

 any idea?

 thanks!
 --roy

 (still have the choice of using the 
 checkCallingPermission(String)http://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingPermission%28java.lang.String%29method
  within my service. but would prefer to use the declarative option if 
 possible)




-- 
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/d/optout.


[android-developers] Re: Image captured from my app is rotated by default

2014-03-25 Thread Doug Gordon
This may not be related to your problem, but I believe that there are 
basically two ways that the orientation of a JPEG photo is determined. One 
is simply by the way the actual data in the file is laid out; for example, 
whether it is stored as 1024x768 or 768x1024. The other determinate is an 
(optional) datum in the file's metadata that specifies camera 
orientation and indicates the degrees of rotation. So even if a photo's 
data is stored as 1024x768, if the orientation data is +90, then it is to 
be displayed rotated to the right in 768x1024 format.

The problem that I've found is that not all devices or image 
processing/display software seems to use the metadata and, making things 
worse, may not propagate the data when saving a modified image. So I've had 
photos from my phone that I've had to rotate in image software to make them 
look right on my PC, but then I'll do something like upload them to 
Facebook and they're rotated the wrong way!

I might be wrong about this, but it's what I've concluded after playing 
around with various devices and image processing programs.

On Tuesday, March 25, 2014 2:07:37 AM UTC-4, Jags wrote:

 Hi All,

 I tried to capture an image and send it to server in my app. I did that 
 using camera intent. the problem is in my samsung galaxy s4 device the 
 image is rotated -90 degree by default. I read around web that it is a 
 problem with the samsung devices. But what is the best solution to it ? if 
 i rotate the image after capture, it becomes heavy image processing in my 
 app. What is the best approach to resolve this ? 

 in phonegap there is something like correctOrientation = true / false 
 what's its counterpart in native code ?

 thanks and regards
 jags


-- 
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/d/optout.


[android-developers] Re: Image captured from my app is rotated by default

2014-03-25 Thread Nobu Games
This is expected behavior, and Doug's assumption is right. JPEG images may 
contain EXIF http://en.wikipedia.org/wiki/Exchangeable_image_file_formatdata 
blocks that also specify the orientation of the image. On your server 
you need to read the orientation data and use it to rotate the image into 
the opposite direction. If your server code is written in PHP you can use 
the Imagick library and the following functions for determining the 
orientation and rotating the image 
respectively:Imagick::getImageOrientation()http://www.php.net/manual/en/imagick.getimageorientation.php,
 
Imagick::rotateImage()http://www.php.net/manual/en/imagick.rotateimage.php
.
If the server software is written in Java you could use a library such as 
Metadata-Extractor http://code.google.com/p/metadata-extractor/ for 
reading the orientation and any image processing library of your choice for 
rotating the image.


On Tuesday, March 25, 2014 1:07:37 AM UTC-5, Jags wrote:

 Hi All,

 I tried to capture an image and send it to server in my app. I did that 
 using camera intent. the problem is in my samsung galaxy s4 device the 
 image is rotated -90 degree by default. I read around web that it is a 
 problem with the samsung devices. But what is the best solution to it ? if 
 i rotate the image after capture, it becomes heavy image processing in my 
 app. What is the best approach to resolve this ? 

 in phonegap there is something like correctOrientation = true / false 
 what's its counterpart in native code ?

 thanks and regards
 jags


-- 
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/d/optout.


[android-developers] Re: Google Play Services adds nearly 10,000 methods!

2014-03-25 Thread Jeff Campbell
The latest version and the Google Play Services (4.3) now adds about 2,500 
more methods (since 4.2)!!  (Adding Google Play Services to your project 
will add about 14,000 methods to your app) seems to be getting worse 
and worse!

On Friday, February 7, 2014 2:14:50 PM UTC-7, Jeff Campbell wrote:

 We have an app that depends on a lot of libraries, and recently we wanted 
 to integrate Google Maps into our application.  We learned that we would 
 have to add the following dependency to our app:

 compile 'com.google.android.gms:play-services:4.1.32'

 Before adding this dependeny, our app had about a 40k method count.  After 
 adding this dependency our method count jumped to about 50k (about 10k 
 methods added to our apk!).  And, it seems that with every new version of 
 this dependency it grows more and more (we noticed about a 2k growth in the 
 last update).

 I know that this dependency contains a LOT of different types of services 
 which include things we don't even use (which all contribute to the 10k 
 method count).  I know that I can use Proguard to strip out un-needed 
 methods, but in a development environment this just slows down build time, 
 and can make debugging issues difficult.

 Could the Google Play Services be divided into seperate aar projects? 
  Example:

 play-services-core (required by all... assuming that there is some shared 
 code)
 play-services-maps
 play-services-games
 play-services-ads
 play-services-plus
 play-services-wallet
 etc

 Doing this would reduce the risk of apps hitting the 65k method limit cap 
 (seems crazy that a Google library takes 15% of the 65k limit of any single 
 app)

 Thanks,
 Jeff




-- 
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/d/optout.


[android-developers] how to create map api key for google map v1

2014-03-25 Thread Abhilash Baddam
Hi,
I have developed an app long time back using google map api v1, there i
have used mapview. Now i want to make some changes in that but i couldnt be
able to create map api key for that app now. How can i create the map api
key for that.
I know that map api v1 is deprecated but to use map api v2 in my app , i
have to make so many changes in my app which i do not want.
Cant i create the map api key for google map v1 Can anyone suggest 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
--- 
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/d/optout.


Re: [android-developers] how to create map api key for google map v1

2014-03-25 Thread TreKing
On Tue, Mar 25, 2014 at 1:03 PM, Abhilash Baddam 
abhilash.androiddevelo...@gmail.com wrote:

 I have developed an app long time back using google map api v1, there i
 have used mapview. Now i want to make some changes in that but i couldnt be
 able to create map api key for that app now.


What happened to your existing key?


 How can i create the map api key for that.


You can't.


 I know that map api v1 is deprecated but to use map api v2 in my app , i
 have to make so many changes in my app which i do not want.


Yup, it sucks.


 Cant i create the map api key for google map v1


No, you cannot


 Can anyone suggest me???


I suggest you find your old V1 key, remove the map from your app, or
embrace V2!!!

Good luck.

-
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/d/optout.


Re: [android-developers] how to create map api key for google map v1

2014-03-25 Thread Abhilash Baddam
Hi Treking,

Thanks for the reply.

My existing key is not working. While developing the app, I used different
machine now in the same code i am making changes in some other machine,
after making the changes if i run the app then the map is not getting
loaded need to change the map api key it seems.
Do we need to create the api key every time if we make changes in different
machines?
How can i use the existing key now?


On Wed, Mar 26, 2014 at 5:09 AM, TreKing treking...@gmail.com wrote:


 On Tue, Mar 25, 2014 at 1:03 PM, Abhilash Baddam 
 abhilash.androiddevelo...@gmail.com wrote:

 I have developed an app long time back using google map api v1, there i
 have used mapview. Now i want to make some changes in that but i couldnt be
 able to create map api key for that app now.


 What happened to your existing key?


 How can i create the map api key for that.


 You can't.


  I know that map api v1 is deprecated but to use map api v2 in my app , i
 have to make so many changes in my app which i do not want.


 Yup, it sucks.


 Cant i create the map api key for google map v1


 No, you cannot


 Can anyone suggest me???


 I suggest you find your old V1 key, remove the map from your app, or
 embrace V2!!!

 Good luck.


 -
 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/d/optout.


-- 
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/d/optout.