[android-developers] camera activity problem in different android devices

2011-06-01 Thread Siva Kannabiran
in my app i am using the camera activity to capture an image and i want to
upload the image to a server by getting it's path. I have created an
External Storage Directory of my own and i am storing the images in that
folder. The problem is when i run my app in a Motorola device the image gets
captured and stored in the correct folder and it gets uploaded.

But when i run the app i an HTC device, the image gets captured and the
folder is created but the image gets stored in some other folder and because
of that image is not uploaded and gets crashed...

Following is my code

public void startCamera()
{
 Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
 File folder = new File(Environment.getExternalStorageDirectory() +
"/Images");
 boolean success = false;
 if(!folder.exists())
 {
success = folder.mkdir();
 }
 final Calendar c = Calendar.getInstance();
 path = "/sdcard/Images/"+timeStampFormat.format(new Date())+".jpg";
 File photo = new File(path);
 intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(photo));
 Uri imageUri = Uri.fromFile(photo);
 startActivityForResult(intent, TAKE_PICTURE);
}
  @Override
public void onActivityResult(int requestCode, int resultCode, Intent
data)
{
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode)
{
case TAKE_PICTURE:
if (resultCode == Activity.RESULT_OK)
{
Log.e("resultCode","Activity Result "+path);
String image = path;
FileUploader(path);
}
super.onActivityResult(requestCode, resultCode, data);
}
}

Why such a problem appears, i afraid that the same problem may occur in all
android devices, how to over come this problemPlease help me friends


-- 
Siva Shankar K

-- 
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 get the captured images name and location in android device

2011-06-01 Thread Siva Kannabiran
in my app i am capturing an image and when i am seeing the preview of the
image, in every android device it may give default options such as "done and
retake" or "done, retake, cancel". When i click the done button i want the
captured image to be uploaded. I have written the uploaded part in my
OnActivityResult part.

But for the above said, i want to know where the image gets stored and in
what name it was stored, so for this i created an external directory and the
name to be stored as an time stamp format. This idea worked successfully in
some devices only.

In some devices the folder may get created but the image gets stored in some
other place with some other name and because of this my app gets crashed.

How to overcome this problem please help me friends..

-- 
Siva Shankar K

-- 
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] BPM calculation in Android

2011-02-03 Thread Siva Kannabiran
hi i am new to android programming.
can anyone help me in knowing about the bpm calculation 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


Re: [android-developers] Facebook and twitter integration

2011-04-17 Thread Siva Kannabiran
Hi Laxmi,

To integrate your app with facebook use the fbconnect API, just search in
google you will get the instruction to integrate and the fbconnect jar file.
To integrate with twitter you can just use the following url "
http://mobile.twitter.com/home?status="+share";.

In order to share your article in twitter you can follow the way explained
for facebook.

On Sat, Apr 16, 2011 at 11:29 AM, Laxmi Verma
wrote:

> Hi,
>
> I want to integrate facebook and twitter into my android app.  Everwhere I
> found the code of showing the dialog box of facebook and twitter login and
> then posting the content from there.
> What I want to do is, on twitter or facebook button click it should forward
> to twitter site for e.g. m.twitter.com and my article id should get
> displayed in the tweet box (twitter) or walll post box (facebook) in the
> site directly.
> Just like it has done in ndtv app.
> Please do help in this.
>
> Thanks & Regards,
> Laxmi Verma
>
> --
> 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




-- 
Siva Shankar K

-- 
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 show an activity only at the time of launch

2011-04-17 Thread Siva Kannabiran
i have created an app, there i have an activity for registration purpose. I
want the particular activity to be shown for the the first time when the app
is been launched in a device and in the next time of use the activity should
not be viewed. How to do this, please help me with an example code

-- 
Siva Shankar K

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

Re: [android-developers] how to show an activity only at the time of launch

2011-04-18 Thread Siva Kannabiran
Hi friends,

thanks for your replies.


On Mon, Apr 18, 2011 at 5:27 PM, lbendlin  wrote:

> just imagine your user launches the app and then registers and then deletes
> the app (or clears out the data because they feel especially mean). Next
> time they launch they will have to register again etc etc. Nikolay's method
> clearly is best as the registration information is stored in the interwebs.
> It could get a little complicated when the user consciously decides to
> unregister and reregister every day. But hey, you can't please 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
>



-- 
Siva Shankar K

-- 
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] problem in pie chart coding

2011-04-18 Thread Siva Kannabiran
in my app i am trying to show a pie chart. When i was searching through
google i found an sample code in the following link

http://blog.gafmediastudio.com/2010/04/01/draw-a-pie-chart-with-android/comment-page-1/#comment-3899

the code is very useful but i have a problem in the code. They have used
random colors and random number of counts in the pie chart. So i changed it
to the number of counts i need but i am not able to change the color. How to
change the color please help me. Following is the main activity code

