[android-developers] Re: video frame transcoding in android

2011-09-08 Thread Drezden
You have too many questions, just hire someone to do it for you.

On Sep 7, 5:45 am, NAVI NEW navi44...@gmail.com wrote:
 Please help me how to do video frame trans-coding 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: how to Change resolution of video by java /Android code

2011-09-08 Thread Drezden
Go away.

On Sep 7, 4:16 am, NAVI NEW navi44...@gmail.com wrote:
 i have a video which have which containing  different video
 resolution, i want give it fix resolution by code.It's possible or not
 by code

-- 
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 is RockPlayer doing hardware decoding?

2011-09-02 Thread Drezden
I believe they're using a customized build of FFMpeg that gets
accessed through the NDK.  FFMpeg has the ability to do a lot of
manipulation with video, audio, and images.

On Sep 2, 9:15 am, B.Arunkumar awsnetworkrecor...@gmail.com wrote:
 Hi,

      Would somebody be able to guide me on how RockPlayer/MoboPlayer
 does the hardware decoding of image frames?

 Thank you,
 B.Arunkumar

-- 
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: HorizontalScrollView Question

2011-09-02 Thread Drezden
Read this:

http://blog.velir.com/index.php/2010/11/17/android-snapping-horizontal-scroll/

It should get you going in the right direction.  Modify the code on
your own to get when you need.

On Sep 1, 11:43 pm, Ash anan...@gmail.com wrote:
 Hi All,

 How do we detect that the horizontalscrollview has reached the end? I have
 2 buttons on either side of the horizontal scroll view which I would like to
 hide if not required.

 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: Please see this example when i am taking small file then it works but when taking large video size with 1gb approx then outofmemory error

2011-09-02 Thread Drezden
This is never going to work, you can't allocate that much memory.
Push it server-side.

On Sep 2, 11:08 am, NaveenShrivastva kumarnaveen.si...@gmail.com
wrote:
 Please help me..







 On Fri, Sep 2, 2011 at 12:49 PM, Miguel Morales therevolti...@gmail.com 
 wrote:
  I don't know what a perfect url is, just look up examples on streaming
  a file using java.
  There's hundreds of examples.

  On Fri, Sep 2, 2011 at 12:17 AM, skink psk...@gmail.com wrote:

  On Sep 2, 8:58 am, NaveenShrivastva kumarnaveen.si...@gmail.com
  wrote:
  Yes i understanding this issue large byte array size overflow how
  handle here.give me way please or perfect url

  You *cannot* allocate one gigabyte of memory in small mobile devices.
  Period.

  pskink

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

  --
  ~ Jeremiah:9:23-24
  Android 2D MMORPG:http://solrpg.com/, http://www.youtube.com/user/revoltingx

  --
  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 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: volume control with videoview android

2011-09-02 Thread Drezden
Use the AudioManager.  Google it.

On Sep 1, 9:20 am, Naveen kumarnaveen.si...@gmail.com wrote:
 i am using videoview android.accessing videoview id from xml file.

 now i want  android volume control with android videoview .

 help 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
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: convert image to text

2011-09-02 Thread Drezden
Get the SnapIt app from the market.

On Sep 2, 10:19 am, Lwe luaisul...@gmail.com wrote:
 i need some think like take photo from camera and see it as text

-- 
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: NullPointer Exception creating MediaPlayer

2011-09-02 Thread Drezden
Try this:

MediaPlayer mPlayer = new MediaPlayer();
mPlayer.setDataSource(this,mUri);
mPlayer.setOnPreparedListener(this);
mPlayer.setOnErrorListener(this);
mPlayer.prepareAsync();

private void onPrepared(MediaPlayer mp)
{
mp.start();
}

private void onError(MediaPlayer mp, int a, int b)
{
  //Grab and display error code here
}

Could be a network connectivity issue.

On Aug 31, 4:18 pm, Andrea Stagi stagi.and...@gmail.com wrote:
 Hi all,

 I'm trying to stream from an url using this code

         MediaPlayer mediaPlayer =
 MediaPlayer.create(getApplicationContext(), Uri.parse(http://
 voxsc1.somafm.com:8880));
         mediaPlayer.start();

 This code works on emulator, on my htc wildfire with 2.3, on another
 wildfire with 2.2 and other devices, but I get a NullPointer Exception
 with an LG and a GalaxyTab running 2.2 ... Tried other solutions,
 using prepared listener too, but nothing changes ... Why this??

 Thank you in advance,

 =.4.S.=

-- 
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: volume control with videoview android

