Skip to content

Commit

Permalink
versión 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
diego committed Oct 28, 2015
1 parent 0d50802 commit 928ead6
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId 'es.vivarsoft.simplecardash'
minSdkVersion 15
targetSdkVersion 22
versionCode 12
versionName "1.3.2"
versionCode 14
versionName "1.4"
}
buildTypes {
release {
Expand Down
14 changes: 13 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:stateNotNeeded="true" >

<!--deep link-->
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand All @@ -35,7 +35,19 @@
android:host="vivarsoft.es"
android:pathPrefix="/cardash" />
</intent-filter>
<!--fin deep link-->
<!--ejecutar google now-->
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable"/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!--fin ejecutar google now-->

<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
Expand All @@ -32,6 +34,10 @@ public class DeviceMovingSpeed extends ActionBarActivity {
private TextView textView13;
private TextView textView15;
private TextView textView16;
private Button button;

Double latitud = 40.4169473;
Double longitud = -3.7057172;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -45,6 +51,7 @@ protected void onCreate(Bundle savedInstanceState) {
textView13 = (TextView)findViewById(R.id.textView13);
textView15 = (TextView)findViewById(R.id.textView15);
textView16 = (TextView)findViewById(R.id.textView16);
button = (Button)findViewById(R.id.button);

/**/
final LocationManager locationManager = (LocationManager) this
Expand All @@ -64,25 +71,50 @@ public void onLocationChanged(Location location) {
textView12.setText("Longitud: " + longituddouble);
textView13.setText("Altitud: " + (int) location.getAltitude() + " Metros");
textView16.setText("Precisión: " + (int) location.getAccuracy() + " Metros");
latitud = location.getLatitude();
longitud = location.getLongitude();
}

public void onStatusChanged(String provider, int status, Bundle extras) { }
public void onProviderEnabled(String provider)
{
button.setEnabled(true);
textView15.setText("GPS: activado");
}
public void onProviderDisabled(String provider) {
button.setEnabled(false);
textView15.setText("GPS: desactivado");
Toast.makeText(getApplicationContext(),
"Active el sensor GPS", Toast.LENGTH_LONG)
.show();
}

};

locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);
/**/
}

public void shareonclick (View v)
{
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Latitud: " + latitud + " | Longitud: " + longitud);

try {
startActivity(Intent.createChooser(sharingIntent, "Compartir loclización en..."));
finish();
} catch (android.content.ActivityNotFoundException ex) {

}
}

public void mapasonclick (View v)
{
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.setData(Uri.parse("geo:" + latitud + "," +longitud + "?q=" + latitud + "," + longitud));
startActivity(i);
}

public void showApps(View v){
Intent i = new Intent(this, AppsListActivity.class);
startActivity(i);
Expand Down
21 changes: 20 additions & 1 deletion app/src/main/java/es/vivarsoft/myapplication/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,40 @@
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.media.audiofx.BassBoost;
import android.net.ConnectivityManager;
import android.net.Uri;
import android.net.wifi.WifiManager;
import android.os.BatteryManager;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.app.NotificationCompat;
import android.support.v4.view.MotionEventCompat;
import android.support.v7.app.ActionBarActivity;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.ImageButton;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.ToggleButton;


import java.lang.reflect.Method;

public class MainActivity extends ActionBarActivity {

Expand Down Expand Up @@ -102,7 +118,6 @@ public void establecerIU()
imageButton7 = (ImageButton) findViewById(R.id.imageButton7);
imageButton8 = (ImageButton) findViewById(R.id.imageButton8);
imageButton9 = (ImageButton) findViewById(R.id.imageButton9);

}

/*notificacion carga de bateria*/
Expand Down Expand Up @@ -204,6 +219,10 @@ public void clickcam (View v)
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intent, 0);
}

/*gestos*/
/*fin gestos*/

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
Expand Down
13 changes: 12 additions & 1 deletion app/src/main/java/es/vivarsoft/myapplication/acerca.java
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
package es.vivarsoft.myapplication;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class acerca extends ActionBarActivity {

private Button button;
private TextView textView17;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_acerca);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
textView17 = (TextView)findViewById(R.id.textView17);
}

public void licenseonclick (View v)
{
Intent browserIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("https://vivarsoft.es/license/"));
startActivity(browserIntent);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_acerca, menu);
//getMenuInflater().inflate(R.menu.menu_acerca, menu);
return true;
}

Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/roundedbutton.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#e6462c"/>
<stroke android:width="2dp"
android:color="#e6462c" />
</shape>
Binary file added app/src/main/res/drawable/share.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions app/src/main/res/layout/activity_acerca.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
android:text="@string/version"
android:id="@+id/textView4"
android:layout_alignParentBottom="true"
android:layout_alignRight="@+id/textView"
android:layout_alignEnd="@+id/textView" />
android:layout_centerHorizontal="true" />

<TextView
android:layout_width="wrap_content"
Expand Down Expand Up @@ -69,4 +68,14 @@
android:layout_below="@+id/textView6"
android:layout_centerHorizontal="true" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/license"
android:id="@+id/textView17"
android:layout_below="@+id/textView7"
android:layout_centerHorizontal="true"
android:onClick="licenseonclick" />

</RelativeLayout>
30 changes: 26 additions & 4 deletions app/src/main/res/layout/activity_device_moving_speed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="GPS: activado"
android:id="@+id/textView15"
android:layout_marginTop="55dp"
android:layout_below="@+id/textView13"
android:layout_centerHorizontal="true"
android:textSize="30dp" />
android:layout_below="@+id/textView16"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />

<TextView
android:layout_width="wrap_content"
Expand All @@ -118,4 +117,27 @@
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Ver en el mapa"
android:id="@+id/button"
android:onClick="mapasonclick"
android:clickable="true"
android:layout_below="@+id/textView16"
android:layout_centerHorizontal="true"
android:layout_marginTop="38dp" />

<ImageButton
android:layout_width="65dp"
android:layout_height="65dp"
android:background="@drawable/roundedbutton"
android:src="@drawable/share"
android:text="ME"
android:id="@+id/button7"
android:onClick="shareonclick"
android:layout_above="@+id/imageView3"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_margin="10dp"/>
</RelativeLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
android:layout_height="match_parent"
tools:context=".HomeActivity"
android:background="#ffffff"
android:id="@+id/bateria">
android:id="@+id/bateria"
android:onClick="lteonclick">

<TextClock
android:layout_width="wrap_content"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<string name="notification_title">Car dash</string>
<string name="notification_text">Batería al 25%, conecte el dispositivo a la corriente eléctrica.</string>
<string name="detalles">Car dash es una sencilla aplicación con las aplicaciones y funciones bśicas para usar nuestro smartphone en el vehíulo, además de contener nuestras aplicaciones instaladas también lo podemos definir como launcher por defecto.</string>
<string name="version">Versión: 1.3.3</string>
<string name="version">Versión: 1.4</string>
<string name="title_activity_battery">battery</string>

<string name="hello">Información de la batería</string>
Expand All @@ -22,4 +22,5 @@
<string name="appwidget_text">EXAMPLE</string>
<string name="add_widget">Add widget</string>

<string name="license">Licencia: <a href="https://vivarsoft.es/license/" target="_blank">GPLv3</a></string>
</resources>
5 changes: 5 additions & 0 deletions app/src/main/res/xml/searchable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="Car dash" >
</searchable>

0 comments on commit 928ead6

Please sign in to comment.