public class MainActivity extends Activity
{

List PieData = new ArrayList(0);

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

PieDetailsItem Item;
Random mNumGen  = new Random();
int MaxPieItems = 3;
//mNumGen.nextInt(20);
int MaxCount  = 0;
int ItemCount = 0;

for (int i = 0; i < MaxPieItems ; i++)
{
ItemCount  = 3;
//mNumGen.nextInt(256);
Item   = new PieDetailsItem();
Item.Count = ItemCount;
Item.Label = "Valeur " + 3;

//mNumGen.nextInt(1000);

  Item.Color = 0xff00 +256*256*mNumGen.nextInt(256) +
256*mNumGen.nextInt(256) + mNumGen.nextInt(256);

//+ 1 + 256*2 + 3;
PieData.add(Item);
MaxCount += ItemCount;
}


int OverlayId = R.drawable.cam_overlay_big;

int Size = 120;

int BgColor = 0xffa1a1a1;

Bitmap mBackgroundImage = Bitmap.createBitmap(Size, Size,
Bitmap.Config.RGB_565);

View_PieChart PieChartView = new View_PieChart( this );
PieChartView.setLayoutParams(new LayoutParams(Size, Size));
PieChartView.setGeometry(Size, Size, 8, 8, 8, 8, OverlayId);
PieChartView.setSkinParams(BgColor);
PieChartView.setData(PieData, MaxCount);
PieChartView.invalidate();


PieChartView.draw(new Canvas(mBackgroundImage));
PieChartView = null;

ImageView mImageView = new ImageView(this);
mImageView.setLayoutParams(new
LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
mImageView.setBackgroundColor(BgColor);
mImageView.setImageBitmap( mBackgroundImage );

LinearLayout TargetPieView =  (LinearLayout)
findViewById(R.id.pie_container);
TargetPieView.addView(mImageView);
}
}


the line which is marked in red text is the place to mention the color for
the pie chart. please help me
-- 
Siva Shankar K

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

Re: [android-developers] problem in pie chart coding

2011-04-18 Thread Siva Kannabiran
i have tried already what you said  but the pie chart appears to be a blank
without any color, that's why came here for help.

Following is the line which i have tried out,

  Item.Color = 0xff00 + 0xff228b22 + 0xff + 0xffa500;

On Mon, Apr 18, 2011 at 6:41 PM, TreKing  wrote:

> On Mon, Apr 18, 2011 at 7:46 AM, Siva Kannabiran 
> wrote:
>
>> How to change the color please help me.
>
>
> Change the line you colored red to set the color to what you want instead
> of picking something at random. What's the problem?
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Siva Shankar K

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

Re: [android-developers] problem in pie chart coding

2011-04-18 Thread Siva Kannabiran
Ok what should i have to give.

On Mon, Apr 18, 2011 at 8:59 PM, Marcin Orlowski
wrote:

>
> On 18 April 2011 17:26, Siva Kannabiran  wrote:
>
>> i have tried already what you said  but the pie chart appears to be a
>> blank without any color, that's why came here for help.
>>
>> Following is the line which i have tried out,
>>
>>   Item.Color = 0xff00 + 0xff228b22 + 0xff + 0xffa500;
>>
>
> This line makes no sense at all. See what you got in result then it shall
> be clear why it does not work.
>
> Regards,
> Marcin Orlowski
>
> *Tray Agenda <http://bit.ly/trayagenda>* - keep you daily schedule
> handy...
> *Date In Tray* <http://bit.ly/dateintraypro> - current date at glance...
> WebnetMobile on *Facebook <http://webnetmobile.com/fb/>* and 
> *Twitter<http://webnetmobile.com/twitter/>
> *
>
>  --
> 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
>



-- 
Siva Shankar K

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

Re: [android-developers] problem in pie chart coding

2011-04-18 Thread Siva Kannabiran
The colors which i need are green blue and red

i tried using the following line but the result is to be the same
Item.Color = 0xff00+ 0x5BC639 + 0xC6393C + 0x3D39C6;

and i tried the following lines and it shows error in the values

Item.Color = 0xff00+ 5BC639 + C6393C + 3D39C6;
Item.Color = 0xff00+ #5BC639 + #C6393C + #3D39C6;


On Mon, Apr 18, 2011 at 10:17 PM, TreKing  wrote:

> On Mon, Apr 18, 2011 at 10:26 AM, Siva Kannabiran 
> wrote:
>
>> Following is the line which i have tried out,
>>
>>   Item.Color = 0xff00 + 0xff228b22 + 0xff + 0xffa500;
>>
>
> Why ... why would you do this?
>
> Just decide what color you want, figure out it's hex value (plenty of
> online tools to do this if you google) and use that.
>
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Siva Shankar K

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

Re: [android-developers] problem in pie chart coding

2011-04-18 Thread Siva Kannabiran
The following is the original code line
Item.Color = 0xff00 +256*256*mNumGen.nextInt(256) +
256*mNumGen.nextInt(256) + mNumGen.nextInt(256);

for this line the output will be as the attached file image1.png.

Now i am trying to change the colors to be as green, blue and red. I am not
able change it.