2011-09-02 Thread Drezden
And while you're at it, Google the rest of your project too.

Your constant posts on this video project are getting old.  Read the
docs, use Google, and experiment for more than five minutes before
asking people to build your project for you.

On Sep 2, 3:02 pm, Drezden mmjohns...@gmail.com wrote:
 Use the AudioManager.  Google it.

 On Sep 1, 9:20 am, Naveen kumarnaveen.si...@gmail.com wrote:







  i am using videoview android.accessing videoview id from xml file.

  now i want  android volume control with android videoview .

  help 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
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Overlay text and live video in Android

2011-09-01 Thread Drezden
Use a relative layout and place the TextView on top of a custom Camera
preview using a Surface.

On Sep 1, 6:34 am, 911MIHOP gae.gu...@gmail.com wrote:
 Hello Drezden, maybe you can help me.
 I have to solve this issue: I have got a text string, and I would like
 to overlay it on the live video using Android Camera.
 Differently by James, my text is already available: I receive it and
 put it into a string variable BEFORE starting Camera preview.
 So my problem is just overlaying it on the video. Can you give me any
 suggestion?

 Thanks in advance!

 On Aug 24, 6:29 pm, Drezden mmjohns...@gmail.com wrote:







  Can't you just use a RelativeLayout and place a TextView on top of the
  playback surface?

  On Aug 24, 8:54 am, James james.r...@gmail.com wrote:

   I need to develop an application that overlaystexton the live video
   using Android phone camera.  Who may help, information or directions?

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

2011-09-01 Thread Drezden
You need to look into what's called symmetrical encryption.

Depending on just how secure you need this to be, you could use
something as simple as Base64 encoding and decoding or something more
robust like PGP.

It all depends on how strong you need it to be.

On Sep 1, 10:19 am, Gabriel Marchant marchan...@gmail.com wrote:
 Hi guys, I need help with encryption methods.
 I would like to encrypt a specific field on a table. The app runs on
 Android 2.1 and 2.2
 Then, I need to decrypt that specific field when the application
 connects to my remote server. The decryption mus be done at the remote
 server.
 Suggestions?
 THANK YOU
 Gabriel

-- 
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: switching Intents

2011-09-01 Thread Drezden
If you have Activity 'A' running, you can launch a new Activity 'B'
without calling finish().  This will place Activity 'B' in the
foreground of the app.

Then you can call finish() on Activity 'B' and it will take you back
to 'A'.  Just be aware that if you run out of memory, Activity 'A' may
not be there.

On Sep 1, 4:49 pm, bob b...@coolgroups.com wrote:
 Is there a way to switch easily from one Intent to another?  I know
 how to start a new one with startActivity, but I want to know how to
 go back to an existing one.

-- 
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 i resize the bitmap before adding to a ImageView or let the ImageView resize the Bitmap?

2011-09-01 Thread Drezden
Go to the docs and look up BitmapFactory.Options.

You can adjust the sample size of the Bitmap to conserve memory.  Play
with this and the scaling options to get the best performance.

On Sep 1, 5:04 am, Benjamin benjaminru...@googlemail.com wrote:
 Hello friends,

 i have a simple question: Should i resize a bigger bitmap before
 adding to a ImageView or let the ImageView resize the Bitmap?

 What's the right way, regarding performance?

 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: Lazy loading in HorizontalScrollView to prevent Out of Memory issue

2011-08-26 Thread Drezden
Are you loading a large number of images into your
HorizontalScrollView?

If so, then you are probably running out of memory from the Bitmap
creation process.  You need to subsample them so you aren't loading
billboard sized images into your app, like this.

BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 2;
options.inTempStorage = new byte[16*1024];

Bitmap img =
BitmapFactory.decodeStream(getContentResolver().openInputStream(imagePath),null,options);

On Aug 26, 1:00 am, himanshu jain himanshu@gmail.com wrote:
 I want to add lazy loading feature to HorizontalScrollView, It has
 linearlayout as a child and i am addding to linearlayout,

 I am interested in listening to the event when the child view is out
 of the visibility area,  I see in linearlayout implementation it does
 not call either dispatchViewVisibility or onDraw on child view , why i
 want that because bitmap attached to the child view can be recycled
 and create bitmap again when child view is visible (well that is a
 separate part ,How can i create that bitmap very fast, I am planning
 to use opengl for that) but the question is how can make such custom
 view.

 I can not use gallery view because it does not solve my purpose

 I saw that viewgroup has feature of dispatchingViewVisibility and
 dispatchOnDraw but not sure how to use that with
 HorizontalScrollView.?

 All i am doing to prevent Out of Memory issue

 Any suggestion and help would be appreciated

 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: Adding Views into layouts

