[android-developers] Serialization/De-Serialization

2012-10-14 Thread Rajiv Singh
Hi there,
I am creating an app to find duplicate files .. i am using
ArrayListFile to hold all File Objects. I am creating this arraylist
in a service and want to pass this arraylist to another Activity. For
this i am serializing the ArrayList to a file :-

public void serializeList()  {
String fname = filelist.bin;
//File dir = getDir(DFR, MODE_PRIVATE);
try {
 fos = openFileOutput(fname, MODE_PRIVATE);
obs = new ObjectOutputStream(fos);
obs.writeObject(sOnlyFiles);
obs.flush();
obs.close();
fos.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

i am able to fetch the file from app's private directory in the
onCreate() method of my ListActivity :-

protected void onCreate(Bundle savedInstanceState) {

stopService(new Intent(this, BgService.class));

//  deserializeList();
   // i am fetching all the files from the app's
local directory and this is executing successfully
File file[] = getFilesDir().listFiles();

for(int i=0;ifile.length;i++){
Toast.makeText(getApplicationContext(), 
file[i].getName()+
+file[i].length(), 2000).show();
}
//  stopService(new Intent(this, BgService.class));
//setListAdapter(new OnlyFilesAdapter());
//Bundle filelist = getIntent().getExtras();
super.onCreate(savedInstanceState);


}

i am deserializing to get back the ArrayList and feeding that to
BaseAdapter for displaying the result in ListActivity:-
public void deserializeList(){
Object tolist =null;
String filename = filelist.bin;
//File dir = getDir(DFR, getApplicationContext().MODE_PRIVATE);
try {

fis = openFileInput(filename);  /*** here i am
getting error***/

if(fis!=null){
obs = new ObjectInputStream(fis);
tolist = obs.readObject();
@SuppressWarnings(unchecked)
ArrayListFile tolist2 = (ArrayListFile)tolist;
ListoFiles = tolist2;
obs.close();
fis.close();
Toast.makeText(getApplicationContext(), 
ListoFiles.size(),
5000).show();
}else
Toast.makeText(getApplicationContext(), file not 
available,
2000).show();
} catch (Exception e) {

}

on deSerializing i am getting following error :-
java.lang.RuntimeException: Unable to start activity
ComponentInfo{my.com.filebrowser/my.com.filebrowser.AllFiles}:
android.content.res.Resources$NotFoundException: String resource ID
#0x7e5

please help me getting out of this ...

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: SMS/MMS Default App source code into Eclipse?

2012-08-29 Thread Rajiv Singh
can u please provide me link to those repositories !! i m also working to 
modify default sms Application !!

On Friday, 11 May 2012 02:34:53 UTC+5:30, Ginzorf wrote:

 Greetings all, 

 I'm attempting to make some slight modifications to the SMS/MMS 
 application that comes included with Android. I've found a couple 
 repositories, but downloaded the code from GitHub. 

 However, when I try to build a new solution from the existing source, 
 it says it can't find the manifest even though it's in the same 
 folder, etc. Also, the AndroidManifest doesn't appear to have a min- 
 sdk listed in it? Do I add this? 

 I basically, for starters, just want to deploy the code from eclipse 
 to my phone and verify that it works just like my Text / MMS 
 application that I use all the time. Then I'll make my modifications. 

 But I'm having a heck of a time getting this started. Any ideas?

-- 
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 create Object in OpenGL ( Problem one object is overlapping on the other object )

2011-09-06 Thread rajiv
Dear all ,

I am facing one problem in openGL i have drawn two object but i am
unable to see the another objects .

i have created a disc with one hole on it  i want to place it on
tower , but when i place the disc I am ubale to see the tower .
Please help me out

-- 
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] opengl( how to move the objects )

2011-08-20 Thread rajiv
The problem is
switch (e.getAction())
{
case MotionEvent.ACTION_DOWN:
x=e.getX();
y=e.getY();
requestRender();
break;
case MotionEvent.ACTION_UP:
a=e.getX();
b=e.getY();
requestRender();
break;
}


Here the value of X and y and a  b are same but when it is Action_up
the co-ordinate of X Y  ab  should be different  Please 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: Missing ACTION_POINTER_UP and ACTION_POINTER_DOWN events

2011-08-20 Thread rajiv


Hi I am facing a similar problem what i am doing in my application is
I am trying to move the disc from one place to another place

switch (e.getAction())
{
case MotionEvent.ACTION_DOWN:
x=e.getX();
y=e.getY();
requestRender();
break;
case MotionEvent.ACTION_UP:
a=e.getX();
b=e.getY();
requestRender();
break;
}


but the problem is the value of x y  a.b are equall so trhe disc is
not moving at all it is blinking and the disc is coming in the same
place please 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] opengl( how to move the objects )

2011-08-18 Thread rajiv
Hi friends I am trying to develop the tower of  honoi by using android
opengl the problem is i need to move the disc from  sorce to
destination how can i do  that in opengl

-- 
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] Shape having two sided border

