Snehitha Prasad

Ranch Hand
+ Follow
since Jul 06, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Snehitha Prasad

Hi All,

I am new to android.I have uploaded one photo which is taken in portrait mode.When I am trying to download the file using my application which is coming in the same orientation which I have taken previously.but when i set that image to Imageview using universal Image Loader class I am getting that image with 90 degrees rotated mode.Can somebody give me suggestion how to get out of this issue.

Thanks,
SNEHITHAPRASAD.
10 years ago
Hi All,

I am facing one problem to play the video file which i am getting from the web url.When I trying to read the file from my emulator sd card which is playing without any fail.But when i trying to play the same video which i am getting from the response i am getting the following error.
"android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://scsstaging.s3.amazonaws.com/files/3/1cd0b590-1ee1-0131-b356-001a4b3952d8.m4a?AWSAccessKeyId=AKIAIINYRJPTDJWIYW6Q&Expires=1382645418&Signature=OsgNgWQNOf3qUitM2kLGP3JjJdo= typ=video/m4a }"

For this i am using the following code.
Intent intent = new Intent(android.content.Intent.ACTION_VIEW);

Uri data = Uri.parse("https://scsstaging.s3.amazonaws.com/files/3/1cd0b590-1ee1-0131-b356-001a4b3952d8.m4a?AWSAccessKeyId=AKIAIINYRJPTDJWIYW6Q&Expires=1382645418&Signature=OsgNgWQNOf3qUitM2kLGP3JjJdo");
intent.setDataAndType(data, "video/m4a");
startActivity(intent);


Can any one explain where is i am doing wrong.


Thanks,
SNEHITHAPRASAD.
10 years ago
Hi,

Can anyone explain how to achieve pause and resume functionality while recording in android application.

Thanks,
SNEHITHAPRASAD
10 years ago
Hi All,

I have called an inbuilt Calender Event from an Activity,on executing my code it is redirecting me to device calender from my activity, but i want to redirect to two different activities on save and cancel button clicks of that device calender. But how can i know whether user pressed "Save" button or "Cancel" button in the device calender in my "onActivityResult" method.

Thanks in Advance,
SNEHITHAPRASAD
10 years ago
Hi,

I am working on one small android application.With in that I have a requirement like audio recording with pause and resume options.I searched a lot in the Google,but I couldn't get anything related to that.

Somebody said that there is no default pause and resume functionality in android.

If you want that ,"you need to save that recorded audio file while click on pause button and save into your SD card.And you need to start again from the beginning when you click on resume button.At lost If you want to upload ,then you need to merge all the recorded files as one file then upload it".

I followed his suggestion,but there is no such related code for merging audio files of m4a format available in java/android.

Can anyone suggest me on this.

Thanks,
SNEHITHAPRASAD.
10 years ago
Hi All,

I have a requirement like sending an email from my app.For this I am using default Gmail client.The message sending and all is fine using this.But I have to customize that Gmail client layout.I mean I have to add a my custom header layout to that one.

Can anyone help me on this.How to achieve this.

Thanks in Advance,
SNEHITHAPRASAD.
10 years ago
Hi,

Thanks for your Response.I tried on that way also.But that one also didn't work for me.Can you please tell me any other ideas to fix this issue.

Thanks,
SNEHITHAPRASAD
10 years ago
Hi All,

I have 4 List Views inside my Linear Layout.And these List View items are dynamically generated from my activity class.
The problem is if the first List View content is more, then the page is scrolling without any fail.But after this List View content I am not able to scroll other 3 three List View content.
Can anyone help on this.

This is my layout.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/request_center_relative" >

<include
android:id="@+id/header"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
layout="@layout/headerlayout" />





<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/linear1"
android:layout_below="@+id/header"
android:orientation="vertical">

<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"

android:background="#D8D8D8"

android:paddingLeft="10dp"
android:text="@string/past" />

<ListView
android:id="@+id/listView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

android:scrollingCache="false"


android:divider="#FFFFFF"
android:dividerHeight="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:listSelector="@drawable/layers" >

</ListView>

<TextView
android:id="@+id/textView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"

android:background="#5F9EA0"

android:paddingLeft="10dp"
android:text="@string/today" />
<ListView
android:id="@+id/listView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

android:scrollingCache="false"


android:divider="#FFFFFF"
android:dividerHeight="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:listSelector="@drawable/layers" >

</ListView>
<TextView
android:id="@+id/textView3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"

android:background="#D8D8D8"

android:paddingLeft="10dp"
android:text="@string/thisweek" />
<ListView
android:id="@+id/listView2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

android:scrollingCache="false"


android:divider="#FFFFFF"
android:dividerHeight="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:listSelector="@drawable/layers" >

</ListView>
<TextView
android:id="@+id/textView4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"

android:background="#D8D8D8"

android:paddingLeft="10dp"
android:text="@string/upcoming" />
<ListView
android:id="@+id/listView3"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

android:scrollingCache="false"


android:divider="#FFFFFF"
android:dividerHeight="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:listSelector="@drawable/layers" >

</ListView>
</LinearLayout>

<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/header"
android:background="@drawable/requestheaderlayers"
android:visibility="gone"
>

<TextView
android:id="@+id/uname_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/white"
android:paddingTop="15dp"
android:paddingLeft="10dp" />