2011-08-25 Thread Drezden
I have an app in the market right now that uses a custom designed tab
bar at the bottom of the screen and a relative layout at the top that
acts as an iframe, so this is very doable.  In my app I used the
LocalActivityManager to load the requested activity and then extract
it's main layout, like this:

[code]

LocalActivityManager manager = getLocalActivityManager();

Intent preloader = new Intent(com.pkg.Foo);
View childView = manager.startActivity(preloader.getAction(),
preloader.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();

frame.removeAllViews();
frame.addView(childView);

[/code]

Each of the buttons in the tab bar calls to a loading function with
the requested Activity name and options like ViewFlipper index or
other startup options.  After you add the childView to the frame, you
can also do something like this to animate in the view.

[code]

childView.startAnimation(slideLeftAnimation);

[/code]

The only problem with this approach is that LocalActivityManager has
been deprecated as if this month in favor of Fragments and the
FragmentManager.  So you might want to look into both options and see
what works best for your users and app needs.  If you look at the
demos over at android.com there is a tab example using Fragments.


On Aug 25, 1:40 am, Damien Cooke cooke.dam...@gmail.com wrote:
 Hi all,
 I am sure what I want to do is possible I think I am going about it the wrong 
 way.

 I am building a kind-of tab controller.  I am attempting to define compound 
 views in XML layouts and I want to import them into my Activity.  The idea 
 being that each tab continues to function regardless whether it is visible 
 or not.  

 What I am attempting to do is create a View object and inflate the layout I 
 want into the View Object.  Is this the correct approach?  (by the way the 
 reason I can not use the tabhost is because the client needs a scrolling 
 tabbar so they can have 10 options on the tab bar, so I have implemented a 
 scrollview containing buttons for the tabbar)

 The structure will be an array of Views each attached to one of the buttons 
 in the scrollView.  When selected the View object (if not already populated) 
 will populate using inflate then become visible.

 Am I close? Is this the wrong approach? Thanks in advance for any assistance.

 Regards
 Damien

-- 
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: Regular expressions and ICU4C

2011-08-25 Thread Drezden
ICU4C is the C-language library, you need to use ICU4J.  I believe you
can download the jar here: http://site.icu-project.org/

You can also do most types of RegEx tests using the Pattern and
Matcher classes like so:

private boolean validEmail(String email)
{
String emailPattern = ^[\\w\\.-]+@([\\w\\-]+\\.)+[A-Z]{2,4}$;
Pattern pattern =
Pattern.compile(emailPattern,Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(email);
return matcher.matches();
}

On Aug 25, 5:25 am, Mark Carter mjc1...@googlemail.com wrote:
 I have read that Android uses ICU4C to support regular expressions.

 Does this mean that the java.util.regex.Pattern class uses ICU4C under the
 hood? If so, why does \U0002A700-\U0002B73F (or similar \U expressions) not
 work?

-- 
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: NullPointerException on displaying ImageView of a bitmap

2011-08-25 Thread Drezden
What is specifically happening in your onCreate method at line 62?
That's where the null exception is coming from.

Also, you might want to use the BitmapFactory.Options to help in image
creation.  You can easily tweak the options to get image dimensions
without having to create the actual bitmap (see inJustDecodeBounds)
and you can adjust the sample size to put less memory strain on your
application.  Try this:

BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 2;
options.inTempStorage = new byte[16*1024];
options.inJustDecodeBounds = false;

Bitmap b = BitmapFactory.decodeStream(inputStream,null,options);

Then test b to make sure it isn't null before loading it into your
ImageView.



On Aug 25, 10:54 am, Abhi abhishek.r.sha...@gmail.com wrote:
 Hi

 I have the following piece of code which is resulting in a
 NullPointerException and I am not able to understand why. I am able to
 get the correct size of the bitmap in the Log statement below before
 displaying the image, so up to that point everything is good.

 //result is a byte array which contains the jpeg image

 ByteArrayInputStream inputStream = new ByteArrayInputStream(result);
 b = BitmapFactory.decodeStream(inputStream);

 Log.i(TAG, Size of bitmap is  + b.getWidth() +  x  +
 b.getHeight());

 ImageView imageview1 = (ImageView) findViewById(R.id.ImageV);
 imageview1.setImageBitmap(b);

 The exception I am getting is below :

 08-25 11:46:25.578: ERROR/AndroidRuntime(12564): FATAL EXCEPTION: main
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):
 java.lang.RuntimeException: Unable to start activity
 ComponentInfo{com.android.databasetest/
 com.android.databasetest.DatabaseTest}: java.lang.NullPointerException
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 1821)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 1842)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 android.app.ActivityThread.access$1500(ActivityThread.java:132)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 android.os.Handler.dispatchMessage(Handler.java:99)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 android.os.Looper.loop(Looper.java:143)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 android.app.ActivityThread.main(ActivityThread.java:4263)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 java.lang.reflect.Method.invokeNative(Native Method)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 java.lang.reflect.Method.invoke(Method.java:507)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:839)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 dalvik.system.NativeStart.main(Native Method)

 08-25 11:46:25.578: ERROR/AndroidRuntime(12564): Caused by:
 java.lang.NullPointerException
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 com.android.databasetest.DatabaseTest.onCreate(DatabaseTest.java:62)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
 1072)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 1785)
 08-25 11:46:25.578: ERROR/AndroidRuntime(12564):     ... 11 more

 Any help is appreciated.

 Thanks,

 AB

