Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6033855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:32:39+00:00 2026-05-23T05:32:39+00:00

Having an activity which have a latitude and longitude save as string and in

  • 0

Having an activity which have a latitude and longitude save as string and in other activity in same package want it to open in the same latitude and longitude the first activity have so how can i pass data between both activities . if this what i want to path from intent to other

enter code here
loc.getLatitude(); 
loc.getLongitude(); 

Loc is location its the GPS get Double for both .

enter code here
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523): FATAL EXCEPTION: main
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523): java.lang.RuntimeException: Unable to start activity ComponentInfo{yaraby.y/yaraby.y.yaraby}: java.lang.ClassCastException: android.widget.EditText
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2685)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at android.app.ActivityThread.access$2300(ActivityThread.java:126)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2038)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at android.os.Handler.dispatchMessage(Handler.java:99)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at android.os.Looper.loop(Looper.java:123)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at android.app.ActivityThread.main(ActivityThread.java:4633)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at java.lang.reflect.Method.invokeNative(Native Method)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at java.lang.reflect.Method.invoke(Method.java:521)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at dalvik.system.NativeStart.main(Native Method)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523): Caused by: java.lang.ClassCastException: android.widget.EditText
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at yaraby.y.yaraby.onCreate(yaraby.java:49)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2633)
 06-19 22:18:34.720: ERROR/AndroidRuntime(2523):     ... 11 more
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:32:40+00:00Added an answer on May 23, 2026 at 5:32 am

    Put this in your sender activity:

    Intent i = new Intent(SenderActivity.this, ReceiverActivty.class);
    i.putExtra("latitude", loc.getLatitude());
    i.putExtra("longitude", loc.getLongitude());
    startActivity(i);
    

    and this in your receiver activity:

    Bundle extras = getIntent().getExtras();
    double latitude = extras.getDouble("latitude");
    double longitude = extras.getDouble("longitude");
    

    Thats it! Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an activity which creates a unique ID and then passes the String
So I have this JSON, which then my activity retrieves to a string: {popular:
I have created an application having tab activity which in turn has 5 different
I have one activity in which I am having one TabHost with two tabs.
i am having a very simple problem. I have created an activity in which
I am having a problem in searching a ListView. In my activity I have
Let's say I have an Activity which displays a View containing a TextView .
I'm having a very simple problem, which can be solved fairly simple but for
I have an activity in my app which displays rss feeds and next to
I have an Activity which provides UI for editing entity properties such as name,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.