Re: [android-developers] about intents.

2011-10-01 Thread anik ralhan
http://www.warriorpoint.com/blog/2009/05/24/android-how-to-switch-between-activities/

I think this may help you.


On Wed, Sep 28, 2011 at 6:43 PM, aditi badwe  wrote:

> hi if i am building the basic application for android in main .java
> file in src folder then i have given a button in xml file...after
> clicking on the button how could i go to next screen i.e screen 2??
>
> --
> 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




-- 
*
--
Anik Ralhan*
*3rd year Student *
*Chitkara University*

-- 
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] PhoneGap Camera app

2011-04-22 Thread anik
Hi All,
I'm new to phonegap application.I was making an app using example
given on docs.phonegap for CAMERA for android, I can see the activity
being loaded properly on emulator but when i press the buttons say
"CAPTURE PHOTO" or "From PHOTO ALBUM", i could access further options.
I think may be its emulator so i cannot use device camera but device
photo gallery should open.
Please can anyone guide me What do further.
here is the source code of index.html file.

http://www.w3.org/TR/html4/strict.dtd";>


 
   Capture Photo

   
   

   var pictureSource;   // picture source
   var destinationType; // sets the format of returned value

   // Wait for PhoneGap to connect with the device
   //
   function onLoad() {

document.addEventListener("deviceready",onDeviceReady(),false);
   }

   // PhoneGap is ready to be used!
   //
   function onDeviceReady() {
   pictureSource=navigator.camera.PictureSourceType;
   destinationType=navigator.camera.DestinationType;
   }

   // Called when a photo is successfully retrieved
   //
   function onPhotoDataSuccess(imageData) {
 // Uncomment to view the base64 encoded image data
 // console.log(imageData);

 // Get image handle
 //
 var smallImage = document.getElementById('smallImage');

 // Unhide image elements
 //
 smallImage.style.display = 'block';

 // Show the captured photo
 // The inline CSS rules are used to resize the image
 //
 smallImage.src = "data:image/jpeg;base64," + imageData;
   }

   // Called when a photo is successfully retrieved
   //
   function onPhotoURISuccess(imageURI) {
 // Uncomment to view the image file URI
 // console.log(imageURI);

 // Get image handle
 //
 var largeImage = document.getElementById('largeImage');

 // Unhide image elements
 //
 largeImage.style.display = 'block';

 // Show the captured photo
 // The inline CSS rules are used to resize the image
 //
 largeImage.src = imageURI;
   }

   // A button will call this function
   //
   function capturePhoto() {
 // Take picture using device camera and retrieve image as base64-
encoded string
 navigator.camera.getPicture(onPhotoDataSuccess, onFail,
{ quality: 50 });
   }

   // A button will call this function
   //
   function capturePhotoEdit() {
 // Take picture using device camera, allow edit, and retrieve
image as base64-encoded string
 navigator.camera.getPicture(onPhotoDataSuccess, onFail,
{ quality: 20, allowEdit: true });
   }

   // A button will call this function
   //
   function getPhoto(source) {
 // Retrieve image file location from specified source
 navigator.camera.getPicture(onPhotoURISuccess, onFail,
{ quality: 50,
   destinationType: destinationType.FILE_URI,
   sourceType: source });
   }

   // Called if something bad happens.
   //
   function onFail(mesage) {
 alert('Failed because: ' + message);
   }

   
 
 
   Capture Photo 
   Capture Editable Photo 
   From Photo
Library
   From
Photo Album
   
   
 


-- 
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] Activity Restart On Rotate Phone

2011-04-11 Thread anik ralhan
hey can you please send me the steps that you followed,actually m also
facing the same problem

On Sun, Apr 10, 2011 at 2:56 PM, Me  wrote:

> Hi thanks group > I solved this one 
>
>
>
> On Mon, Apr 11, 2011 at 1:34 AM, TreKing  wrote:
>
>> On Sun, Apr 10, 2011 at 1:12 AM, Jons Jean wrote:
>>
>>> problem is this when I rotate phone its activity got restart , How I can
>>> handle it ?
>>>
>>
>> Read the documentation. This is covered extensively in the life cycle
>> documentation.
>>
>> From google I find the way to handle this to add below line in menifest
>>> fine > I add this line but same problem  ,
>>>  android:configChanges="orientation"
>>>
>>
>> That's a hack around the main problem of saving state. Doing this so that
>> you don't have to save your state will only mask the problem. You may not
>> restart on orientation change, but your app will restart when you press Home
>> and come back to it some time later. You should be able to handle this and
>> switching orientation is the quickest and easiest way to test this.
>>
>>
>> -
>> 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
>
>
>
>
> --
> ---
> Regards :
>Muhammad Nasir Aftab
> ---
>
> --
> 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
>



-- 
*
--
Anik Ralhan*
*3rd year Student *
*Chitkara University*

-- 
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] Re: My first app

2011-04-11 Thread anik ralhan
Yes i did the same and the problem was fixed.Thanks everyone for giving so
many helpful suggestions.


On Sun, Apr 10, 2011 at 11:52 PM, Sven  wrote:

> It seems you started your app from inside the main.xml. then the
> main.out.xml is generated. usualy you have to delete this file, then
> go into a java source and start app from there. it have something to
> do with the eclipse run settings. i hope this helps and was your prob
>
> On Apr 10, 11:31 pm, TreKing  wrote:
> > On Fri, Apr 8, 2011 at 10:29 PM, anik  wrote:
> > > Please see if anyone can fix.
> >
> > Did you try reading the errors and looking at the files / lines they
> > indicate for what could be wrong?
> >
> > > Please reply as early as possible.
> >
> > I hope this is early enough for you!
> >
> >
> -
> > 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
>



-- 
*
--
Anik Ralhan*
*3rd year Student *
*Chitkara University*

-- 
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] My first app

2011-04-10 Thread anik
Hi every one,
I just started with my android application but facing problem when i
build the application or when i run my application.Please see if
anyone can fix.Please reply as early as possible.

this is what is shown at Console Tab on Eclipse IDE.
[2011-04-08 20:26:03 - Golf2] Error in an XML file: aborting build.
[2011-04-08 20:26:03 - Golf2] res\layout\main.xml:0: error: Resource
entry main is already defined.
[2011-04-08 20:26:03 - Golf2] res\layout\main.out.xml:0: Originally
defined here.
[2011-04-08 20:26:03 - Golf2] C:\anroid apps\Golf2\res\layout
\main.out.xml:1: error: Error parsing XML: no element found

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