-- 
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: Overlay text and live video in Android

2011-08-25 Thread Drezden
Hmm, it sounds like you want to do video encoding on the fly.  That's
a pretty intensive process for Android to try and do in real-time.

My suggestion would be to look into using FFMpeg and the NDK.  Other
than that I'm sure how you're going to handle that one.

On Aug 24, 6:01 pm, James (Wei-Jie) He james.r...@gmail.com wrote:
 The text data is pulling from Bluetooth and it needs to be saved (merged)
 into saved video file.  Can I save the TextView data into the video file?







 On Wed, Aug 24, 2011 at 11:29 AM, Drezden mmjohns...@gmail.com wrote:
  Can't you just use a RelativeLayout and place a TextView on top of the
  playback surface?

  On Aug 24, 8:54 am, James james.r...@gmail.com wrote:
   I need to develop an application that overlays text on the live video
   using Android phone camera.  Who may help, information or directions?

  --
  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 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 handle click events for 3x3 image buttons arrays?

2011-08-25 Thread Drezden
Can you create a ListImageButton and add a reference onto it for
each of your buttons, then run a loop to assign the onClickListener?
Then within the onClick(View v) figure out which button was pressed
based on the v value and handle it accordingly?  I've done this before
when I only want one button selected at any given time out of a large
set using something like this:

private void setActiveBtn(ImageButton btn){

//deactivate all buttons then reactivate the selection
for(int i=0; i  buttonSet.size(); i++){
buttonSet.get(i).setSelected(false);
}
btn.setSelected(true);
}

On Aug 25, 6:47 am, Hitendrasinh Gohil hitendrasin...@gmail.com
wrote:
 Hi,

 I am having 3x3 array which contains 3x3 imagebuttons array.I am
 repeating 3x3 imagebuttons 9 times.
 how can i handle click events for that?

-- 
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: ImageView not getting vertically centered

2011-08-25 Thread Drezden
Can you try something like this using centerInParent?

ImageView
android:id=@+id/preview_image
android:layout_width=wrap_content
android:layout_width=wrap_content
android:layout_centerInParent=true /

On Aug 25, 1:39 pm, Manish Garg mannishga...@gmail.com wrote:
 Hi All,

 I need to display one image on the screen who's size depends upon the
 image fetched from the server. It is getting horizontal center but not
 vertical center. When image size is large then it is displaying fine
 scroll bar is also coming but when image size is smaller the screen
 size then I am facing problem.

 ScrollView
   xmlns:android=http://schemas.android.com/apk/res/android;
   android:layout_width=fill_parent
   android:layout_height=fill_parent
   style=@style/theme_layout
   LinearLayout
     android:layout_width=fill_parent
         android:layout_height=fill_parent
         android:id=@+id/imgLayout
         android:gravity=center
             ImageView
                 android:id=@+id/documentImg
                 android:layout_width=wrap_content
                 android:layout_height=wrap_content
             /ImageView
     /LinearLayout
 /ScrollView

 Regards,
 Manish Garg

-- 
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: Non-full screen Activity in Honeycomb?