On Mon, Apr 18, 2011 at 11:34 PM, TreKing  wrote:

> On Mon, Apr 18, 2011 at 12:57 PM, Siva Kannabiran 
> wrote:
>
>> The colors which i need are green blue and red
>
>
> Wait ... are you expecting to set *one* color attribute to 3 different
> colors at the same time?
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Siva Shankar K

-- 
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 set text color in array adapter in android

2011-04-20 Thread Siva Kannabiran
in my app i have created a list view and added some text in the list. In my
coding part the text are been added as an array adapter to have a check box.
In the layout i have given a white color for the list view because of this
the text appear to be very dull. How to set the text color to be as black.

i have placed the list view in layout file and placed the values for text
view in coding. the following is the part of my coding


names = new String[] { "Sequenced","Random" };
list1 = (ListView) findViewById(R.id.cardlist);
list1.setAdapter(new ArrayAdapter(this,
android.R.layout.simple_list_item_checked,names));

list1.setChoiceMode(ListView.CHOICE_MODE_SINGLE);

list1.setItemChecked(0,true);


please help me.



-- 
Siva Shankar K

-- 
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] parsing an image from an xml file from a network

2011-04-23 Thread Siva Kannabiran
in my app  when i click a button it goes on to a url and it returns back an
xml file. The xml file recieved is opened in a new activity called B as a
list view. The xml file is as follows

  
  1
  Raj
  Kan
  38
  129
  Apr 15, 2011
 
http://demo.greatinnovus.com/restingspot/img/add_photo.png
  
  
   2
   R
   R
   37
   122
   Apr 15, 2011
   
http://demo.greatinnovus.com/restingspot/img/add_photo.png
  


>From this xml file i am listing out all the first name's in activity B. When
i click on any of the first name i am moving on to a new activity C where i
want to display the last name,dob of the selected first name. In activity C
i have a button image. When i click on it i am moving to a new activity D
where i want to show the image of the selected first name.

How to do this, please help me.

-- 
Siva Shankar K

-- 
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 draw a route and get the image of a map

2011-05-07 Thread Siva Kannabiran
In my app I am showing a map activity, with a marker marking the current
location.

I have placed two buttons Start and Stop. When the start button is clicked I
want to start tracking the users location, drawing a line over streets that
are travelled along.

When the stop button is pressed, that location is been marked up with a
different marker. I want to capture an image of the map, including the
markers and the route travelled. I'd like to store the image in the
database.

I have marked the two points with different markers, now I want to draw the
direction and capture the image. Can anybody help me figure out how to do
this?


-- 
Siva Shankar K

-- 
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 place a button inside the map view

2011-05-07 Thread Siva Kannabiran
in my app i am using the view flipper. One side of the flip i have placed
some text and edit text view. In the other part of the flip i have the map
view.

To flip between these two views i am using the swipe concept. I am able to
swipe from the text view to the map view. But to get back to the text page
from view i decided to place a button in the in the map view but still, the
button is not visible.

Following is my layout of the view flipper


 
  
  

  




 
   
   

  
  





how to get the button to be visible. Please help me

-- 
Siva Shankar K

-- 
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 show visualizations in an android app

2011-05-08 Thread Siva Kannabiran
how to show some visualizations such as bar, scope or album art as like in
the windows media player according to the song that gets  played in an app.

Is it possible to show visualizations  according to the latitude longitude
that's getting changed while moving from one place to the other.

Can anybody tell me how I would go about achieving this?

-- 
Siva Shankar K

-- 
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] problem in parsing two xml files

2011-03-09 Thread Siva Kannabiran
I am a new developer. In my app I am trying to parse two xml files. The
first xml file contains some list of data as follows:




A
B




The data will be showed in a listview manner. When I touch A it moves to B,
and when I touch B it moves over to the next XML file:




ABC
abc
QWE
abc


I want view the second xml file to be an String.

Here I want to do a flip order; the question must be one side and the answer
must be of other side.

Now the problem is that I am getting the first XML file correctly but the
later one is not getting parsed. Should i have to create a separate for list
XML handler file for both  xml files. I have placed both the xml files in
res->raw and its beeen mentioned in the coding as:

//getting the path of xml to parse
inputstream = this.getResources().openRawResource(R.raw.list);
resID = getResources().getIdentifier(name, "raw", "com.gis.flash");

Can anyone explain me what errors I have committed and how to parse two xml
files ?
-- 
Siva Shankar K

-- 
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] parsing only one tag from an XML file at a time

2011-03-30 Thread Siva Kannabiran
hi in my app i am parsing two xml files both stored in my projects
resource folder. I have parsed both of my files.
The first file must be viewed as a listed one and i have done it. My
second xml file consists of a tag named as .
i am able to count the size ie number of tags named as info. Among
those total number i want to randomly select only one and i want that
one to be viewed at a time.

i have also placed two buttons named as front and back, which helps me
to move further info tags

how to proceed this... if you can pls explain me with an example

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