Skip to content

Instantly share code, notes, and snippets.

View hafs-r's full-sized avatar
🏠
Working from home

Hafs hafs-r

🏠
Working from home
View GitHub Profile
import android.util.Log
import androidx.test.platform.app.InstrumentationRegistry
import java.io.BufferedReader
import java.io.IOException
import java.io.InputStreamReader
object ResourcesHelper {
fun loadFileAsString(path: String): String? {
var bufferedReader: BufferedReader? = null
try {
import android.content.Context
import com.apptualizer.fakeapi.helper.ResourcesHelper
import com.apptualizer.fakeapi.helper.ResponseHelper
import okhttp3.*
import java.io.IOException
class FakeInterceptor @JvmOverloads constructor(val context: Context) : Interceptor {
@Throws(IOException::class)
override fun intercept(chain: Interceptor.Chain): Response {
@Provides
@Singleton
internal fun provideOkhttpClient(
cache: Cache,
networkMonitor:NetworkMonitor,
@ApplicationContext context: Context,
eventBus: RxEventBus,
deviceType: CurrentDeviceType): OkHttpClient {
val client = OkHttpClient.Builder()
.cache(cache)
import okhttp3.Request
import okio.Buffer
object ResponseManager {
var next_match = true
var errorCode = 200
private fun bodyToString(request: Request): String {
# bash script to generate release not based on commit message
# commit message include the trello task id prefix as 'trello:<id>'
=$(git log --pretty="format: %s" master..HEAD | sed -e 's/$/|/'| tr -d '\n')
```
The complete **release_notes_generator.sh** as below
```bash
#! /bin/bash
#expose env variables to other steps
envman add --key version_code --value "${BITRISE_BUILD_NUMBER}"
envman add --key fabric_api_token --value "${FABRIC_API_TOKEN}"
envman add --key fabric_build_secret --value "${FABRIC_BUILD_SECRET}"
envman add --key change_log --value "$RELEASE_NOTE"
sudo gem install badge
#copy android licenses
mkdir -p "$ANDROID_HOME/licenses"
rsync -avhP ./android-licenses/ "$ANDROID_HOME/licenses/"
#!/usr/bin/env bash
#copy android licences
mkdir -p "$ANDROID_HOME/licenses"
rsync -avhP ./android-licenses/ "$ANDROID_HOME/licenses/"
#expose env variables to other steps
envman add --key version_code --value "${BITRISE_BUILD_NUMBER}"
envman add --key fabric_api_token --value "${FABRIC_API_TOKEN}"
envman add --key fabric_build_secret --value "${FABRIC_BUILD_SECRET}"
Fatal Exception: java.lang.IllegalStateException: View size is too small after padding
at maps.ce.i.b(Unknown Source)
at maps.dg.a.a(Unknown Source)
at maps.dg.a.a(Unknown Source)
at maps.ei.bl$4.a(Unknown Source)
at maps.dg.a.a(Unknown Source)
at maps.ei.bu.a(Unknown Source)
at com.google.android.gms.maps.internal.e$a.onTransact(:com.google.android.gms.alldynamite:83)
at android.os.Binder.transact(Binder.java:361)
at com.google.android.gms.maps.internal.IGoogleMapDelegate$zza$zza.moveCamera(Unknown Source)