-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
2,628 additions
and
3,032 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
/.idea/kotlinc.xml |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
app/src/main/java/github/umer0586/sensorserver/activities/AboutActivity.java
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
app/src/main/java/github/umer0586/sensorserver/activities/AboutActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package github.umer0586.sensorserver.activities | ||
|
||
import android.content.Intent | ||
import android.net.Uri | ||
import android.os.Bundle | ||
import android.view.View | ||
import android.widget.Toast | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.appcompat.widget.AppCompatTextView | ||
import github.umer0586.sensorserver.BuildConfig | ||
import github.umer0586.sensorserver.R | ||
|
||
class AboutActivity : AppCompatActivity() | ||
{ | ||
|
||
|
||
override fun onCreate(savedInstanceState: Bundle?) | ||
{ | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_about) | ||
|
||
findViewById<View>(R.id.donationBtn).setOnClickListener { | ||
openLink("http://www.buymeacoffee.com/umerfarooq") | ||
} | ||
findViewById<View>(R.id.sourceCodeBtn).setOnClickListener { | ||
openLink("http://github.com/umer0586/SensorServer") | ||
} | ||
|
||
val version = findViewById<AppCompatTextView>(R.id.app_version) | ||
version.text = "v" + BuildConfig.VERSION_NAME | ||
} | ||
|
||
private fun openLink(link: String) | ||
{ | ||
val intent = Intent(Intent.ACTION_VIEW) | ||
if (intent.resolveActivity(applicationContext.packageManager) != null) | ||
{ | ||
intent.data = Uri.parse(link) | ||
startActivity(Intent.createChooser(intent, "Select Browser")) | ||
} | ||
else | ||
{ | ||
Toast.makeText(applicationContext, "Browser app not found", Toast.LENGTH_SHORT).show() | ||
} | ||
} | ||
} |
37 changes: 0 additions & 37 deletions
37
app/src/main/java/github/umer0586/sensorserver/activities/DeviceAxisActivity.java
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
app/src/main/java/github/umer0586/sensorserver/activities/DeviceAxisActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package github.umer0586.sensorserver.activities | ||
|
||
import android.graphics.drawable.Drawable | ||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.appcompat.widget.AppCompatImageView | ||
import github.umer0586.sensorserver.R | ||
import java.io.IOException | ||
|
||
class DeviceAxisActivity : AppCompatActivity() | ||
{ | ||
|
||
|
||
override fun onCreate(savedInstanceState: Bundle?) | ||
{ | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_device_axis) | ||
val deviceAxisImage = findViewById<AppCompatImageView>(R.id.device_axis) | ||
try | ||
{ | ||
val ims = assets.open("axis_device.png") | ||
val d = Drawable.createFromStream(ims, null) | ||
deviceAxisImage.setImageDrawable(d) | ||
ims.close() | ||
} | ||
catch (ex: IOException) | ||
{ | ||
return | ||
} | ||
} | ||
} |
Oops, something went wrong.