2011-08-24 Thread Drezden
In the Android activity stack there can only be one app running in the
foreground (see this http://goo.gl/WyZOx) so this idea won't work as
you might be envisioning it.

You could modify the UI of your app so that the window and all
backgrounds are transparent, but this would only show you the
wallpaper and shortcuts below, no interaction would be possible.  If
you need to run multiple activities at the same time, you might want
to look into using a LocalActivityManager to load activities, pull
their main view, and load that into a layout.  This would be similar
to using an iframe in HTML something like this:

LocalActivityManager manager = getLocalActivityManager();
Intent preloader = new Intent(com.pkg.Foo);
View childView = manager.startActivity(preloader.getAction(),
preloader.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();

frame.removeAllViews();
frame.addView(childView);

frame would be some kind of Linear or RelativeLayout that you could
then add a child view to.  The more layouts you have, the more pseudo
iframes.

On Aug 22, 8:10 am, Peter Knego pe...@knego.net wrote:
 I'd like to have a non-fullscreen Activity only taking about one third
 of full screen on Android 3+ (Honeycomb), so that other part would be
 transparent and other apps would show. So my app would actually float
 above other open apps.

 Is it possible to have an Activity that only takes 1/3 of the full
 screen?

 If possible, is this against Honeycomb UI guidelines?

 Thanks for your input,

 Peter Knego

 BTW, this has also been asked on 
 stackoverflow:http://stackoverflow.com/questions/7147926/non-full-screen-activity-i...

-- 
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: Overlay text and live video in Android

2011-08-24 Thread Drezden
Can't you just use a RelativeLayout and place a TextView on top of the
playback surface?

On Aug 24, 8:54 am, James james.r...@gmail.com wrote:
 I need to develop an application that overlays text on the live video
 using Android phone camera.  Who may help, information or directions?

-- 
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: Apk file size limit / number of files limit

2011-08-24 Thread Drezden
How big are the images you're trying to load?

If you're creating Bitmap objects from your resources then you are
very likely running out of memory in the process.  Look into
BitmapFactory.Options and try increasing the sample size to see if
that makes any difference.

I would also suggest that you look into ways to pull your tiles from
the web instead of storing them on the device.  You very rarely see
apps in the wild that have a larger footprint than 20mb and some
devices like the G1 only have 70mb of storage TOTAL for all apps.  So
you're basically asking someone to remove everything from their device
to load your app.

On Aug 23, 6:38 am, Raphael André Bauer
raphael.andre.ba...@gmail.com wrote:
 Hi,

 I am currently developing a PhoneGap application - but I am pretty
 sure that my problem is way more related to Android than to PhoneGap.
 My app consists of a directory assets/www/maps. In this folder is a
 huge amount of image files that are tiles for a map library.

 My observation is: When the asset folder contains around 80mb of
 files, the app works nicely both on the emulator and on my nexus one.
 When it's larger than 80mb it crashes on both devices. the devises are
 running 2.3.3 Api level 10 (but it happens on 3.2, too).

 The error messages are not really helpful (error parsing apk file
 popup on nexus and cannot read Android Manifest via logcat on
 emulator).

 I am really a newbie on Android, so I am a bit lost here. I already
 tried to increase the partition size of my emulator like that:
 emulator -avd avd -partition-size 2047 - but this did not help.

 Any pointers how to continue debugging would be really great. If there
 are any limits on the amount of files / size of an apk let me know. I
 am not aware of any limits - and afaik the 50mb limit of Android apps
 distributed via the Android Market was lifted some time ago.

 Thanks a lot :)

 Raphael
 ps. I also cross posted my question at the phongap 
 list:http://groups.google.com/group/phonegap/browse_thread/thread/8333095f...
 - but got no answer.

 --
 inc:http://ars-machina.raphaelbauer.com
 tech:http://ars-codia.raphaelbauer.com
 web:http://raphaelbauer.com

-- 
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 Do I compile code that uses Apache Harmony package

2011-08-24 Thread Drezden
I believe that's part of org.apache.harmony.security

On Aug 23, 11:24 am, Murthy mavv...@gmail.com wrote:
 Hi All,

 I am trying to parse a PKCS7 formatted data using Apache Harmony APIs
 in Android. What JAR file should I use to compile my code on the
 command line? Really appreciate your help.

 Thanks,
 - Murthy

-- 
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: Can't get animation to work

2011-08-24 Thread Drezden
ImageView img = (ImageView)findViewById(R.drawable.sleepyhead1);

It looks like you're attempting to load an image resource from your
drawables instead of the id of your ImageView.

On Aug 21, 10:44 am, Kentai kenta...@googlemail.com wrote:
 Hello Community ^-^

 sorry, to bother you with something this simple, but I have just begun
 working with the language and am inclined to making mistakes all over
 the palce.

 After quite a few hours of reading, recoding with different approaches
 and checking, I have not managed to solve my problem, which is, that
 starting the activity causes a forced shutdown (The Application...
 has stopped unexpectedly. please try again).

 I tried looking for small errors in the manifest and used xml files,
 but I didn't notice anything yet^^ maby someone here can shed some
 light on this.

 the files:

 ---[blink1.xml]---

 animation-list xmlns:android=http://schemas.android.com/apk/res/
 android
        android:oneshot=false
     item android:drawable=@drawable/sleepyhead2
 android:duration=300 /
     item android:drawable=@drawable/sleepyhead1
 android:duration=150 /
     item android:drawable=@drawable/sleepyhead2
 android:duration=100 /
     item android:drawable=@drawable/sleepyhead3
 android:duration=200 /
     item android:drawable=@drawable/sleepyhead2
 android:duration=400 /
     item android:drawable=@drawable/sleepyhead1
 android:duration=250 /
 /animation-list

 --[ScreenActivity.java]--

 package com.suyasuya;

 import android.app.Activity;
 import android.graphics.drawable.AnimationDrawable;
 import android.os.Bundle;
 import android.widget.ImageView;

 public class ScreenActivity extends Activity
 {
    public void onCreate(Bundle icicle)
    {

       super.onCreate(icicle);
       setContentView(R.layout.app);

       // Load the ImageView that will host the animation and
       // set its background to our AnimationDrawable XML resource.
       ImageView img = (ImageView)findViewById(R.drawable.sleepyhead1);
       img.setBackgroundResource(R.anim.blink1);

       // Get the background, which has been compiled to an
 AnimationDrawable object.
       AnimationDrawable frameAnimation = (AnimationDrawable)
 img.getBackground();

       // Start the animation (looped playback by default).
       frameAnimation.start();

    }

 }

 

 If this is not enough I can also post my R file and the Manifest.

 Thank you ^-^
 sy,
 Kentai

-- 
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: Non-full screen Activity in Honeycomb?

2011-08-24 Thread Drezden
Ah, they snuck that in there when I wasn't looking.  That wasn't
available when I last needed an activity loading solution.

Ok, so check this out now instead of LocalActivityManager (http://
developer.android.com/reference/android/app/FragmentTransaction.html)

On Aug 24, 11:29 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Aug 24, 2011 at 12:27 PM, Drezden mmjohns...@gmail.com wrote:
  You could modify the UI of your app so that the window and all
  backgrounds are transparent, but this would only show you the
  wallpaper and shortcuts below, no interaction would be possible.  If
  you need to run multiple activities at the same time, you might want
  to look into using a LocalActivityManager to load activities, pull
  their main view, and load that into a layout.

 FYI, LocalActivityManager has been deprecated.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training in NYC:http://marakana.com/training/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: Facebook Share Crash in Android application

2011-08-24 Thread Drezden
The Facebook API is pretty well known for errors, bugs, outages, and
just random weirdness.  I currently have an app that uses Facebook for
posting to a users wall and it's not accepting any of the parameters I
send like the default message, caption, etc.  One day it works.one
day it doesn't.

You just have to learn to live with it and wrap all of your Facebook
code in about ten layers of try/catch statements.

Run your app with DDMS open and see which Facebook class/method is
causing the problem, then add all the required error checking that the
Facebook developers left out, that should at least keep your app from
crashing when their API returns garbage.

On Aug 24, 9:16 am, rokson kiranrepa...@gmail.com wrote:
 Hi Friends,

 I have a problem with Facebook publish in my android application.

 I implemented Facebook android SDK in my android application for
 publishing the updates.The application was submitted to android market
 on march 2011 and working fine with all Facebook activities. But from
 few days onward my application is getting crashed when user trying to
 publish a post on wall.

 Once the user clicked on the share button in Facebook publish window
 then the user able to see a progress bar for sometime then the crash
 occurring and user leads to get out of the application all of sudden.

 My question is why the crash occurring from few days? I did not done
 any changes in my application. Now it was in the market many are using
 it.

 The most important part of my application is Facebook posts now that
 is not working.

 I need immediate response on this. other wise I am going to loss users
 to my application.

-- 
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 retrieve images from a sql database?

2011-08-23 Thread Drezden
I'm not sure why you wouldn't have access to the MediaStore, it's been
available since API level 1.

If you really want to try putting the images directly in the database,
just Google something like Android SQLite Blob because that's what
you'll need to use.  I'm sure there are examples out there.  Make sure
to use BitmapFactory Options when recreating your Bitmaps, otherwise
you're probably going to crash the app after creating a few Bitmaps
because you've completely run out of memory on the device.

Good luck.

On Aug 23, 8:59 am, Abhi abhishek.r.sha...@gmail.com wrote:
 @Ibendlin - Yes, SQLite on device is what I meant. Sorry about the
 confusion
 @Drezden - I somehow don't have that option to add images to
 MediaStore, keeping the file path in the SQLite database. I would like
 to still try retrieving those images stored in the database before
 deciding which way to really go. Anything you could tell me about
 doing that?

 Thanks,

 AB

 On Aug 22, 5:45 pm, Drezden mmjohns...@gmail.com wrote:







  What you're looking for in SQLite is called a BLOB (Binary Large
  Object) but this is usually NOT recommended, the better approach would
  be to add the images to your MediaStore and then store the file path
  in your SQLite database.  Then you can retrieve the images as needed
  from the resource path like this:

  BitmapFactory.Options options = new BitmapFactory.Options();
  options.inSampleSize = 2;
  options.inTempStorage = new byte[16*1024];
  options.inJustDecodeBounds = false;

  Bitmap preview =
  BitmapFactory.decodeStream(getContentResolver().openInputStream(imagePath), 
  null,options);

  Hope this helps.

  On Aug 22, 3:04 pm, Abhi abhishek.r.sha...@gmail.com wrote:

   Hi

   I have a database of low res images that I am trying to use for one of
   my applications. What I would like to do is to retrieve the images one
   by one and display them in a slideshow. I was told that images are
   stored as byte arrays in sql database. I am new to sql and looking for
   some direction on how to do this, what query to put and how to extract
   the byte array from the database for further use.

   Any help appreciated.

   Thanks,
   AB

