|
What does this have to do with Android programming? More importantly, what is the problem?
|
|
|
|
|
i need to compare the password in my application Android in the login with my password in my database
|
|
|
|
|
So what is (not) working?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
i cant login when i grap my username and my password i thnik there are a problem in my code php but i don't find it
|
|
|
|
|
Member 13023118 wrote: ...i thnik there are a problem in my code php but i don't find it Perhaps you'd be better served here. Once your PHP code is returning the proper credentials, then you can come back to this forum and focus on your Android code.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
ok thank you very much
|
|
|
|
|
So where is this PHP code running, where is the database, and what application on the Android system is connected to it?
|
|
|
|
|
i have a file named test.rar which have password that i set on it ,cuz i have a database file in it ,
i want to open this file and read data from my database file and use it for my app in android studio .
how can i do it ?
|
|
|
|
|
What problem are you having (other than needing all of this code to exist)?
|
|
|
|
|
You already posted this question in QA - How to open a rar file with password[^]
I asked you some questions on that post.
Do not post the same question in multiple forums on this site - it's rude.
|
|
|
|
|
Store the .rar file in your project's assets folder. During runtime, you can access and save that file to the phone's internal storage or the SD card. As I understand it, RAR is a propriatary format so you can't unarchive it using Java's SDK. Use a third party library like junrar to do the unarchiving.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
modified 25-Apr-17 10:00am.
|
|
|
|
|
I am working with googlemap. I have implemented custom marker window, this window contains photo of the marker. I am taking the url of the photo as string and setting it into imageview with thread. However, the code is not syncronized with user. When I have clicked the marker, it shows the photo of the previeus marker that I have clicked. When I did debug, I can see that true url values are coming from background but the setting image into imageview operation is becoming late. How can I solve this problem? I have tried picasso and glide but still same problem.
@Override
public void onMapReady(GoogleMap map) {
this.infoWindow = (ViewGroup)getActivity().getLayoutInflater().inflate(R.layout.info_marker_window, null);
this.mekanfoto = (ImageView) infowindow.findViewById(R.id.mekan_foto);
googleMap = map;
if(googleMap!=null){
googleMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {
@Override
public View getInfoWindow(Marker marker) {
return null;
}
@Override
public View getInfoContents(final Marker marker) {
if(mLastLocation.getLatitude()!=marker.getPosition().latitude||
mLastLocation.getLongitude()!=marker.getPosition().longitude){
customMarker = CustomMarker.getCustomMarker(listCustomMarker, marker);
final String URL = customMarker.getVenue().getFoto();
createThread(mekanfoto,URL).start();
mapWrapperLayout.setMarkerWithInfoWindow(marker, infoWindow);
return infoWindow;
}
return null;}
});
}
}
private synchronized Thread createThread(final ImageView imageView, final String URL)
{
final Bitmap[] b = new Bitmap[1];
Thread thread=new Thread(new Runnable() {
@Override
public void run() {
b[0] =download_Image(URL,imageView);
}
});
return thread;
}
public Bitmap download_Image(String url,ImageView imageview) {
URL newurl = null;
try {
newurl = new URL(url);
} catch (MalformedURLException e) {
e.printStackTrace();
}
Bitmap mIcon_val = null;
try {
URLConnection urlConnection=newurl.openConnection();
InputStream is=urlConnection.getInputStream();
mIcon_val= BitmapFactory.decodeStream(is);
} catch (Exception e) {
e.printStackTrace();
}finally {
}
imageview.setImageBitmap(mIcon_val);
return mIcon_val;
}
modified 18-Apr-17 12:31pm.
|
|
|
|
|
Having the coordinates from Android Sensor and try to calculate the distance in Excel according to:
http://andrew.hedges.name/experiments/haversine/
dlon = lon2 - lon1
dlat = lat2 - lat1
a = (sin(dlat/2))^2 + cos(lat1) * cos(lat2) * (sin(dlon/2))^2
c = 2 * atan2( sqrt(a), sqrt(1-a) )
d = R * c (where R is the radius of the Earth)
Enter my two Locations in the calculator (link above) shows me the right result, it is about 6m.
When I calculate it by Excel I get 20Km instead of 6 meters
I'm strongly assuming that I mix up rad vs. degree but I do not find where I'm wrong.
Excel trigonometric functions expect everything in rad so I adjust lon1, lon2, lat1, lat2 first into rad...
Where I could be wrong, any idea?
Thank you in advance.
N.B: I'm also not sure whether it is ok to use the sensor decimal values directly for trigonometric function, maybe this is the key Point.
[Edit]
c allways Shows me something very near PI, e.g. 3.14159145
modified 19-Jan-21 21:04pm.
|
|
|
|
|
0x01AA wrote: Where I could be wrong Just about anywhere. Does this have something to do with Android programming?
|
|
|
|
|
Yes it has and no. The Lib I'm using is Embarcardero Fire-ThisAndThat. Some of the Sensors are Android specific supported
So where you suggest to ask the question?
Sorry, but .... grrrr
AND PLEASE DO NOT MARK YOUR COMMENT AS ANSWER TO EARN POINTS!!
SILLY DOWNVOTER!
SORRY, BRUNO
modified 19-Jan-21 21:04pm.
|
|
|
|
|
0x01AA wrote: Having the coordinates from Android Sensor and try to calculate the distance in Excel according to: So where exactly is the Android code issue?
Sorry but ?
|
|
|
|
|
If you are not familar with it why you bother about it?
DOWNVOTE TWO TIMES, SORRY YOU ARE AN A*H*. Now please Report me as abuser!
modified 19-Jan-21 21:04pm.
|
|
|
|
|
0x01AA wrote: If you are not familar with it why you bother about it? Richard is more familiar with "it" than most folks here (combined). Don't fault him for you not asking the correct question.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
He is familiar with a lot of things, I agree! But as soon he is not familiar with a subject he is Stalking the one who is asking... and my Feeling is, that he is Stalking especally me.
modified 19-Jan-21 21:04pm.
|
|
|
|
|
0x01AA wrote: ...he is Stalking especally me. So he is pursuing or approaching you stealthily? Really?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
0x01AA wrote: and my Feeling is, that he is Stalking especally me. Be afraid, be very afraid.
|
|
|
|
|
0x01AA wrote: So where you suggest to ask the question? Maybe the site from where you obtained the Embarcardero Fire-ThisAndThat lib.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
0x01AA wrote: Having the coordinates from Android Sensor... What coordinates?
0x01AA wrote: ...and try to calculate the distance... From/to what?
0x01AA wrote:
Enter my two Locations in the calculator (link above) shows me the right result, it is about 6m.
When I calculate it by Excel I get 20Km instead of 6 meters So then there's a difference between the two formulas. Since you've only shown one, how could anyone possibly guess as to what is wrong?
0x01AA wrote:
I'm strongly assuming that I mix up rad vs. degree but I do not find where I'm wrong.
Excel trigonometric functions expect everything in rad so I adjust lon1, lon2, lat1, lat2 first into rad... It's either degrees or radians. If you've tried both and neither produce the correct result, then that's not the (only) problem.
0x01AA wrote:
N.B: I'm also not sure whether it is ok to use the sensor decimal values directly for trigonometric function... Are they expecting floating-point values? If so, then you must use the "decimal values."
All of this aside, where's the Android issue?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Quote: Are they expecting floating-point values? If so, then you must use the "decimal values."
Expressed in "Expressed in decimal degrees" as pointed out by the link I gave.
Quote: It's either degrees or radians
Assume, I'm quite familiar to distinguish between them;)
The curious Thing:
2.0 * ArcTan2(Sqrt(1.0 - xA), Sqrt(xA));
instead of
2.0 * ArcTan2(Sqrt(xA), Sqrt(1.0 - xA));
solved the cross check with Excel for the Moment. While the second one still is ok in c++
Why it solved it? For this I Need to bring back first trigo back into my mind.
Quote: All of this aside, where's the Android issue
Do you program for programming sake or do you even program to solve a task?
Ok, it is not Android specific, but while working with Android at the Moment, I thought I will ask this here. Now hang me higher because of this delinquency
modified 19-Jan-21 21:04pm.
|
|
|
|
|
0x01AA wrote: Why it solved it? Because the two function signatures are different. In Excel, it is:
ATAN2(x,y) and for JavaScript, it is:
ATAN2(y,x)
0x01AA wrote: Ok, it is not Android specific, but while working with Android at the Moment, I thought I will ask this here. Perhaps here would be a better choice.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
modified 29-Mar-17 10:21am.
|
|
|
|