[android-developers] Re: video recording issue

2009-11-19 Thread Greivin Lopez
I think you don't have to open and set parameters for the camera when
recording video, at least it never work for me, try to remove this
code:
"camera = Camera.open();
Camera.Parameters parameters = camera.getParameters();
parameters.setPreviewSize(352, 288);
parameters.set("orientation", "portrait");
camera.setParameters(parameters);"

Also you need to be sure that you are setting the correct permissions
in the Manifest file, I suggest you these ones:





I see no other problems but as a matter of fact I was not able to use
the media recorder in a portrait layout... it just stay landscape. I
don't know if it was just me or what.

I hope you could fix your problem.

-- 
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: Samsung Behold II Info

2009-12-04 Thread Greivin Lopez
By reading this thread I suspect it currently running Android 1.5.

http://forums.t-mobile.com/t5/Samsung-Behold-2/1-6-or-2-0-Upgrade-in-the-Works/m-p/263944

But I'm not sure.

-- 
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: Video with MediaRecorder

2009-08-12 Thread Greivin Lopez


 Hi Jason.
 What do you mean with "my own MediaRecorder code"?


On Jul 17, 11:50 am, Jason Proctor 
wrote:
> if you're using the camera on the emulator, then you have to disable
> auto orientation changes to get it to work. at least, i picked this
> info off the network and it worked for me.
>
> i'm doing manual capture with my own MediaRecorder code, and remote
> capture with the vide capture intent, successfully on emulator and
> real phone (in this case, ADP and Ion).
>
>
>
> >does it mean there is a bug in this intent
> >android.provider.MediaStore.ACTION_VIDEO_CAPTURE
>
> >is anybody have luck?
>
> >On Mon, Jul 13, 2009 at 9:11 PM, hanged_man
> ><majd...@gmail.com> wrote:
>
> >Muhammad, i tried the issue locally and it seems to be something wrong
> >with the camcorder itself (in the emulator), my previously suggested
> >workaround
> >(http://groups.google.com/group/android-developers/
>
> >browse_thread/thread/60005bb7fff2e14f/eec39e24877d8b42?
>
> >hl=en&lnk=gst&q=black+screen+camera+hanged_man#eec39e24877d8b42) works
> >only with the Camera app, i've tested it by not running it via the
> >intents but by running it directly from the home screen, however
> >trying to run the camcorder app results in a black screen and no idea
> >why.
> >And another stupid thing, try running the camcorder first (ofcourse
> >you will get a black screen) then try running the camera and
> >surprisingly you will get another black screen, i remember that i've
> >read somewhere that the camera-related apps hold a lock on certain
> >resource related to the camera which explains why this is happening.
> >Now this is stupid, i was counting on the fact that the camcorder is
> >working and trying to implement my own is going to be painfully
> >annoying :(
>
> --
> jason.software.particle

--~--~-~--~~~---~--~~
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: get version from apk

2009-08-17 Thread Greivin Lopez

Hi, you could use PackageInfo class to retrieve some information from
Manifest.xml.

Try to use this code:
/**
 * Gets the software version retrieved from the Manifest.
 */
private String getSoftwareVersion() {
try {
PackageInfo packageInfo = getPackageManager
().getPackageInfo(getPackageName(), 0);
return packageInfo.versionName;
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Package name not found", e);
};
}

On Aug 16, 4:30 am, engin  wrote:
> Hi, can I get version from .apk file. I tried to open
> androidmanifest.xml but I realized that xml files are destructed when
> apk created.

--~--~-~--~~~---~--~~
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: Video with MediaRecorder

2009-08-17 Thread Greivin Lopez

Hi Jason, perhaps you could help me with my code. I was trying to
capture video for two weeks now without success :(

This is my complete code


public class VideoCapture extends Activity
implements SurfaceHolder.Callback {

private static final String TAG = "JTrek Video Capture";
private SurfaceView surfaceView;
private SurfaceHolder surfaceHolder;
private MediaRecorder recorder;
private String videoFile = "videotest.3gp";

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

surfaceView = (SurfaceView)findViewById(R.id.surface);

surfaceHolder = surfaceView.getHolder();
surfaceHolder.addCallback(this);
surfaceHolder.setType
(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

setRequestedOrientation
(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

prepareVideoCapture();
}

public void prepareVideoCapture() {
/* Create a MediaRecorder */
recorder = new MediaRecorder();
Log.i(TAG, "Media recorder created");

try {
OutputStream stream = openFileOutput(videoFile,
MODE_WORLD_WRITEABLE);
stream.write(0xA);
stream.close();
} catch(IOException ioException) {
Log.e(TAG, "VIDEO: An error creating the output file.");
}

File file = getFileStreamPath(videoFile);
Log.i(TAG, "File exists? : " + file.exists());

recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);

recorder.setOutputFile(this.videoFile);
Log.i(TAG, "Media recorder parameters set");

recorder.setPreviewDisplay(surfaceHolder.getSurface());
Log.i(TAG, "Preview Display set to surface holder!");
}

  //

//  SURFACE CALLBACK IMPLEMENTATION
//

public void surfaceCreated(SurfaceHolder holder) {
Log.e(TAG, "surfaceCreated");

try {
recorder.prepare();
} catch (IllegalStateException e) {
Log.e(TAG, e.toString());
} catch (IOException e) {
Log.e(TAG, "THE ERROR IS HERE!: " + e.toString());
}

Log.i(TAG, "Media recorder prepared for video capture!");

try {
recorder.start();
} catch (IllegalStateException e) {
Log.e(TAG, e.toString());
}
Log.i(TAG, "Video capture started!!");
}

public void surfaceChanged(SurfaceHolder holder, int format, int
w, int h) {
Log.e(TAG, "surfaceChanged");
}

public void surfaceDestroyed(SurfaceHolder holder) {
Log.e(TAG, "surfaceDestroyed");
}
//


protected void onStop() {
// Stops the media recorder object
recorder.stop();
recorder.release();

Log.e(TAG, "onStop");
super.onStop();
}
}

And this is the LogCat I received when debugging:
=

08-17 10:51:22.400: INFO/Video Capture(709): Media recorder created
08-17 10:51:22.450: INFO/Video Capture(709): File exists? : true
08-17 10:51:22.571: INFO/Video Capture(709): Media recorder parameters
set
08-17 10:51:22.581: INFO/Video Capture(709): Preview Display set to
surface holder!
08-17 10:51:23.132: ERROR/Video Capture(709): surfaceCreated
08-17 10:51:23.181: ERROR/Video Capture(709): THE ERROR IS HERE!:
java.io.FileNotFoundException: /videotest.3gp
08-17 10:51:23.191: INFO/Video Capture(709): Media recorder prepared
for video capture!
08-17 10:51:23.191: ERROR/MediaRecorder(709): start called in an
invalid state: 4
08-17 10:51:23.200: ERROR/Video Capture(709):
java.lang.IllegalStateException
08-17 10:51:23.210: INFO/Video Capture(709): Video capture started!!
08-17 10:51:23.210: ERROR/Video Capture(709): surfaceChanged

I am also wondering if it is mandatory to capture video in external
memory instead of internal memory?
Thanks in advance. I appreciate any help you can give me!..
--~--~-~--~~~---~--~~
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
h

[android-developers] Re: Video with MediaRecorder

2009-08-20 Thread Greivin Lopez

Hi greatinnovus.

I could not give you any suggestions because I'm still getting errors.
In fact, I supposed is the your same error as our codes are very
similar. At the moment Jason Proctor is the only one who claims to be
successful in video capturing, maybe he could help us resolve the
issue.

Here is my current code:
==

public class VideoCapture extends Activity
implements SurfaceHolder.Callback {

private static final String TAG = "Video Capture";
private SurfaceView surfaceView;
private SurfaceHolder surfaceHolder;
private MediaRecorder recorder;
private String videoFile = "";

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

surfaceView = (SurfaceView)findViewById(R.id.surface);
surfaceHolder = surfaceView.getHolder();
surfaceHolder.addCallback(this);
surfaceHolder.setType
(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

if (isExternalStorageReady()) {
this.setupVideoPath();
setRequestedOrientation
(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
prepareVideoCapture();
}
}

public void setupVideoPath() {
File sdcardpath = new File(Environment.getExternalStorageDirectory
(), "videotest.3gp");
this.videoFile = sdcardpath.getAbsolutePath();
Log.i(TAG, "Video output path is: " + this.videoFile);
}

public boolean isExternalStorageReady() {
// Is SD card present and writable?
return Environment.getExternalStorageState().equals
(Environment.MEDIA_MOUNTED);
}

public void prepareVideoCapture() {
/* Create a MediaRecorder */
recorder = new MediaRecorder();
Log.i(TAG, "Media recorder created");

recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
recorder.setPreviewDisplay(surfaceHolder.getSurface());
Log.i(TAG, "Preview Display set to surface holder!");
recorder.setOutputFile(this.videoFile);
Log.i(TAG, "Media recorder parameters set");

try {
recorder.prepare();
} catch (IllegalStateException e) {
Log.e(TAG, e.toString());
} catch (IOException e) {
Log.e(TAG, "THE ERROR IS HERE!: " + e.toString());
}

Log.i(TAG, "Media recorder prepared for video capture!");

try {
recorder.start();
} catch (IllegalStateException e) {
Log.e(TAG, e.toString());
}
Log.i(TAG, "Video capture started!!");
}

//

//  SURFACE CALLBACK IMPLEMENTATION
//

public void surfaceCreated(SurfaceHolder holder) {
Log.e(TAG, "surfaceCreated");
}

public void surfaceChanged(SurfaceHolder holder, int format, int
w, int h) {
Log.e(TAG, "surfaceChanged");
}

public void surfaceDestroyed(SurfaceHolder holder) {
Log.e(TAG, "surfaceDestroyed");
}
//


protected void onStop() {
// Stops the media recorder object
recorder.stop();
recorder.release();

Log.e(TAG, "onStop");
super.onStop();
}
}

And this is the LogCat output:
=

08-20 15:13:58.611: INFO/Video Capture(722): Video output path is: /
sdcard/videotest.3gp
08-20 15:13:58.651: INFO/Video Capture(722): Media recorder created
08-20 15:13:58.762: INFO/Video Capture(722): Preview Display set to
surface holder!
08-20 15:13:58.762: INFO/Video Capture(722): Media recorder parameters
set
08-20 15:13:58.901: INFO/DEBUG(551): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
08-20 15:13:58.911: INFO/DEBUG(551): Build fingerprint: 'generic/sdk/
generic/:1.5/CUPCAKE/148875:eng/test-keys'
08-20 15:13:58.911: INFO/DEBUG(551): pid: 722, tid: 722  >>>
jtrek.video <<<
08-20 15:13:58.921: INFO/DEBUG(551): signal 11 (SIGSEGV), fault addr
0018
08-20 15:13:58.930: INFO/DEBUG(551):  r0 ef40  r1 ece8  r2
41095b28  r3 
08-20 15:13:58.930: INFO/DEBUG(551):  r4 435a4428  r5 ab308358  r6
a9d0  r7 be99e4e0
08-20 15:13:58.930: INFO/DEBUG(551):  r8 be99e500  r9 41049ce0  10
41e24304  fp 1070
08-20 15:13:58.942: INFO/DEBUG(551):  ip ad083e50  sp be99e4d8  lr
ad03dcf5  pc ab305408  cpsr 8030
08-20 15:13:59.031: INFO/DEBUG(551):  #00  pc 5408  /
system/lib/libmedia_jni.so
08-2

[android-developers] Re: MediaRecorder API: preview is not happening and audio sounds muffled

2009-08-21 Thread Greivin Lopez


Hi, sreeram.

A lot of people here is facing problems with video capture! There is a
thread about the video capture topic which has a lot of information,
but seems to be only one person that has succeeded doing video
capture. Check this out:
http://groups.google.com/group/android-developers/browse_thread/thread/ef4ce0506bf52f67?hl=en

Maybe you could join as in that discussion for feedback and
suggestions.

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: Get Device Name

2009-09-09 Thread Greivin Lopez


  I tried using this: "Settings.System.getString
(this.getContentResolver(), "ro.product.device");" but it returns
null.
  Somebody knows how to get the device name programatically???


On Aug 2, 1:59 pm, dan raaka  wrote:
> try reading it from system properties ..
> you can see them as you do "adb shell getprop"
>
> -Dan
>
> On Sat, Aug 1, 2009 at 1:38 AM, fala70  wrote:
>
> > Is there somebody that know I get infos about the device name "Magice,
> > Dream..." and the OS version ?
>
> > thanks
>
> > On 31 Lug, 18:20, fala70  wrote:
> > > Is possible get the device name
>
> > > thanks
>
> --
> -Dan
--~--~-~--~~~---~--~~
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: Application Developers??

2009-09-24 Thread Greivin Lopez

Brittany and everyone else!

We have developed the application you are mentioning, actually it has
more capabilities such as a private web account, video and picture
uploading, Geo-tagging and an alert system built into the mobile
application, so if a user is assaulted or in danger, an alert can be
sent to the user's emergency contacts. This week we launched free and
premium accounts so if you have an Android you can go right now and
turn your mobile into a personal security device. The Android version
its going to be released in the next couple of days. Go to www.jtrek.com
and let me know what do you think! Its FREE!

--~--~-~--~~~---~--~~
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: Should we still force our apps to API level 2?

2009-10-09 Thread Greivin Lopez

I have a question related to backward compatibility in Android. My
applications uses SmsManager class that was deprecated in SDK 1.5 and
moved to other package in SDK 1.6 to support CDMA. That's OK.

The problem is I want to support 1.5 SDK and also being able to use
the new SmsManager class. I think the only way to do that is using the
solution suggested by EboMike (with reflection), but I think is more a
patch than the correct way around.  Other solution could be to compile
the code to the desire target and keep two different releases of the
application but I don't like the idea to maintain two versions of my
code.

I think a must elegant design for this is to use some sort of compiler
directives that let us developers to differentiate parts of our code
associated to one version of the SDK or another one, but I don't see
anything in Android to accomplish that.

Is there a way to achieve this? I suppose there isn't but maybe
someone could share some new ideas on this scenario. I would
appreciate any help. 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: Should we still force our apps to API level 2?

2009-10-09 Thread Greivin Lopez

Thanks Mike.

Your answer was very useful.  I think I'm going to keep a version
supporting CDMA and another one for GSM. At least until new CDMA
Android devices reach the market.
--~--~-~--~~~---~--~~
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: Should we still force our apps to API level 2?

2009-10-14 Thread Greivin Lopez


Thanks to jotobjects and EboMike for their responses.

I will try to describe my situation better: I have an application that
send SMS messages by using SmsManager class. In the SDK 1.5 version of
the application (I mean I set 1.5 as the Project Build Target)
everything works fine because I use the SmsManager class located at:
android.telephony.gsm.SmsManager which does only support GSM.

When i try to create the SDK 1.6 version of it (Setting the Project
Build Target as 1.6) it does not compile because the SmsManager class
was moved to android.telephony.SmsManager (which is ok because it now
supports CDMA). But then my code should be changed if I want to
compile using the new SDK.

===
My desired solution is: Use conditional compilation to mark my code to
use one of the SmsManager classes depending on the SDK I choose as my
project build target. Encapsulating this logic into my own SmsEngine
class so everything in my code works smoothly and supporting 1.5-1.6
firmware devices and also supporting CDMA in the devices that use
1.6.  Without the need to change my code further than a simple
conditional compilation.

Problem: As EboMike says there is not such thing as conditional
compilation in Java (because Java gurus claim there is not need to
such a thing). I personally believe that in the fantasy world were
nobody fails designing their APIS the though "Nobody needs conditional
compilation" is valid. But nobody is perfect and all the APIs out
there in every platforms contains design errors or changes in future
designs that leads to the need to improve!.
===

===
My current solution is: Keep my project build target as 1.5.
Supporting 1.5 and 1.6 devices without any changes in my source code.

Problem: My application does not support CDMA Sms messaging. I can't
benefit from new improvements of performance or bug fixes for the new
1.6 implementation of the SDK.
===

===
Possible alternatives: Keep two releases of the application, one for
1.5 and another one for 1.6 supporting CDMA.  Use reflection into a
wrapper class to identify which of the firmware I am running allowing
me to decide the implementation to use.

Problem: Neither alternative convince me. Two releases can confuse my
users. Reflection is too expensive in performance and also does not
makes my code clear (It scrambles the source code a little).
===

Until there is aren't 1.5 firmware device out there I suppose I
couldn't resolve my problem.

Thanks for your help everyone!.
--~--~-~--~~~---~--~~
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: Should we still force our apps to API level 2?

2009-10-14 Thread Greivin Lopez

jotobjects I'm going to try what you suggest. It seems more like what
I'm looking for. And also let you know what was the result. Thanks.

With conditional compilation I refer of something more like an
attribute that let you tell the compiler to either use one method or
another.

I would like to use something like:

@Conditional(SDK: 4)
public void SmsMethod() {
  // Uses android.telephony.gsm.SmsManager
}

@Conditional(SDK: 3)
public void SmsMethod() {
  // Uses android.telephony.SmsManager
}

So I could easyly accomplish all of my goals with a very elegant and
clear solution and without any compilation errors. Of course there
isn't any attribute like that. But I would like to have one. Maybe in
the future we could have something like that 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
-~--~~~~--~~--~--~---



[android-developers] Re: Rotating Camera Preview

2009-10-15 Thread Greivin Lopez

Thank you very much Anirudh!!!

This is exactly what I was looking for!.
--~--~-~--~~~---~--~~
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: Unable to write text file to sdcard on physical G1 device

2009-10-15 Thread Greivin Lopez

I think you only need to add the permission as suggested by
androiduser mobile to be able to write to the SD Card.






--~--~-~--~~~---~--~~
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: Should we still force our apps to API level 2?

2009-10-16 Thread Greivin Lopez

Thank you Mark. It sounds very interesting!, specially the JavaPP link.
--~--~-~--~~~---~--~~
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: Rotating Camera Preview

2009-10-16 Thread Greivin Lopez

Actually it does not work as I expected!!

I've tested it in a G1 and it work great for the camera preview, but
when you take the picture the JPEG is still in landscape mode. Anybody
knows how to set the camera to get the image as you see it in your
preview?

I know that the Camera application work in that way, and I want my
application to do the same. Do they rotate the final image
programmatically?

Please I need help with 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
-~--~~~~--~~--~--~---



[android-developers] Re: android.os.Build.MANUFACTURER

2009-10-19 Thread Greivin Lopez

I think you could use IMEI value.  IMEI = International Mobile
Equipment Identity which is a unique number for every GSM, WCDMA, IDEN
phone.

The way to retrieve the value is by using something like this:

import android.telephony.TelephonyManager;

TelephonyManager telephonyManager = (TelephonyManager) getSystemService
(Context.TELEPHONY_SERVICE);

Because of the sensible nature of this value, if you want to send it
over the web I encourage you to encrypt it before. Or just apply a
hash algorithm like MD5 to it.
--~--~-~--~~~---~--~~
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: android.os.Build.MANUFACTURER

2009-10-20 Thread Greivin Lopez

Ok I see IMEI is not valid as a device identifier for Android
devices.  What do you guys suggest to use instead of the IMEI to
identify the device? Is there any best practice in Android environment
to do that?

I'm asking because I also working on that part of my application right
now.

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



[android-developers] Re: Numeric-only soft keyboard

2009-10-21 Thread Greivin Lopez

I am also looking for this. In my application I have a four digits
code users needs to provide so it could be very nice if I have an
specialized numbers-only soft keyboard.

It could be a nice API addition for feature releases of the SDK as
well (If there isn't yet) to allow developers to create their own
specialized soft-keyboards by describing the keys they would need in
their keyboard. Could be with key constants or something like that. I
thinking in specialized buttons as well such as the ".com" button.

Any help could be appreciated.
--~--~-~--~~~---~--~~
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: Showing application version

2009-10-26 Thread Greivin Lopez

Or just use the following code snippet:

/**
 * Gets the software version and version name for this application
 */
 private void getSoftwareVersion() {
  try {
PackageInfo pi = getPackageManager().getPackageInfo
(getPackageName(), 0);
// Store the software version code and version name
somewhere..
Global.softwareVersion = pi.versionCode;
Global.softwareVersionText =
pi.versionName;
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Package name not found", e);
};
}

Good luck with your Android programming! :)
--~--~-~--~~~---~--~~
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: Showing application version

2009-10-26 Thread Greivin Lopez

Or just use the following code snippet:

/**
 * Gets the software version and version name for this application
 */
 private void getSoftwareVersion() {
  try {
PackageInfo pi = getPackageManager().getPackageInfo
(getPackageName(), 0);
// Store the software version code and version name
somewhere..
Global.softwareVersion = pi.versionCode;
Global.softwareVersionText =
pi.versionName;
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Package name not found", e);
};
}

Good luck good your Android programming! :)
--~--~-~--~~~---~--~~
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: 1.6 vs setPictureSize

2009-10-26 Thread Greivin Lopez

Hi!

I was having a similar issue on my application. Later I found that
setPictureSize actually works well but the problem was in the
"setPreviewSize".  When I called setParameters it was failing because
the "setPreviewSize", so the other parameters wasn't really being set.

If you are calling setPreviewSize in your code consider removing it
and try again!... Maybe you are experiencing the same issue.

Good luck.
--~--~-~--~~~---~--~~
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: Camera Picture Size on Samsung i7500 Galaxy

2009-10-28 Thread Greivin Lopez

It is possible that you are facing the same problem described in this
post:
http://groups.google.com/group/android-developers/browse_thread/thread/d050a50bacdf3c08/da7b9f10cfcfbb18?hl=en&lnk=gst&q=Greivin+Lopez#da7b9f10cfcfbb18

If you are using camera.setPreviewSize in your code then just remove
it because it causes setParameters method to crash (I believe it is a
bug).

Hope it works. Good luck.


--~--~-~--~~~---~--~~
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 downgrade T-Mobile G1 from Donut to Cupcake?

2009-12-18 Thread Greivin Lopez
Hi,

I need to support Android 1.5 (Cupcake) for my application but I don't
have any 1.5 device.  I currently have a Motorola Droid with 2.0.1 and
the T-Mobile G1 (HTC Dream) with 1.6 (Donut).

What I want to do is to downgrade my G1 to the previous official OTA
release of Cupcake.  I have no experience in rooting an Android
device, so I would appreciate if someone could give me a step-by-step
guide on how to accomplish this?

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


[android-developers] Re: How to parse Json file (Which is output of http://maps.googleapis.com/maps/api/geocode/json.....)

2012-01-28 Thread Greivin Lopez
Hi,

I suggest you to take a look at the Gson library from Google to parse
the JSON response from the service:
http://code.google.com/p/google-gson/

It has a very competitive performance according to this resource:
http://martinadamek.com/2011/02/01/adding-gson-to-android-json-parser-comparison/

It also will improve a lot the beauty and readability of your code, it
will be something simpler:
http://www.javacodegeeks.com/2011/01/android-json-parsing-gson-tutorial.html

And last one, but more important from my perspective, it allows you to
use a mixed approach between streaming and object model access which
is the right combination for performance and code readability:
https://sites.google.com/site/gson/streaming

I hope it helps.

Regards, Greivin.

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