-- 
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 retrieve images from a sql database?

2011-08-22 Thread Drezden
What you're looking for in SQLite is called a BLOB (Binary Large
Object) but this is usually NOT recommended, the better approach would
be to add the images to your MediaStore and then store the file path
in your SQLite database.  Then you can retrieve the images as needed
from the resource path like this:

BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 2;
options.inTempStorage = new byte[16*1024];
options.inJustDecodeBounds = false;

Bitmap preview =
BitmapFactory.decodeStream(getContentResolver().openInputStream(imagePath),null,options);

Hope this helps.

On Aug 22, 3:04 pm, Abhi abhishek.r.sha...@gmail.com wrote:
 Hi

 I have a database of low res images that I am trying to use for one of
 my applications. What I would like to do is to retrieve the images one
 by one and display them in a slideshow. I was told that images are
 stored as byte arrays in sql database. I am new to sql and looking for
 some direction on how to do this, what query to put and how to extract
 the byte array from the database for further use.

 Any help appreciated.

 Thanks,
 AB

-- 
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: SQLite: Tables not created onCreate without any error

2011-08-22 Thread Drezden
If possible post a complete class file for your database helper, it's
really hard to know what's happening when you show random parts from
all of your classes.

On Aug 22, 4:07 pm, Nico Balestra nicobales...@gmail.com wrote:
 Ok guys.. I've tried and tried in the hope not to be forced to bother you.
 but I have to :)
 I'm trying to do a simple thing.. creating a DB when my activity first
 starts:
 @Override
     public void onCreate(Bundle savedInstanceState) {

         currenciesDB = new CurrenciesDB(this);
         currenciesDB.open();

  }

 then in my CurrenciesDB constructor/open:

 public CurrenciesDB(Context mCtx) {
 this.ctx = mCtx;}

 public CurrenciesDB open() throws SQLException {
 this.dbHelper = new CurrencyStorageHelper(this.ctx);
 this.db = dbHelper.getWritableDatabase();
  return this;

 }

 and, as you might reckon, my CurrencyStorageHelper class extends the
 SQLOpenHelper class and specifically:
 public CurrencyStorageHelper(Context context) {
 super(context, DATABASE_NAME, null, DATABASE_VERSION);

 }

 @Override
 public void onOpen(SQLiteDatabase db) {
 super.onOpen(db);
 Log.d(TAG, Opening the database...  + db.getPath() +  version  +
 db.getVersion());
 db.setLockingEnabled(true);}

  @Override
 public void onCreate(SQLiteDatabase database) {
 database.execSQL(DATABASE_CREATE_1);
  Log.d(TAG, Creating table... + DATABASE_CREATE_2);
 database.execSQL(DATABASE_CREATE_2);
 Log.d(TAG, Creating table... + DATABASE_CREATE_3);
 database.execSQL(DATABASE_CREATE_3);
  insertDefinitions(database);
 insertInitialCurrencies(database);

 }

 What is happening here is that despite launcing the CREATE TABLE
 statements, nothing gets created on the database. After those statements I
 even insert records using SQLiteDatabase.insert. But nothing happens.. no
 expections and no records get created.
 Afterward, when I try to query the DB, I get an option saying that the table
 I'm trying to query doesn't (obviously) exists.
 I'm not a newbie developer and I've tried to debug my app as much as I
 can/know but I have only these clues:
 1. During the debug process, the instance of SQLiteDatabase has a
 mStrackTrace private attribute set to DatabaseObjectNotClosedException, but
 obviously no cursor has been opened.. yet.
 2. The db version gets set to zero :(
 3. Same behaviour using the Emulator and my Samsunga Galaxy S2 2.3.3 (hence
 no wrong configuration of the emulator).

 If you had patient to go through the entire email I hope you have even one
 single clue on why this is happening (maybe you experienced the same
 problem?? ) !!

 Log.d(Nico, THANK YOU);

 Nico

-- 
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: need help on take snapshot and save

2011-08-22 Thread Drezden
Another user asked the same question, your best option is probably to
capture the image path in your onActivityResult from the camera and
save this path to the database.  Then you can restore this bitmap
later by loading it through the BitmapFactory using decodeStream.

On Aug 22, 4:45 am, sktniran sktniranjanad...@gmail.com wrote:
 Hi friends,

         i want to take snapshot and save it in database in android.i
 dont have any idea about this. i need some information related to
 this. can anyone please help to start this application?

 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: Question about Button

2011-08-22 Thread Drezden
You can create a selector xml file and place resource references for
all the different states within it, then use the selector.xml file as
your button background.  Here is a push-button example

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_pressed=false android:drawable=@drawable/
global_btn_off /
item android:state_pressed=true android:drawable=@drawable/
global_btn_on /
/selector

There are many more button states available, look it up in the docs.

On Aug 22, 6:58 am, Ash anan...@gmail.com wrote:
 Hi All,

 Wondering if anyone can advice me on the following. I wish to create a
 button which will allow me to have:
 1. a color when the button is disabled
 2. a color when the button is enabled but idle
 3. a color when the button is enabled and pressed
 4. a border which will change color upon some external activity.

 After reading this tutorial 
 (http://blog.androgames.net/40/custom-button-style-and-theme/) I have to able
 to achieve steps 1-3. However, I am struggling to achieve step 4. Also note
 that step 4 will need to happen programmatically as my application
 implements a 3rd party observer which notifies me when a task is active.

 Can someone please guide me on how to achieve step 4. Ideally I would like
 to use the shape that is described in the above link with a border which I
 can control via my code? Please advice.

 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: One User Has a Problem - How do I debug it?

2011-03-02 Thread Drezden
I would think that this user probably has network location and gps
disabled so its throwing a null pointer exception when getting their
last known position.

Check for nulls and display a toast if one is discovered.

On Feb 27, 11:27 am, Jake Colman col...@ppllc.com wrote:
  RK == Rishi Kumar reeesh...@gmail.com writes:

    RK no, its just an interface - the implementation is the
    RK DbLogService that i sent you

 Thanks again.  This will be the first time that I am using a database
 and a content provider so this will be a useful learning exercise as
 well.

 --
 Jake Colman -- Android Tinkerer

-- 
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] Fade a video in/out while playing?

2011-02-22 Thread Drezden
Is it possible to start a video on a standard SurfaceView with the
view's alpha set to 0 and fade it in while the video is playing?

Every time I try to play a video I get a flash of black on the screen
before the video starts.  Any attempts to apply an animation while the
video is playing just seem to be ignored by the SurfaceView.  Any
suggestions?

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@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: Does Android have a LinkButton. Basically like text but you click on it?

2011-02-22 Thread Drezden
Just use a standard button and apply a transparent png as the
background or null the background out.  If you want the button text to
be underlined like a link, just change the text styling.

Should work great.

On Feb 19, 3:33 am, AndroidDevTime androiddevd...@gmail.com wrote:
 Does Android have a link button?

-- 
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] Playing video with an alpha channel

2011-02-16 Thread Drezden
I have a project that requires playing a video with an alpha channel
(transparent background) over the top of a  background image but so
far I can't figure out a way to do it.

Does anyone know if this is possible or not?  I've searched every
possible combination without finding anything useful.

Thanks for your assistance.

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