2011-06-16 Thread Rajiv
Use the following shape tag:

 padding android:left=1dp
android:top=0dp
android:right=1dp
android:bottom=0dp
/

On Thu, Jun 16, 2011 at 12:06 PM, Sapna Srivastav sapna.ari...@gmail.comwrote:

 Hi all.

 I would like to create a layout having a shape that has border only on
 2 sides:
 left and right, i.e. I want top and  bottom to be open.  How can I
 achieve that
 defining shape in XML?

 Currently I have a normal 4 side border using the following shape XML
 definition:

 ?xml version=1.0 encoding=utf-8?
 shape xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent


solid android:color=#FF
   /

stroke android:width=1dp
android:color=#FF
/

padding android:left=1dp
 android:top=1dp
 android:right=1dp
 android:bottom=1dp
 /
 /shape

 Please help, its urgent.
 Thanks in advance.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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] unable to connect to the repository

2010-12-16 Thread rajiv
hi i have downloaded eclipse from eclipse if i tried to install adt
pluggin it is saying unable to connect to repository please 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


Re: [android-developers] Set wallpaper as background

2010-06-03 Thread Rajiv
You can also do it as:


WallpaperManager wlp = WallpaperManager.getInstance(*this*);

Drawable d = wlp.getDrawable();

textView.setBackgroundDrawable(d);
Regards,
Rajiv

On Thu, Jun 3, 2010 at 11:47 AM, Ericson, Anders 
anders.eric...@sonyericsson.com wrote:

 Hi,

 In your AndroidManifest.xml you can add this to your activity:
 android:theme=@android:style/Theme.Wallpaper

 /Anders

 -Original Message-
 From: android-developers@googlegroups.com [mailto:
 android-develop...@googlegroups.com] On Behalf Of AndroidNewbie
 Sent: den 3 juni 2010 05:49
 To: Android Developers
 Subject: [android-developers] Set wallpaper as background

 Hi ,

 I want to set current wallpaper as my application background . Any
 ideas to do it through XML or Java 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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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

Re: [android-developers] Re: List of all instantiated Activities

2010-06-03 Thread Rajiv
You can implement this in your application by using following way:
1) You need a class that handle all the application (Say Handller)
 In Handller class you can create a method that create List and add list
into it.
 For example
 Class Handller{
  List list;
  //Some Housekeeping
  setActiveActivity(Activity activity){
   if(list.equals(null)){
//create list
   }
   else{
list.add(activity)
   }
  }
  List getActivity(){
   return list;
  }

 }
2) You need an Activity (say ActiveActivity) that extends Activity
 ex:
  public class ActiveActivity extends Activity {
 protected void onResume() {
 super.onResume();

 Handller.setActiveActivity(this);  //you need to take an instance
of Handler Class.
 }
 }

