我在horizontalscrollview中有多个视图,在N视图的活动(view1,view2,view3到viewN)中.当我参加此活动时,view1是horizontalscrollview中的第一个可见项目.但是我想从view5或view6开始是我的horizontalscrollview中的第一个可见项目,所以当我从左向右滑动时,它会显示为view1之前的所有视图view1,view2到view4.
我正在尝试使用日历提供程序编辑和删除Google日历中的事件.我已经使用Calendar Provider创建了活动.
这是我创建事件的代码:
Calendar beginTime = Calendar.getInstance();
beginTime.set(2014, 5, 19, 7, 30);
Calendar endTime = Calendar.getInstance();
endTime.set(2014, 5, 19, 8, 30);
Intent intent = new Intent(Intent.ACTION_INSERT)
.setData(Events.CONTENT_URI)
.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, beginTime.getTimeInMillis())
.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, endTime.getTimeInMillis())
.putExtra(Events.TITLE, "")
.putExtra(Events.DESCRIPTION, "")
.putExtra(Events.EVENT_LOCATION, "")
.putExtra(Events.AVAILABILITY, Events.AVAILABILITY_BUSY)
.putExtra(Intent.EXTRA_EMAIL, email);
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
事件正在成功创建.现在我想编辑/删除该事件.那么,我该怎么做呢.对于编辑/删除我需要创建事件的事件ID我怎么能得到?
请...帮助我们.
android google-calendar-api android-intent android-contentprovider
我是朋友,我是GCM的新手.我有一个应用程序,我必须使用基于的GCM注册不同的用户category{category1 , category2}
如果用户选择Category1那么他将被注册Server1并且用户将收到notification from Server1.
同样,如果用户选择注册,category2则用户将收到notification from Server2.
那么,我是否可以在应用程序中使用两个GCM SENDER_ID.如果是,那么我可以执行它的是什么.
我是Google Project的新手,我必须在我的项目中集成Google Calendar和Google Task.为此,我正在考虑[ https://developers.google.com/google-apps/calendar/instantiate][1].我已添加:
google play services as library google-api-services-calendar-v3-rev81-java-1.18.0-rc.
但它显示错误"com.google.api.client.auth.oauth2.draft10.AuthorizationRequestUrl类型无法解析.它是从所需的.class文件间接引用的"
这是我的代码:
String clientId = "YOUR_CLIENT_ID";
String clientSecret = "YOUR_CLIENT_SECRET";
// Or your redirect URL for web based applications.
String redirectUrl = "urn:ietf:wg:oauth:2.0:oob";
String scope = "https://www.googleapis.com/auth/calendar";
// Step 1: Authorize -->
String authorizationUrl = new GoogleAuthorizationRequestUrl(clientId,
redirectUrl, scope).build();
// Point or redirect your user to the authorizationUrl.
System.out.println("Go to the following link in your browser:");
System.out.println(authorizationUrl);
// Read the authorization code from the standard input stream.
BufferedReader …Run Code Online (Sandbox Code Playgroud)