A dynamic on-the-go journal with the purpose of saving your thoughts and your moments during your journey.
- Capture and save photos with location
- Fetch current weather information from web service and attach to each entry
- Add journal entries
- View journal entries with grid or list view
- Single entry view provides various further actions (edit, delete, view in gallery...)
- Theme personalization
- Localization (en and vi)
- Map view
- Passcode login
- Share to social network (under development)
- Reverse geocoding service from Open Street Map
- Weather service from Open Weather Map
- Fused Location Provider
- Room SQLite persistent data
- Shared Preferences (with PreferenceFragment)
- Map Fragment from Google Map
- Clone from github
- Open with Android Studio (prefereably >= 3.0)
- Important: Acquire your own key from Google Maps and Open Weather Map first then modify 'google_maps_api.xml' and 'WeatherApi.kt with your own'
- Run app in emulator or actual Android device
"Post" entity for Room SQL
@Entity
data class Post(
@PrimaryKey
val time: String,
val image: String,
val description: String,
val weather: String,
@Embedded
val location: Location): Comparable<Post> {
override fun compareTo(other: Post): Int {
val spd = SimpleDateFormat("dd/MM/yyyy - HH:mm:ss")
val thisTime = spd.parse(this.time)
val otherTime = spd.parse(other.time)
return otherTime.compareTo(thisTime)
}
override fun toString(): String = "$time $image $description $location $weather"
}
Request location permission
private fun handlePermissionScreen() {
//Explain and request permission for Location
setContentView(R.layout.splash_permission)
contentView!!.startAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in))
imageButton_accept.setOnClickListener {
//Request location permission
if ((ContextCompat.checkSelfPermission(this,
android.Manifest.permission.ACCESS_FINE_LOCATION) !=
PackageManager.PERMISSION_GRANTED)) {
ActivityCompat.requestPermissions(this,
arrayOf(android.Manifest.permission.ACCESS_FINE_LOCATION), 1)
} else startTimeline()
}
}
- Thanh Tran (congthanhptnk)
- Tuan Le (ZeusLMT)