3) Now you can add all your activity in list by extending ActiveActivity.
 ex.
 public class ActivityA extends ActiveActivity {
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(...);
 }
4) You can get All Activities by using Handler getActivity().



Regards,
Rajiv

On Thu, Jun 3, 2010 at 2:39 PM, Ted Neward ted.new...@gmail.com wrote:

 Assume I have an app that, although 95% of the time it will be used by a
 single user, will occasionally be passed to a supervisor or somebody
 similar
 who will do a logout/login/do-some-activity/logout cycle before handing it
 back to the original employee using the device. On a logout, I'd like to
 kill/finish all the running activities (allowing them to do their cleanup),
 then essentially start fresh without having to litter all the activities
 with calls to specifically test to see if we've done a logout since the
 last
 time we were brought to the front of the user's attention.

 Alternatively, I could just kill the process (I'm assuming a System.exit()
 works), but that would have the undesirable effect of bringing the user
 back
 to the Home screen and forcing them to select the app, which from a UX
 perspective feels awkward and amateurish.

 There's also the diagnostician in me that wants to be able to find all open
 Activities and finish() them if we get a low-memory signal, but that's
 really a distant second to the above use case.

 Ted Neward
 Java, .NET, XML Services
 Consulting, Teaching, Speaking, Writing
 http://www.tedneward.com

   -Original Message-
  From: android-developers@googlegroups.com [mailto:android-
  develop...@googlegroups.com] On Behalf Of Romain Guy
  Sent: Wednesday, June 02, 2010 1:26 AM
  To: android-developers@googlegroups.com
  Subject: Re: [android-developers] Re: List of all instantiated
  Activities
 
  Let's step back a little bit. Ted, what is it you are trying to do?
 
  On Wed, Jun 2, 2010 at 1:24 AM, Guillaume Perrot
  guillaume.p...@gmail.com wrote:
   I already made something similar (limited to the current activity)
  and
   I did not find another way to access the activity instance.
   To limit errors, I made my modifications in life cycle callbacks and
   users have to inherit my Activity classes (I made a full set for
   convenience, there are 9 Activity types) instead of the standard
  ones.
   You could place your code in onCreate, if they inherit your class
  they
   can't miss it.
   Of course the developer still have to ensure it does not miss an
   inheritance change but it's easier than adding a snippet of code
   everywhere and more object friendly.
  
   On 2 juin, 08:35, Ted Neward ted.new...@gmail.com wrote:
   Anybody know an easy way for an app to find all the instances of all
  the
   Activities currently alive in the current process?
  
   Yes, I could register each one into a static List someplace from
  the
   constructor of each Activity, but that requires developers to
  remember to
   put that code into every Activity constructor, which is going to
  eventually
   miss one or two (not to mention keep the Activity alive longer than
  it
   should be, though that could be fixed by holding WeakReferences
  instead of
   strong ones, but that still misses the point), and that's going to
  mean one
   or two escape the list. I'd prefer to have a way to see all of them
  from
   Android's/Dalvik's point of view.
  
   Ted Neward
  
   Java, .NET, XML Services
  
   Consulting, Teaching, Speaking, Writing
  
http://www.tedneward.comhttp://www.tedneward.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-
  develop...@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en
  
 
 
 
  --
  Romain Guy
  Android framework engineer
  romain...@android.com
 
  Note: please don't send private questions to me, as I don't have time
  to provide private support.  All

Re: [android-developers] Problem when turning the phone

2010-06-03 Thread Rajiv
Hi,

You can reseted the value of the Text by using onConfigurationChanged method
of the Activity.
ex.
 public void onConfigurationChanged(Configuration newConfig) {
 super.onConfigurationChanged(newConfig);
 //setContent
 }

If you dont want Landscape mode(Horizontal to Vertical) changes you need to
add *android:screenOrientation=portrait*  to the particular activity in
the manifest file.
 Ex.
  activity android:name=.SomeActivity
