Skip to content

Instantly share code, notes, and snippets.

View manishcm's full-sized avatar

Manish Mulimani manishcm

  • Mobilitas
  • India
View GitHub Profile
@manishcm
manishcm / Obs
Created September 30, 2014 07:41
{"error":{"message":"Unable to convert object into response content","code":"javax.imageio.ImageIO:1528","detail":"java.lang.NullPointerException\n\tat javax.imageio.ImageIO.write(ImageIO.java:1528)\n\tat org.openmrs.obs.handler.ImageHandler.saveObs(ImageHandler.java:117)\n\tat org.openmrs.api.impl.ObsServiceImpl.saveObs(ObsServiceImpl.java:113)\n\tat sun.reflect.GeneratedMethodAccessor590.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:622)\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)\n\tat org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)\n\tat org.springfra
09-30 13:06:01.168 6656 6681 W System.err: in.mobilitas.mhealth.core.MHException: {"message":"Unable to convert object into response content","detail":"org.openmrs.api.APIException: Trying to write complex obs to the file system. \n\tat org.openmrs.obs.handler.TextHandler.saveObs(TextHandler.java:124)\n\tat org.openmrs.api.impl.ObsServiceImpl.saveObs(ObsServiceImpl.java:113)\n\tat sun.reflect.GeneratedMethodAccessor590.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:622)\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)\n\tat org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionIntercept
@manishcm
manishcm / StateRemovableFragmentStatePageAdapter.java
Last active September 12, 2019 12:17
Enhanced version of FragmentStatePageAdapter which allows to remove the saved states, so that fragments can be recreated with new state.
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/***
Copyright (c) 2014 CommonsWare, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License.
@manishcm
manishcm / AndroidManifest.xml
Last active June 21, 2019 19:18
Android App Widget sample app using setOnClickPendingIntent
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test1"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="19" />
@manishcm
manishcm / MainActivity.java
Created August 8, 2014 07:42
DialogFragment can be used as Dialog as well as embedded inside Acitivity's view hierarchy.
package com.example.test;
import android.app.Activity;
import android.app.DialogFragment;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
package com.example.test;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);