Skip to content

Commit

Permalink
Versión 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
diego committed Jan 3, 2016
1 parent bb6d239 commit fa090f4
Show file tree
Hide file tree
Showing 21 changed files with 499 additions and 119 deletions.
2 changes: 1 addition & 1 deletion app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="bolts-android-1.3.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
<orderEntry type="library" exported="" name="bolts-applinks-1.3.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
<orderEntry type="library" exported="" name="bolts-applinks-1.3.0" level="project" />
<orderEntry type="library" exported="" name="bolts-tasks-1.3.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" />
<orderEntry type="library" exported="" name="Parse-1.11.0" level="project" />
Expand Down
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 21
versionName "1.5.5"
versionCode 23
versionName "1.6"
}
buildTypes {
release {
Expand Down
43 changes: 28 additions & 15 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,58 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme" >
<activity
android:name="es.vivarsoft.myapplication.MainActivity"
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:stateNotNeeded="true" >
<!--deep link-->
<intent-filter android:label="@string/app_name">

<!-- deep link -->
<intent-filter android:label="@string/app_name" >
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "vivarsoft://cardash" -->
<data android:scheme="vivarsoft"
android:host="cardash" />
<data
android:host="cardash"
android:scheme="vivarsoft" />
</intent-filter>
<intent-filter android:label="@string/app_name">
<intent-filter android:label="@string/app_name" >
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "https://vivarsoft.es/cardash" -->
<data android:scheme="http"
<data
android:host="vivarsoft.es"
android:pathPrefix="/cardash" />
android:pathPrefix="/cardash"
android:scheme="http" />
</intent-filter>
<!--fin deep link-->
<!--ejecutar google now-->
<!-- 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"/>

<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-->
<!-- fin ejecutar google now -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down Expand Up @@ -91,7 +100,11 @@
android:label="@string/title_activity_device_moving_speed"
android:screenOrientation="portrait" >
</activity>

<activity
android:name=".weather"
android:label="@string/title_activity_weather"
android:screenOrientation="portrait">
</activity>
</application>

</manifest>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
Expand All @@ -13,7 +14,6 @@
import android.widget.ArrayAdapter;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.GridView;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
Expand All @@ -32,6 +32,11 @@ protected void onCreate(Bundle savedInstanceState) {
loadApps();
loadListView();
addClickListener();
String versionapp = getApplicationContext().getResources().getString(R.string.version);
String appname = getApplicationContext().getResources().getString(R.string.app_name);
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(appname);
actionBar.setSubtitle(versionapp);
}

private PackageManager manager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
package es.vivarsoft.myapplication;

import android.app.AlertDialog;
import android.app.Notification;
import android.app.PendingIntent;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
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.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
Expand All @@ -21,8 +18,6 @@
import android.widget.TextView;
import android.widget.Toast;

import org.w3c.dom.Text;

public class DeviceMovingSpeed extends ActionBarActivity {
Context context;

Expand All @@ -44,6 +39,11 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.activity_device_moving_speed);
String versionapp = getApplicationContext().getResources().getString(R.string.version);
String appname = getApplicationContext().getResources().getString(R.string.app_name);
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(appname);
actionBar.setSubtitle(versionapp);
textView2 = (TextView)findViewById(R.id.textView2);
textView9 = (TextView)findViewById(R.id.textView9);
textView11 = (TextView)findViewById(R.id.textView11);
Expand Down
85 changes: 56 additions & 29 deletions app/src/main/java/es/vivarsoft/myapplication/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,46 +1,40 @@
package es.vivarsoft.myapplication;

import android.app.Activity;
import android.content.ContentValues;
import android.graphics.Bitmap;
import android.provider.MediaStore;
import android.support.v7.app.ActionBar;
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.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
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.ImageView;
import android.widget.TextView;
import android.widget.ToggleButton;

import com.parse.Parse;
import com.parse.ParseInstallation;

import org.w3c.dom.Text;

import java.lang.reflect.Method;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;

public class MainActivity extends ActionBarActivity {

Expand All @@ -55,15 +49,39 @@ public class MainActivity extends ActionBarActivity {
private ImageButton imageButton8;
private ImageButton imageButton9;
private TextView batteryLevel;
private TextView textView18;
private Button button2;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
establecerIU();
Parse.initialize(this, "YRAWWiHGPP4MsZhHnTYxDhkIdRNjFu85m7NiGike", "u98RQ2W3FLhj5MzYLVvSZnXLchKlVw6hhF4dAK7j");
ParseInstallation.getCurrentInstallation().saveInBackground();
wifibuttontext();

/*localizacion*/
final LocationManager locationManager = (LocationManager) this
.getSystemService(Context.LOCATION_SERVICE);


LocationListener locationListener = new LocationListener() {
public void onLocationChanged(Location location) {

location.getLatitude();
float speed = (float) ((location.getSpeed()*3600)/1000);
textView18.setText("Velocidad: " + speed + " km/h");
}

public void onStatusChanged(String provider, int status, Bundle extras) { }
public void onProviderEnabled(String provider)
{
}
public void onProviderDisabled(String provider) {
}
};

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

/*deep link*/
Intent intent = getIntent();
Expand All @@ -72,13 +90,13 @@ public void onCreate(Bundle savedInstanceState) {
/*fin deep link*/

IntentFilter intentFilter =new IntentFilter(Intent.ACTION_BATTERY_CHANGED);

/*bateria*/
batteryLevel = (TextView)findViewById(R.id.batterylevel);

this.registerReceiver(this.myBatteryReceiver,
new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
/*fin bateria*/
wifibuttontext();
}

private void wifibuttontext()
Expand All @@ -95,11 +113,6 @@ else if (wifiManager.getWifiState() == 3)
}
}

public void showApps(View v){
Intent i = new Intent(this, AppsListActivity.class);
startActivity(i);
}

private BroadcastReceiver myBatteryReceiver
= new BroadcastReceiver(){

Expand Down Expand Up @@ -131,13 +144,19 @@ public void onReceive(Context arg0, Intent arg1) {
/*Contruir interface*/
public void establecerIU()
{
String versionapp = getApplicationContext().getResources().getString(R.string.version);
String appname = getApplicationContext().getResources().getString(R.string.app_name);
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(appname);
actionBar.setSubtitle(versionapp);
imageButton = (ImageButton) findViewById(R.id.imageButton);
imageButton2 = (ImageButton) findViewById(R.id.imageButton2);
imageButton3 = (ImageButton) findViewById(R.id.imageButton3);
imageButton4 = (ImageButton) findViewById(R.id.imageButton4);
imageButton5 = (ImageButton) findViewById(R.id.imageButton5);
imageButton6 = (ImageButton) findViewById(R.id.imageButton6);
imageButton7 = (ImageButton) findViewById(R.id.imageButton7);
textView18 = (TextView) findViewById(R.id.textView18);
button2 = (Button) findViewById(R.id.button2);
}

Expand Down Expand Up @@ -191,6 +210,7 @@ public void showNotification() {
}
}
/*fin bateria*/

public void wifionclick (View v)
{
WifiManager wifiManager = (WifiManager)getBaseContext().getSystemService(Context.WIFI_SERVICE);
Expand All @@ -206,6 +226,12 @@ else if (wifiManager.getWifiState() == 3)
button2.setText("Wifi: On");
}
}

public void showApps(View v){
Intent i = new Intent(this, AppsListActivity.class);
startActivity(i);
}

public void relojonclick(View v)
{
Intent intent = new Intent("android.intent.action.QUICK_CLOCK");
Expand Down Expand Up @@ -244,7 +270,7 @@ public void clickweb(View v)
startActivity(browserIntent);
}

public void clickwhatsapp(View v)
public void clickassist(View v)
{
Intent LaunchIntent = new Intent("android.intent.action.ASSIST");
startActivity(LaunchIntent);
Expand All @@ -258,8 +284,9 @@ public void clickmusic(View v)

public void clickcam (View v)
{
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intent, 0);
Intent i = new Intent(this, weather.class);
startActivity(i);
//startActivity(new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE));
}

@Override
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/java/es/vivarsoft/myapplication/acerca.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
Expand All @@ -21,6 +22,11 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_acerca);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
textView17 = (TextView)findViewById(R.id.textView17);
String versionapp = getApplicationContext().getResources().getString(R.string.version);
String appname = getApplicationContext().getResources().getString(R.string.app_name);
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(appname);
actionBar.setSubtitle(versionapp);
}

public void licenseonclick (View v)
Expand Down
Loading

0 comments on commit fa090f4

Please sign in to comment.