android:label=@string/app_name
android:screenOrientation=portrait

Regards,
Rajiv
On Thu, Jun 3, 2010 at 6:02 PM, Patrick patrick.manges...@gmail.com wrote:

 Hallo!

 I currently have the following issue: when my app is running and the
 phone is turned from a vertical into a horizontal position (or back)
 all the stuff I changed in the UI is reseted to the plain layout.xml.
 I mean the views that changed their visibility are back to the
 original one and even the text of textviews is reseted to the value
 specified in the layout.xml. Is there a way or concept that I missed
 to tell activities (or the UI elements) to keep their status?

 Thanks
 Patrick

 --
 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.comandroid-developers%2bunsubscr...@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

Re: [android-developers] Handling Orientation Changes that occur in another Activity

2010-06-03 Thread Rajiv
Hi Jeff,

I think your Browser won't get refressed.
You need to make changes in *onConfigurationChanged* in that Activity.

Regards,
Rajiv


On Thu, Jun 3, 2010 at 6:41 PM, Jeff jeff.th...@gmail.com wrote:

 I am having an interesting problem and would appreciate any advice. My
 app uses WebView as its primary view. Using a javascript hook, it can
 launch the camera so the user can take a picture. The camera is
 launched using

 Intent i = new
 Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

 When the camera starts, it makes sense to use landscape mode, so the
 user naturally turns the phone on its side. After the user takes a
 picture, control returns to my launching Activity (actually, my
 Acitivity gets restarted because it usually gets destroyed to free up
 memory for the camera on my Moto Droid). When my WebView gets
 recreated, I restore its state from the Bundle I saved in
 onSaveInstanceState().

 Now everything looks ok, except the phone is still in landscape mode.
 However, when the user turns the phone upright bringing back into
 portrait mode, my WebView takes up only half of the screen. Somewhere
 along the way, the scale of my WebView got lost. This seems like such
 a minor issue, but it is driving me crazy.

 Does anyone have an idea why this might be happening? What is the
 correct way to preserve the scale of my WebView? I am hesitant to hard
 code any scale factors because what looks good on my device may not be
 the same for another.

 Thanks,
 Jeff

 --
 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.comandroid-developers%2bunsubscr...@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

Re: [android-developers] Handling Orientation Changes that occur in another Activity

2010-06-03 Thread Rajiv
Hi Jeff,
When you change the Phones orientations Activity onConfigurationChanged
method got called, so you need to make changes in there.
for ex.
public void onConfigurationChanged(Configuration newConfig) {
 super.onConfigurationChanged(newConfig);
 //get Instance of the Browser say browser
 //set Content to the Browser
}

Regards,
Rajiv

On Thu, Jun 3, 2010 at 6:54 PM, Jeff Thorn jeff.th...@gmail.com wrote:

 Hi Rajiv,
 What changes should I make? I am saving the state in onSaveInstanceState
 and I am restoring the state in onCreate. I would think that the Bundle I
 saved the state to should preserve all the WebView settings, but that does
 not appear to be the case.

 Jeff

   On Thu, Jun 3, 2010 at 9:19 AM, Rajiv rajiv...@gmail.com wrote:

   Hi Jeff,

 I think your Browser won't get refressed.
 You need to make changes in *onConfigurationChanged* in that Activity.

 Regards,
 Rajiv


 On Thu, Jun 3, 2010 at 6:41 PM, Jeff jeff.th...@gmail.com wrote:

 I am having an interesting problem and would appreciate any advice. My
 app uses WebView as its primary view. Using a javascript hook, it can
 launch the camera so the user can take a picture. The camera is
 launched using

 Intent i = new
 Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

 When the camera starts, it makes sense to use landscape mode, so the
 user naturally turns the phone on its side. After the user takes a
 picture, control returns to my launching Activity (actually, my
 Acitivity gets restarted because it usually gets destroyed to free up
 memory for the camera on my Moto Droid). When my WebView gets
 recreated, I restore its state from the Bundle I saved in
 onSaveInstanceState().

 Now everything looks ok, except the phone is still in landscape mode.
 However, when the user turns the phone upright bringing back into
 portrait mode, my WebView takes up only half of the screen. Somewhere
 along the way, the scale of my WebView got lost. This seems like such
 a minor issue, but it is driving me crazy.

 Does anyone have an idea why this might be happening? What is the
 correct way to preserve the scale of my WebView? I am hesitant to hard
 code any scale factors because what looks good on my device may not be
 the same for another.

 Thanks,
 Jeff

 --
 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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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