<TextView
android:id="@+id/count_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:paddingTop="15dp"
android:paddingLeft="155dp"
android:paddingRight="10dp"
android:textColor="@color/white"
/>
</LinearLayout>






<ImageView
android:id="@+id/cirle_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/linearLayout1"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:background="@drawable/leader_circle"
android:visibility="invisible"/>"

<ImageView
android:id="@+id/avatar_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/scrollView1"
android:layout_centerHorizontal="true"
android:src="@drawable/default_avatar"
android:visibility="invisible" />

<LinearLayout
android:id="@+id/hold_check_boxes"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<ProgressBar
android:id="@+id/progressBarRequestCenter"
android:layout_gravity="center"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />



<include
android:id="@+id/footer"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
layout="@layout/footerlayout" />
</LinearLayout>

</RelativeLayout>


Thanks,
SNEHITHAPRASAD.
10 years ago
Hi,

Thanks for your response.When I go the layout first time which is going to the if condition and created the layout what I get the web-service call and which satisfies my requirement.
But when I scrolled now the control goes to else condition and the view is going to be reused.But I am still wondering,why the background is changed unexpectedly irrespective of the condition.

Can you please suggest on this.

Thanks,
SNEHITHAPRASAD.
11 years ago
Hi All,

I am new to Android.I am developing one small application,with in that I am using a List View and getting the list content from web service call.
for this I am using Base Adapter,with in this I am checking some condition.If the condition is true I am changing the background of the content.If not keeping as it is.

The problem is when I go to this page which is displaying good ,what I have expected.But when I scroll down and up then that background color is applied for the List View content even though which didn't satisfy the condition.

Here is my Adapter Class.


Can anyone give some Idea on this.

Thanks in Advance,
SNEHITHAPRASAD
11 years ago
Hi All,

I have a requirement like convert mp3 file into m4a file.
Can anyone give some idea on this.I have searched in the google.But I couldn't.

Thanks in Advance,
SNEHITHAPRASAD.
11 years ago
Hi ,

No No. It's working fine for merging two audio files which are in mp3 format.But I need for this m4a format.

Thanks,
SNEHITHAPRASAD.
11 years ago
Hi All,

I have a requirement like merging two audio files of type m4a formats.For this I have followed the below code.

FileInputStream fistream1 = new FileInputStream("C:\\Temp\\2.m4a"); // first source file
FileInputStream fistream2 = new FileInputStream("C:\\Temp\\1.m4a");//second source file
SequenceInputStream sistream = new SequenceInputStream(fistream1, fistream2);
FileOutputStream fostream = new FileOutputStream("C:\\Temp\\final.m4a");//destination file

int temp;

while( ( temp = sistream.read() ) != -1)
{
// System.out.print( (char) temp ); // to print at DOS prompt
fostream.write(temp); // to write to file
}
fostream.close();
sistream.close();
fistream1.close();
fistream2.close();

When I execute this one only the content of first file is getting as final.m4a. In case of mp3 format which is working good.But I need m4a files merging.

Can anyone please help me on this.

Thanks in Advance,
SNEHITHAPRASAD.
11 years ago
Hi All,

I have a requirement like merging two audio files of type m4a formats.For this I have followed the below code.

FileInputStream fistream1 = new FileInputStream("C:\\Temp\\2.m4a"); // first source file
FileInputStream fistream2 = new FileInputStream("C:\\Temp\\1.m4a");//second source file
SequenceInputStream sistream = new SequenceInputStream(fistream1, fistream2);
FileOutputStream fostream = new FileOutputStream("C:\\Temp\\final.m4a");//destination file

int temp;

while( ( temp = sistream.read() ) != -1)
{
// System.out.print( (char) temp ); // to print at DOS prompt
fostream.write(temp); // to write to file
}
fostream.close();
sistream.close();
fistream1.close();
fistream2.close();

When I execute this one only the content of first file is getting as final.m4a. In case of mp3 format which is working good.But I need m4a files merging.

Can anyone please help me on this.

Thanks in Advance,
SNEHITHAPRASAD.

11 years ago
Hi All,

I have requirement like convert HTML file into J son string.Here here is the HTML file

<!DOCTYPE html><html><head><title>Redirecting...</title><script type="text/javascript" language="javascript">var url = 'https:\/\/www.google.com\/accounts\/ServiceLogin?service\x3dwise\x26passive\x3d1209600\x26continue\x3dhttps:\/\/drive.google.com\/?authuser%3D0%23__HASH__\x26followup\x3dhttps:\/\/drive.google.com\/?authuser%3D0\x26ltmpl\x3ddrive'; var fragment = ''; if (self.document.location.hash) {fragment = self.document.location.hash.replace(/^#/,'');}url = url.replace(new RegExp("__HASH__", 'g'), encodeURIComponent(fragment));window.location.assign(url);</script><noscript><meta http-equiv="refresh" content="0; url='https://www.google.com/accounts/ServiceLogin?service=wise&passive=1209600&continue=https://drive.google.com/?authuser%3D0&followup=https://drive.google.com/?authuser%3D0&ltmpl=drive'"></meta></noscript></head><body></body></html>

Can anyone help me how to convert this HTML file to J SON string.

Thanks in Advance,
SNEHITHAPRASAD

11 years ago