Re: [android-developers] Regarding enter key on virtual keyboard

2010-06-03 Thread Rajiv
Hi ameya,
I think u may have did little bit mistake in your application, if you will
implement these things in the following way, offcource you will got the
solution.

Suppose you are using Layout as *account* and Activity as *AccountActivity*,
you need to do the following modification in there

account.xml
 ?xml version=1.0 encoding=UTF-8?
 LinearLayout
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:orientation=vertical
  android:layout_width=fill_parent
  android:layout_height=fill_parent


  ScrollView
   android:layout_width=fill_parent
   android:layout_height=wrap_content
  RelativeLayout
   android:orientation=vertical
   android:layout_width=fill_parent
   android:layout_height=wrap_content
   android:gravity=left


   TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:paddingTop=4dip
android:paddingLeft=4dip
android:text=Email address:
android:id=@+id/emailtext/

EditText
android:id=@+id/email
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginLeft=8dip
android:layout_marginRight=8dip
android:hint=Your email address
android:inputType=textEmailAddress
android:layout_below = @id/emailtext/

   TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:paddingTop=4dip
android:paddingLeft=4dip
android:text=Password:
android:id=@+id/passwdtext
android:layout_below = @id/email
/

EditText
android:id=@+id/password
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginLeft=8dip
android:layout_marginRight=8dip
android:hint=Your password
android:inputType=textPassword
android:layout_below = @id/passwdtext/


   TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:paddingTop=2dip
android:id=@+id/space1
android:layout_below = @id/password
/
   Button
android:id=@+id/validate
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=continue
android:layout_below = @id/space1
android:layout_centerInParent = true/
  /RelativeLayout
  /ScrollView
 /LinearLayout


AccountActivity

 //package
 //import


 public class AccountActivity extends Activity implements OnClickListener,
AlertDialog.OnClickListener {


 private EditText userNameEditText;
 private EditText passwordEditText;

 private Button validateAccountButton;

 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);

  setContentView(R.layout.account);

 userNameEditText = (EditText) findViewById(R.id.email);
 passwordEditText = (EditText) findViewById(R.id.password);

 validateAccountButton = (Button)
findViewById(com.skyscape.packageajccsevenektwondata.android.voucher.ui.R.id.validate);
 validateAccountButton.setOnClickListener(this);

 }


 public void onClick(View view) {
 if (view == validateAccountButton) {
   validate();
 }
 }

 protected void validate() {
//Validate your Account
 }

 public boolean onKeyDown(int keyCode, KeyEvent event) {
  return super.onKeyDown(keyCode, event);
 }


 }

If you implement in this way, i think you will got your desired result.
Let me know if you still have doubt.

Regards,
Rajiv


On Thu, Jun 3, 2010 at 7:17 PM, ameya dandekar ameya...@gmail.com wrote:

 Hi,
 I am currently working on sdk 1.5, in which i want capture the Click event
 of Enter key on Virtual Keypad.
 My requirement is, for my Username/Password Login screen. Click on Username
 field. Cursor is displayed in Text entry box. Click on Enter key on Virtual
 Keypad. Cursor should be displayed in Password field. Take the cursor in
 Password field. Click on Enter key on Virtual Keypad. Virtual Keypad should
 be closed.
 I am testing the app on HTC Magic.

 Regards,
 Ameya.

 --
 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.comandroid-developers%2bunsubscr...@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

Re: [android-developers] Re: Deleting An Application with ContentProvider Other Applications not working

2010-03-24 Thread Rajiv
Hi Kantesh,

Thanks for the reply.

Yes i have used the cursor in the following way:

  Uri allTitles = Uri.*parse*(com.sky.android.project.projectname/data
);

 Cursor c = managedQuery(allTitles, *null*, *null*, *null*, username
desc);
 c.close();

Regards
Rajiv

On Tue, Mar 23, 2010 at 10:23 PM, Kantesh kantesh@gmail.com wrote:

 hi,
 If u r using cursor, r closing after done with that?

 On Mar 23, 7:11 pm, Rajiv rajiv...@gmail.com wrote:
  Hi all
  I have a problem to uninstalling the product in android.
  I have used *ContentProvider* to share data in multiple applications. I
  used  in Android Manifest file
   *provider android:name=Provider
   android:authorities=com.sky.android.project.projectname/
  *
   and uri in Provider Class file
   Uri uri = com.sky.android.project.projectname/data
 
   It is working fine to Insert, delete and update in the application.
 
  In other application I have used the
 
   Uri allTitles = Uri.parse(com.sky.android.project.projectname/data);
   to fetch the data.
 
   It is working fine.
 
   But when i uninstall one of the application other applications using
 same
  Uri(com.sky.android.project.projectname/data) are not working.
 
   I got the Error message while loading the applications are:
  * java.lang.RuntimeException: Cannot determine device identification
  *
  I have also tried this with shared user ID but it also not working.
 
  Let me know how to overcome with these situation, Or any other way to
 share
  the data.
 
  Regards,
  Rajiv

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Deleting An Application with ContentProvider Other Applications not working

2010-03-23 Thread Rajiv
Hi all
I have a problem to uninstalling the product in android.
I have used *ContentProvider* to share data in multiple applications. I
used  in Android Manifest file
 *provider android:name=Provider
 android:authorities=com.sky.android.project.projectname/
*
 and uri in Provider Class file
 Uri uri = com.sky.android.project.projectname/data

 It is working fine to Insert, delete and update in the application.

In other application I have used the

 Uri allTitles = Uri.parse(com.sky.android.project.projectname/data);
 to fetch the data.

 It is working fine.

 But when i uninstall one of the application other applications using same
Uri(com.sky.android.project.projectname/data) are not working.

 I got the Error message while loading the applications are:
* java.lang.RuntimeException: Cannot determine device identification
*
I have also tried this with shared user ID but it also not working.

Let me know how to overcome with these situation, Or any other way to share
the data.

Regards,
Rajiv

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Launching another application through the current application

2010-01-06 Thread Rajiv
Hello all

The problem I am facing is, I want to launch another application through the
current application.

In RIM there is a ApplicationManager.getApplicationManager().launch(String
path) method that launches directly RIM application mentioned in String
path.

Is there any method like this in android or any other way to solve this
problem ??

Regards,
Rajiv
-- 
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] regarding android screenshot source code

2009-03-19 Thread rajiv

hello..

we are trying to use the screen shot source code in our project, we
tried to compile screenshot code on eclipse, there is a write
function used which uses renderd image as one of its  parameter ,
but the one which is being passed is buffered image, and we are
getting an error ..


so kinldy help in this regard.

--~--~-~--~~~---~--~~
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] Android Platform Profiling

2009-02-10 Thread rajiv

Hi Everyone

I have successfully brought up a OMAP24240 target running Android with
YAFFS2 and UBIFS file systems. I am now trying to identify the
performance overheads associated at every level like the application,
file system, DVM, File Translation Layer, Linux IO scheduler etc. I am
primarily interested in measuring the flash memory read/write
performance. Is there any standard application available already for
the Android platform for profiling such a scenario?

Thanks in advance
Rajib

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